Skip to content

Commit

Permalink
fix docs and csharp tests
Browse files Browse the repository at this point in the history
  • Loading branch information
headshog committed Apr 2, 2024
1 parent 4101879 commit 0a6f36d
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ Create report from JavaScript:

Create report from C#:

$ casr-csharp -o csharp.casrep -- dotnet run --project casr/tests/casr_tests/csharp/test_casr_csharp.csproj
$ casr-csharp -o csharp.casrep -- dotnet run --project casr/tests/casr_tests/csharp/test_casr_csharp/test_casr_csharp.csproj

View report:

Expand Down Expand Up @@ -205,7 +205,7 @@ Triage crashes after Sharpfuzz fuzzing with casr-afl:

$ cp -r casr/tests/casr_tests/csharp/test_casr_afl_csharp /tmp/test_casr_afl_csharp
$ cp -r casr/tests/casr_tests/csharp/test_casr_afl_csharp_module /tmp/test_casr_afl_csharp_module
$ dotnet publish -o /tmp/test_casr_afl_csharp/bin
$ dotnet publish /tmp/test_casr_afl_csharp/test_casr_afl_csharp.csproj -o /tmp/test_casr_afl_csharp/bin
$ casr-afl -i casr/tests/casr_tests/casrep/afl-out-sharpfuzz -o casr/tests/tmp_tests_casr/casr_afl_csharp_out
$ # You may force your own run arguments using --ignore-cmdline
$ casr-afl --ignore-cmdline -i casr/tests/casr_tests/casrep/afl-out-sharpfuzz -o casr/tests/tmp_tests_casr/casr_afl_csharp_out -- dotnet run --no-build --project /tmp/test_casr_afl_csharp/test_casr_afl_csharp.csproj @@
Expand Down
4 changes: 2 additions & 2 deletions casr/tests/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5672,8 +5672,8 @@ fn test_casr_libfuzzer_jazzer_js_xml2js() {
#[cfg(target_arch = "x86_64")]
fn test_casr_csharp() {
let paths = [
abs_path("tests/casr_tests/csharp/test_casr_csharp.cs"),
abs_path("tests/casr_tests/csharp/test_casr_csharp.csproj"),
abs_path("tests/casr_tests/csharp/test_casr_csharp/test_casr_csharp.cs"),
abs_path("tests/casr_tests/csharp/test_casr_csharp/test_casr_csharp.csproj"),
abs_path("tests/tmp_tests_casr/test_casr_csharp"),
abs_path("tests/tmp_tests_casr/test_casr_csharp/test_casr_csharp.cs"),
abs_path("tests/tmp_tests_casr/test_casr_csharp/test_casr_csharp.csproj"),
Expand Down
20 changes: 10 additions & 10 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Create CASR reports (.casrep) from gdb execution
Usage: casr-gdb [OPTIONS] <--stdout|--output <REPORT>> -- <ARGS>...

Arguments:
[ARGS]... Add "-- ./binary <arguments>" to run executable
<ARGS>... Add "-- ./binary <arguments>" to run executable

Options:
-o, --output <REPORT> Path to save report. Path can be a directory, then report
Expand All @@ -55,7 +55,7 @@ Create CASR reports (.casrep) from AddressSanitizer reports
Usage: casr-san [OPTIONS] <--stdout|--output <REPORT>> -- <ARGS>...

Arguments:
[ARGS]... Add "-- ./binary <arguments>" to run executable
<ARGS>... Add "-- ./binary <arguments>" to run executable

Options:
-o, --output <REPORT> Path to save report. Path can be a directory, then report
Expand Down Expand Up @@ -93,7 +93,7 @@ Triage errors found by UndefinedBehaviorSanitizer and create CASR reports (.casr
Usage: casr-ubsan [OPTIONS] --input <INPUT_DIRS>... --output <OUTPUT_DIR> -- <ARGS>...

Arguments:
[ARGS]... Add "-- <path> <arguments>" to run
<ARGS>... Add "-- <path> <arguments>" to run

Options:
-l, --log-level <log-level> Logging level [default: info] [possible values: info,
Expand Down Expand Up @@ -130,7 +130,7 @@ Create CASR reports (.casrep) from python reports
Usage: casr-python [OPTIONS] <--stdout|--output <REPORT>> -- <ARGS>...

Arguments:
[ARGS]... Add "-- <path> <arguments>" to run
<ARGS>... Add "-- <path> <arguments>" to run

Options:
-o, --output <REPORT> Path to save report. Path can be a directory, then report
Expand All @@ -156,7 +156,7 @@ Create CASR reports (.casrep) from java reports
Usage: casr-java [OPTIONS] <--stdout|--output <REPORT>> -- <ARGS>...

Arguments:
[ARGS]... Add "-- <path> <arguments>" to run
<ARGS>... Add "-- <path> <arguments>" to run

Options:
-o, --output <REPORT> Path to save report. Path can be a directory, then report
Expand Down Expand Up @@ -185,7 +185,7 @@ Create CASR reports (.casrep) from JavaScript crash reports
Usage: casr-js [OPTIONS] <--stdout|--output <REPORT>> -- <ARGS>...

Arguments:
[ARGS]... Add "-- <path> <arguments>" to run
<ARGS>... Add "-- <path> <arguments>" to run

Options:
-o, --output <REPORT> Path to save report. Path can be a directory, then report
Expand All @@ -212,7 +212,7 @@ Create CASR reports (.casrep) from C# reports
Usage: casr-csharp [OPTIONS] <--stdout|--output <REPORT>> -- <ARGS>...

Arguments:
[ARGS]... Add "-- <path> <arguments>" to run
<ARGS>... Add "-- <path> <arguments>" to run

Options:
-o, --output <REPORT> Path to save report. Path can be a directory, then report name
Expand All @@ -228,7 +228,7 @@ Create CASR reports (.casrep) from C# reports

Run casr-csharp:

$ casr-csharp -o csharp.casrep -- dotnet run --project casr/tests/casr_tests/csharp/test_casr_csharp.csproj
$ casr-csharp -o csharp.casrep -- dotnet run --project casr/tests/casr_tests/csharp/test_casr_csharp/test_casr_csharp.csproj

## casr-core

Expand Down Expand Up @@ -552,7 +552,7 @@ Sharpfuzz example:

$ cp -r casr/tests/casr_tests/csharp/test_casr_afl_csharp /tmp/test_casr_afl_csharp
$ cp -r casr/tests/casr_tests/csharp/test_casr_afl_csharp_module /tmp/test_casr_afl_csharp_module
$ dotnet publish -o /tmp/test_casr_afl_csharp/bin
$ dotnet publish /tmp/test_casr_afl_csharp/test_casr_afl_csharp.csproj -o /tmp/test_casr_afl_csharp/bin
$ casr-afl -i casr/tests/casr_tests/casrep/afl-out-sharpfuzz -o casr/tests/tmp_tests_casr/casr_afl_csharp_out

Sharpfuzz example (with --ignore-cmdline):
Expand All @@ -573,7 +573,7 @@ Triage crashes found by libFuzzer based fuzzer
Usage: casr-libfuzzer [OPTIONS] --output <OUTPUT_DIR> -- <ARGS>...

Arguments:
[ARGS]... Add "-- ./fuzz_target <arguments>"
<ARGS>... Add "-- ./fuzz_target <arguments>"

Options:
-l, --log-level <log-level>
Expand Down

0 comments on commit 0a6f36d

Please sign in to comment.