Skip to content

Commit

Permalink
chore(fuzz): remove coverage
Browse files Browse the repository at this point in the history
because it is not super useul
  • Loading branch information
hulkoba committed Dec 13, 2023
1 parent c10da44 commit b29c6fc
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 17 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
"test": "mocha --timeout 120000 test/unittests.js",
"test-type-definitions": "node --loader ts-node/esm test/typescript/definitions.ts",
"fuzz": "jazzer test/fuzz/$TARGET.cjs -- -artifact_prefix=test/fuzz/reports/",
"fuzz-coverage": "jazzer test/fuzz/$TARGET.cjs --coverage --cov_dir=test/fuzz/coverage -- -artifact_prefix=test/fuzz/reports/",
"benchmark-time": "node test/benchmarks/time.js",
"benchmark-memory-usage": "node test/benchmarks/memory_usage.js",
"start": "http-server",
Expand Down
16 changes: 0 additions & 16 deletions test/fuzz/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,22 +37,6 @@ You should see the fuzzer that looks similar to this:
It will continue to generate random inputs forever, until it finds a bug or is terminated.
The testcases for bugs it finds can be seen in the form of `crash-*`, `timeout-*` or `oom-*` at `test/fuzz/reports`.

## Running with coverage
To generate a coverage report, run the `fuzz-coverage` script from the package.json:
```sh
TARGET=createMessageBinary npm run fuzz-coverage
```

The coverage reports can be found in `test/fuzz/coverage`.

_Note:_ The output will tell you that using `--sync` might be useful:
> Exclusively observed synchronous return values from fuzzed function. Fuzzing in synchronous mode seems beneficial!
To enable it, append a `--sync` to your Jazzer.js invocation.

But, [be careful](https://github.com/CodeIntelligenceTesting/jazzer.js/blob/main/docs/fuzz-targets.md#synchronous-execution).
It **may only be used for entirely synchronous code** and it is not fully compatible with callbacks, that are used in the tests.


## The fuzz target module
All functions that need to be fuzz-tested are here, at the `test/fuzz/` directory.

Expand Down

0 comments on commit b29c6fc

Please sign in to comment.