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

Multi value! And even more fuzzing! #124

Merged
merged 12 commits into from Sep 5, 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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
63 changes: 52 additions & 11 deletions .travis.yml
Expand Up @@ -7,6 +7,9 @@ before_install:
- export PATH=$PATH:`pwd`/sccache-0.2.7-$target
- export RUSTC_WRAPPER=sccache

before_script:
- export RUST_BACKTRACE=1

after_script:
- sccache -s

Expand All @@ -33,15 +36,11 @@ install:

matrix:
include:
- name: "test (stable)"
rust: stable
- name: "test (beta)"
rust: beta
- name: "test (nightly)"
rust: nightly

# A job to run our fuzzers a bit longer than the default.
- name: "fuzz (stable)"
# First up: some jobs to run our fuzzers a bit longer than the default when
# we do `cargo test`.
#
# We run these first because they take the longest.
- name: "fuzz-utils (stable)"
rust: stable
env:
# 300 seconds = 5 minutes.
Expand All @@ -50,9 +49,52 @@ matrix:
|
# When the fuzzing fails, the logs are too big for Travis, so just
# show the relevant tail portion of the log.
cargo test -p walrus-fuzz > fuzz.log || {
cargo test -p walrus-fuzz-utils > fuzz.log || {
tail -n 1000 fuzz.log && exit 1
}
- name: "cargo fuzz run watgen (nightly)"
rust: nightly
script:
|
which cargo-fuzz || cargo install cargo-fuzz
# When the fuzzing fails, the logs are too big for Travis, so just
# show the relevant tail portion of the log.
cargo fuzz run watgen -- -max_total_time=300 > fuzz.log 2>&1 || {
tail -n 1000 fuzz.log && exit 1
}
- name: "cargo fuzz run wasm-opt-ttf (nightly)"
rust: nightly
script:
|
which cargo-fuzz || cargo install cargo-fuzz

(for (( ; ; )); do
tail -n 100 fuzz.log || true
sleep 10
done) &

# When the fuzzing fails, the logs are too big for Travis, so just
# show the relevant tail portion of the log.
cargo fuzz run wasm-opt-ttf -- -max_total_time=300 > fuzz.log 2>&1 || {
tail -n 1000 fuzz.log && exit 1
}
- name: "cargo fuzz run raw (nightly)"
rust: nightly
script:
|
which cargo-fuzz || cargo install cargo-fuzz
# When the fuzzing fails, the logs are too big for Travis, so just
# show the relevant tail portion of the log.
cargo fuzz run raw -- -max_total_time=300 > fuzz.log 2>&1 || {
tail -n 1000 fuzz.log && exit 1
}

- name: "test (stable)"
rust: stable
- name: "test (beta)"
rust: beta
- name: "test (nightly)"
rust: nightly

- name: "check benches"
rust: stable
Expand All @@ -71,7 +113,6 @@ matrix:
on:
branch: master


script:
- cargo build --all
- cargo test --all
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Expand Up @@ -40,7 +40,7 @@ criterion = "0.3.0"

[workspace]
members = [
"./crates/fuzz",
"./crates/fuzz-utils",
"./crates/macro",
"./crates/tests",
"./crates/tests-utils",
Expand Down
2 changes: 1 addition & 1 deletion benches/benches.rs
Expand Up @@ -10,7 +10,7 @@ fn criterion_benchmark(c: &mut Criterion) {
let input_wasm = black_box(input_wasm);
let mut module = Module::from_buffer(input_wasm).unwrap();
walrus::passes::gc::run(&mut module);
let output_wasm = module.emit_wasm().unwrap();
let output_wasm = module.emit_wasm();
black_box(output_wasm);
});
}),
Expand Down
5 changes: 4 additions & 1 deletion crates/fuzz/Cargo.toml → crates/fuzz-utils/Cargo.toml
@@ -1,7 +1,7 @@
[package]
authors = ["Nick Fitzgerald <fitzgen@gmail.com>"]
edition = "2018"
name = "walrus-fuzz"
name = "walrus-fuzz-utils"
version = "0.1.0"
publish = false

Expand All @@ -16,3 +16,6 @@ path = "../.."

[dependencies.walrus-tests-utils]
path = "../tests-utils"

[dev-dependencies]
bufrng = "1.0.1"
File renamed without changes.