Skip to content

Commit

Permalink
fix ld_preload + wget bug
Browse files Browse the repository at this point in the history
  • Loading branch information
kbhargava-jump committed Nov 5, 2024
1 parent 79708af commit 04aa3b2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ $ solana-test-suite debug-mismatches [OPTIONS]
* `-t, --target PATH`: Shared object (.so) target file paths (pairs with --keep-passing). Targets must have required function entrypoints defined [default: impl/lib/libsolfuzz_firedancer.so]
* `-o, --output-dir PATH`: Output directory for messages [default: debug_mismatch]
* `-u, --repro-urls TEXT`: Comma-delimited list of FuzzCorp mismatch links
* `-s, --section-names TEXT`: Comma-delimited list of FuzzCorp section names
* `-n, --section-names TEXT`: Comma-delimited list of FuzzCorp section names
* `-f, --fuzzcorp-url TEXT`: Comma-delimited list of FuzzCorp section names [default: https://api.dev.fuzzcorp.asymmetric.re/uglyweb/firedancer-io/solfuzz/bugs/]
* `-l, --log-level INTEGER`: FD logging level [default: 5]
* `-r, --randomize-output-buffer`: Randomizes bytes in output buffer before shared library execution
Expand Down
7 changes: 6 additions & 1 deletion src/test_suite/test_suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,7 @@ def debug_mismatches(
section_names: str = typer.Option(
"",
"--section-names",
"-s",
"-n",
help="Comma-delimited list of FuzzCorp section names",
),
fuzzcorp_url: str = typer.Option(
Expand Down Expand Up @@ -694,6 +694,8 @@ def debug_mismatches(
].strip()
custom_data_urls.append(custom_url)

ld_preload = os.environ.pop("LD_PRELOAD", None)

num_test_cases = len(custom_data_urls)
print("Downloading tests...")
results = []
Expand All @@ -708,6 +710,9 @@ def debug_mismatches(
):
results.append(result)

if ld_preload is not None:
os.environ["LD_PRELOAD"] = ld_preload

repro_custom = globals.output_dir / "repro_custom"
if repro_custom.exists():
shutil.rmtree(repro_custom)
Expand Down

0 comments on commit 04aa3b2

Please sign in to comment.