Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Miha Zupan <mihazupan.zupan1@gmail.com>
  • Loading branch information
buyaa-n and MihaZupan authored Oct 4, 2024
1 parent f77ce74 commit 6d65ad3
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/libraries/Fuzzing/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Useful links:
### Prerequisites

Build the runtime if haven't already:
Build the runtime if you haven't already:
```cmd
./build.cmd clr+libs -rc release
```
Expand All @@ -29,20 +29,22 @@ dotnet tool install --global SharpFuzz.CommandLine
```

> [!TIP]
> The project uses a release runtime + debug libraries configuration by default.
> If you want to use a different configuration, make sure to also adjust the paths in `run.bat`.
> The project uses a `Release` runtime + `Debug` libraries configuration by default.
> Automated fuzzing runs use a `Checked` runtime + `Debug` libraries configuration by default.
> You can use any configuration locally, but `Checked` is recommended when testing changes in `System.Private.CoreLib`.
### Fuzzing locally

Build the `DotnetFuzzing` fuzzing project, the project is self contained so it will produce `DotnetFuzzing.exe` and all libraries needed for run into the output.
Build the `DotnetFuzzing` fuzzing project. It is self-contained, so it will produce `DotnetFuzzing.exe` along with a copy of all required libraries.

```cmd
cd src/libraries/Fuzzing/DotnetFuzzing
dotnet build
```

Now can `run run.bat` that will finds the path to the `DotnetFuzzing.exe` and run it with required arguments `\path\DotnetFuzzing.exe prepare-onefuzz deployment`. The `prepare-onefuzz` command will create separate directories for each fuzzing target, instrument the relevant assemblies, and generate a helper script for running them locally.
Now you can run `run.bat`, which will create separate directories for each fuzzing target, instrument the relevant assemblies, and generate a helper script for running them locally.
When iterating on changes, remember to rebuild the project again: `dotnet build; .\run.bat`.

```cmd
run.bat
Expand Down

0 comments on commit 6d65ad3

Please sign in to comment.