]> git.proxmox.com Git - ceph.git/blame - ceph/src/jaegertracing/opentelemetry-cpp/third_party/nlohmann-json/test/thirdparty/Fuzzer/test/fuzzer-jobs.test
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / jaegertracing / opentelemetry-cpp / third_party / nlohmann-json / test / thirdparty / Fuzzer / test / fuzzer-jobs.test
CommitLineData
1e59de90
TL
1RUN: rm -rf %tmp
2RUN: mkdir %tmp && cd %tmp
3# Create a shared corpus directory
4RUN: rm -rf FuzzerJobsTestCORPUS
5RUN: mkdir FuzzerJobsTestCORPUS
6RUN: rm -f fuzz-{0,1}.log
7# Start fuzzer and in parallel check that the output files
8# that should be created exist.
9RUN: LLVMFuzzer-EmptyTest -max_total_time=4 -jobs=2 -workers=2 FuzzerJobsTestCORPUS > %t-fuzzer-jobs-test.log 2>&1 & export FUZZER_PID=$!
10# Wait a short while to give time for the child processes
11# to start fuzzing
12RUN: sleep 2
13# If the instances are running in parallel they should have created their log
14# files by now.
15RUN: ls fuzz-0.log
16RUN: ls fuzz-1.log
17# Wait for libfuzzer to finish.
18# This probably isn't portable but we need a way to block until
19# the fuzzer is done otherwise we might remove the files while
20# they are being used.
21RUN: while kill -0 ${FUZZER_PID}; do : ; done
22RUN: rm -f fuzz-{0,1}.log
23RUN: rm -rf FuzzerJobsTestCORPUS
24RUN: FileCheck -input-file=%t-fuzzer-jobs-test.log %s
25RUN: rm %t-fuzzer-jobs-test.log
26RUN: cd ../
27
28CHECK-DAG: Job 0 exited with exit code 0
29CHECK-DAG: Job 1 exited with exit code 0