bazel-contrib / bazel-contrib/rules_fuzzing

How do you run a cc_fuzz_test() against a specific input?

Open
#214 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Starlark
Stars
93
Forks
26
PR merge metrics
No merged PRs in 30d

Description

## Expected Behavior

I can run the fuzz test against a known input, as described here: https://google.github.io/oss-fuzz/advanced-topics/reproducing/#fuzz-target-bugs

## Actual Behavior

When I run the fuzz test, I get the following output:

```
mkdir: cannot create directory ‘/corpus’: Permission denied
mkdir: cannot create directory ‘/artifacts’: Permission denied
bazel-bin/upb/fuzz/file_descriptor_parsenew_fuzzer: line 12: /usr/local/google/home/haberman/code/upb/../rules_fuzzing/fuzzing/engines/libfuzzer_launcher.sh: No such file or directory
```

## Steps to Reproduce the Problem

```
$ git clone https://github.com/protocolbuffers/upb.git
$ cd upb
$ bazel build -c opt --config=asan-libfuzzer upb/fuzz:file_descriptor_parsenew_fuzzer
$ bazel-bin/upb/fuzz/file_descriptor_parsenew_fuzzer /dev/null
mkdir: cannot create directory ‘/corpus’: Permission denied
mkdir: cannot create directory ‘/artifacts’: Permission denied
bazel-bin/upb/fuzz/file_descriptor_parsenew_fuzzer: line 12: /usr/local/google/home/haberman/code/upb/../rules_fuzzing/fuzzing/engines/libfuzzer_launcher.sh: No such file or directory
```

## Specifications

- Version: 0.3.1: https://github.com/protocolbuffers/upb/blob/main/WORKSPACE#L52
- Platform: Linux

cc @ericsalo

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.