[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.

llvm-svn: 360835
This commit is contained in:
Matt Morehouse 2019-05-16 01:32:39 +00:00
parent 29ff0f2519
commit ab10de8bab
2 changed files with 4 additions and 4 deletions

View File

@ -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

View File

@ -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