mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-30 19:42:00 +00:00
Merge pull request #72191 from ClickHouse/ci-libfuzzer-adjustments
CI: some adjustments to libfuzzer
This commit is contained in:
commit
4c55f0c38d
@ -18,7 +18,6 @@ add_library(_protobuf-mutator
|
||||
target_include_directories(_protobuf-mutator BEFORE PUBLIC "${LIBRARY_DIR}/src")
|
||||
# ... which includes <port/protobuf.h>
|
||||
target_include_directories(_protobuf-mutator BEFORE PUBLIC "${LIBRARY_DIR}")
|
||||
target_include_directories(_protobuf-mutator BEFORE PUBLIC "${ClickHouse_SOURCE_DIR}/contrib/protobuf/src")
|
||||
|
||||
target_link_libraries(_protobuf-mutator ch_contrib::protobuf)
|
||||
|
||||
|
@ -274,6 +274,7 @@ class CI:
|
||||
build_config=BuildConfig(
|
||||
name=BuildNames.FUZZERS,
|
||||
compiler="clang-19",
|
||||
sanitizer="address",
|
||||
package_type="fuzzers",
|
||||
),
|
||||
run_by_labels=[Tags.libFuzzer],
|
||||
@ -545,7 +546,7 @@ class CI:
|
||||
JobNames.LIBFUZZER_TEST: JobConfig(
|
||||
required_builds=[BuildNames.FUZZERS],
|
||||
run_by_labels=[Tags.libFuzzer],
|
||||
timeout=5400,
|
||||
timeout=10800,
|
||||
run_command='libfuzzer_test_check.py "$CHECK_NAME"',
|
||||
runner_type=Runners.FUNC_TESTER,
|
||||
),
|
||||
|
@ -21,7 +21,7 @@ from s3_helper import S3Helper
|
||||
from stopwatch import Stopwatch
|
||||
from tee_popen import TeePopen
|
||||
|
||||
TIMEOUT = 60
|
||||
TIMEOUT = 60 * 5
|
||||
NO_CHANGES_MSG = "Nothing to run"
|
||||
s3 = S3Helper()
|
||||
|
||||
@ -286,7 +286,15 @@ def main():
|
||||
retcode = process.wait()
|
||||
if retcode == 0:
|
||||
logging.info("Run successfully")
|
||||
if (
|
||||
pr_info.number == 0
|
||||
and pr_info.base_ref == "master"
|
||||
and pr_info.head_ref == "master"
|
||||
):
|
||||
logging.info("Uploading corpus - running in master")
|
||||
upload_corpus(fuzzers_path)
|
||||
else:
|
||||
logging.info("Not uploading corpus - running in PR")
|
||||
else:
|
||||
logging.info("Run failed")
|
||||
|
||||
|
@ -30,7 +30,13 @@ class Stopwatch:
|
||||
|
||||
|
||||
def run_fuzzer(fuzzer: str, timeout: int):
|
||||
logging.info("Running fuzzer %s...", fuzzer)
|
||||
timeout_hard = timeout + 60
|
||||
logging.info(
|
||||
"Running fuzzer %s for %d seconds (hard timeout is %d)...",
|
||||
fuzzer,
|
||||
timeout,
|
||||
timeout_hard,
|
||||
)
|
||||
|
||||
seed_corpus_dir = f"{fuzzer}.in"
|
||||
with Path(seed_corpus_dir) as path:
|
||||
@ -89,6 +95,8 @@ def run_fuzzer(fuzzer: str, timeout: int):
|
||||
custom_libfuzzer_options += f" -dict={fuzzer}.dict"
|
||||
custom_libfuzzer_options += f" -exact_artifact_path={exact_artifact_path}"
|
||||
|
||||
custom_libfuzzer_options += f" -timeout={timeout}"
|
||||
|
||||
libfuzzer_corpora = f"{active_corpus_dir} {seed_corpus_dir}"
|
||||
|
||||
cmd_line = f"{DEBUGGER} ./{fuzzer} {fuzzer_arguments}"
|
||||
@ -115,7 +123,7 @@ def run_fuzzer(fuzzer: str, timeout: int):
|
||||
check=True,
|
||||
shell=False,
|
||||
errors="replace",
|
||||
timeout=timeout,
|
||||
timeout=timeout_hard,
|
||||
env=env,
|
||||
)
|
||||
except subprocess.CalledProcessError:
|
||||
|
Loading…
Reference in New Issue
Block a user