Indentation
This commit is contained in:
parent
50a7f5b3f4
commit
1a4bcdf9cc
|
@ -25,13 +25,13 @@ fn run_spec(data: &[u8]) -> Result<(), ()> {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
let exit_status = Command::new("wasm")
|
let exit_status = Command::new("wasm")
|
||||||
.arg("-d")
|
.arg("-d")
|
||||||
.arg(&seed_path)
|
.arg(&seed_path)
|
||||||
.stdout(Stdio::null())
|
.stdout(Stdio::null())
|
||||||
.stderr(Stdio::null())
|
.stderr(Stdio::null())
|
||||||
.status()
|
.status()
|
||||||
.expect("failed to execute `wasm`");
|
.expect("failed to execute `wasm`");
|
||||||
|
|
||||||
if exit_status.success() {
|
if exit_status.success() {
|
||||||
Ok(())
|
Ok(())
|
||||||
|
@ -47,7 +47,7 @@ fn run_wasmi(data: &[u8]) -> Result<(), ()> {
|
||||||
|
|
||||||
fuzz_target!(|data: &[u8]| {
|
fuzz_target!(|data: &[u8]| {
|
||||||
let wasmi_result = run_wasmi(data);
|
let wasmi_result = run_wasmi(data);
|
||||||
let wasm_result = run_spec(data);
|
let wasm_result = run_spec(data);
|
||||||
|
|
||||||
assert_eq!(wasmi_result.is_ok(), wasm_result.is_ok());
|
assert_eq!(wasmi_result.is_ok(), wasm_result.is_ok());
|
||||||
});
|
});
|
||||||
|
|
|
@ -29,13 +29,13 @@ fn run_spec(data: &[u8], stdout_msg_buf: &mut [u8; 64], stderr_msg_buf: &mut [u8
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
let output = Command::new("wasm")
|
let output = Command::new("wasm")
|
||||||
.arg("-d")
|
.arg("-d")
|
||||||
.arg(&seed_path)
|
.arg(&seed_path)
|
||||||
.stdout(Stdio::null())
|
.stdout(Stdio::null())
|
||||||
.stderr(Stdio::null())
|
.stderr(Stdio::null())
|
||||||
.output()
|
.output()
|
||||||
.expect("failed to execute `wasm`");
|
.expect("failed to execute `wasm`");
|
||||||
|
|
||||||
if output.status.success() {
|
if output.status.success() {
|
||||||
Ok(())
|
Ok(())
|
||||||
|
@ -52,8 +52,8 @@ fn run_wasmi(data: &[u8]) -> Result<(), ()> {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
loop {
|
loop {
|
||||||
fuzz!(|data: &[u8]| {
|
fuzz!(|data: &[u8]| {
|
||||||
// Keep messages on stack. This should lead to a different stack hashes for
|
// Keep messages on stack. This should lead to a different stack hashes for
|
||||||
// different error messages.
|
// different error messages.
|
||||||
let mut stdout_msg_buf: [u8; 64] = [0; 64];
|
let mut stdout_msg_buf: [u8; 64] = [0; 64];
|
||||||
|
@ -65,6 +65,6 @@ fn main() {
|
||||||
if wasmi_result.is_ok() != wasm_result.is_ok() {
|
if wasmi_result.is_ok() != wasm_result.is_ok() {
|
||||||
panic!("stdout: {:?}, stderr: {:?}", &stdout_msg_buf[..], &stderr_msg_buf as &[u8]);
|
panic!("stdout: {:?}, stderr: {:?}", &stdout_msg_buf[..], &stderr_msg_buf as &[u8]);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue