Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1.1.0] Remove/Comment out most of fuzz testing crate #2635

Merged
merged 1 commit into from
Feb 27, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion core/fuzz/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ cargo-fuzz = true
[dependencies]
grin_core = { path = ".."}
grin_keychain = { path = "../../keychain"}
grin_wallet = { path = "../../wallet"}
[dependencies.libfuzzer-sys]
git = "https://github.com/rust-fuzz/libfuzzer-sys.git"

Expand Down
10 changes: 5 additions & 5 deletions core/fuzz/fuzz_targets/compact_block_read.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ extern crate grin_core;
#[macro_use]
extern crate libfuzzer_sys;

use grin_core::core::block;
use grin_core::ser;
/*use grin_core::core::block;
use grin_core::ser;*/

fuzz_target!(|data: &[u8]| {
let mut d = data.clone();
let _t: Result<block::CompactBlock, ser::Error> = ser::deserialize(&mut d);
fuzz_target!(|_data: &[u8]| {
/*let mut d = data.clone();
let _t: Result<block::CompactBlock, ser::Error> = ser::deserialize(&mut d);*/
});
13 changes: 8 additions & 5 deletions core/fuzz/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
extern crate grin_core;
extern crate grin_keychain;
extern crate grin_wallet;

use grin_core::core::target::Difficulty;
/* These are completely out of date. Commented out until someone attends to them */

/*use grin_core::core::target::Difficulty;
use grin_core::core::{Block, BlockHeader, CompactBlock, Transaction};
use grin_core::libtx::build::{input, output, transaction, with_fee};
use grin_core::libtx::reward;
use grin_core::ser;
use grin_keychain::keychain::ExtKeychain;
use grin_keychain::Keychain;
use std::fs::{self, File};
use std::path::Path;
use std::path::Path;*/

fn main() {
generate("transaction_read", &tx()).unwrap();
/*generate("transaction_read", &tx()).unwrap();
generate("block_read", &block()).unwrap();
generate("compact_block_read", &compact_block()).unwrap();
generate("compact_block_read", &compact_block()).unwrap();*/
}

/*
fn generate<W: ser::Writeable>(target: &str, obj: W) -> Result<(), ser::Error> {
let dir_path = Path::new("corpus").join(target);
if !dir_path.is_dir() {
Expand Down Expand Up @@ -80,3 +82,4 @@ fn tx() -> Transaction {
)
.unwrap()
}
*/