[compiler-rt] r360835 - [libFuzzer] Use PID to send signals rather than process name.
Matt Morehouse via llvm-commits
llvm-commits at lists.llvm.org
Wed May 15 18:32:40 PDT 2019
Author: morehouse
Date: Wed May 15 18:32:39 2019
New Revision: 360835
URL: http://llvm.org/viewvc/llvm-project?rev=360835&view=rev
Log:
[libFuzzer] Use PID to send signals rather than process name.
pkill reads the process name as a pattern, not a raw name. This means
that if the process name contains + or other regex characters, pkill
fails.
Modified:
compiler-rt/trunk/test/fuzzer/fork-sigusr.test
compiler-rt/trunk/test/fuzzer/merge-sigusr.test
Modified: compiler-rt/trunk/test/fuzzer/fork-sigusr.test
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/fuzzer/fork-sigusr.test?rev=360835&r1=360834&r2=360835&view=diff
==============================================================================
--- compiler-rt/trunk/test/fuzzer/fork-sigusr.test (original)
+++ compiler-rt/trunk/test/fuzzer/fork-sigusr.test Wed May 15 18:32:39 2019
@@ -5,9 +5,9 @@ RUN: rm -rf %t
RUN: mkdir -p %t
RUN: %cpp_compiler %S/ShallowOOMDeepCrash.cpp -o %t/ForkSIGUSR
-RUN: %run %t/ForkSIGUSR -fork=3 -rss_limit_mb=128 -ignore_crashes=1 2>&1 | tee %t/log & :
+RUN: %run %t/ForkSIGUSR -fork=3 -rss_limit_mb=128 -ignore_crashes=1 2>%t/log & export PID=$!
RUN: sleep 3
-RUN: pkill -SIGUSR2 -f %t/ForkSIGUSR
+RUN: kill -SIGUSR2 $PID
RUN: sleep 6
RUN: cat %t/log | FileCheck %s
Modified: compiler-rt/trunk/test/fuzzer/merge-sigusr.test
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/fuzzer/merge-sigusr.test?rev=360835&r1=360834&r2=360835&view=diff
==============================================================================
--- compiler-rt/trunk/test/fuzzer/merge-sigusr.test (original)
+++ compiler-rt/trunk/test/fuzzer/merge-sigusr.test Wed May 15 18:32:39 2019
@@ -15,9 +15,9 @@ RUN: echo e > %t/C2/e
RUN: echo f > %t/C2/f
RUN: echo g > %t/C2/g
-RUN: %run %t/LFSIGUSR -merge=1 -merge_control_file=%t/MCF %t/C1 %t/C2 2>&1 | tee %t/log & :
+RUN: %run %t/LFSIGUSR -merge=1 -merge_control_file=%t/MCF %t/C1 %t/C2 2>%t/log 2>%t/log & export PID=$!
RUN: sleep 3
-RUN: pkill -SIGUSR2 -f %t/LFSIGUSR
+RUN: pkill -SIGUSR2 -P $PID
RUN: sleep 3
RUN: cat %t/log | FileCheck %s
RUN: grep C2/g %t/MCF
More information about the llvm-commits
mailing list