rename to clickhouse_fuzzer, fix

This commit is contained in:
Yakov Olkhovskiy 2024-10-20 18:38:35 +00:00
parent 5c3e9efdaf
commit f2b741202d
2 changed files with 6 additions and 3 deletions

View File

@ -1,5 +1,8 @@
#!/bin/bash -eu
# rename clickhouse
mv $OUT/clickhouse $OUT/clickhouse_fuzzer
# copy fuzzer options and dictionaries
cp $SRC/tests/fuzz/*.dict $OUT/
cp $SRC/tests/fuzz/*.options $OUT/

View File

@ -113,7 +113,7 @@ def run_fuzzer(fuzzer: str, timeout: int):
stopwatch = Stopwatch()
try:
with open(out_path, "wb") as out:
result = subprocess.run(
subprocess.run(
cmd_line,
stderr=out,
stdout=subprocess.DEVNULL,
@ -123,12 +123,12 @@ def run_fuzzer(fuzzer: str, timeout: int):
errors="replace",
timeout=timeout,
)
except subprocess.CalledProcessError as e:
except subprocess.CalledProcessError:
with open(status_path, "w", encoding="utf-8") as status:
status.write(
f"FAIL\n{stopwatch.start_time_str}\n{stopwatch.duration_seconds}\n"
)
except subprocess.TimeoutExpired as e:
except subprocess.TimeoutExpired:
kill_fuzzer(fuzzer)
sleep(10)
with open(status_path, "w", encoding="utf-8") as status: