chore(fuzz): remove coverage

because it is not super useul
This commit is contained in:
hulkoba 2023-12-13 11:05:07 +01:00
parent c10da44df2
commit b29c6fccdf
No known key found for this signature in database
GPG Key ID: ACB6C4A3A4F2BE2F
2 changed files with 0 additions and 17 deletions

View File

@ -48,7 +48,6 @@
"test": "mocha --timeout 120000 test/unittests.js", "test": "mocha --timeout 120000 test/unittests.js",
"test-type-definitions": "node --loader ts-node/esm test/typescript/definitions.ts", "test-type-definitions": "node --loader ts-node/esm test/typescript/definitions.ts",
"fuzz": "jazzer test/fuzz/$TARGET.cjs -- -artifact_prefix=test/fuzz/reports/", "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-time": "node test/benchmarks/time.js",
"benchmark-memory-usage": "node test/benchmarks/memory_usage.js", "benchmark-memory-usage": "node test/benchmarks/memory_usage.js",
"start": "http-server", "start": "http-server",

View File

@ -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. 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`. 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 ## The fuzz target module
All functions that need to be fuzz-tested are here, at the `test/fuzz/` directory. All functions that need to be fuzz-tested are here, at the `test/fuzz/` directory.