From ab10de8bab27cbaf43ecc88606475c56d56fdb75 Mon Sep 17 00:00:00 2001 From: Matt Morehouse Date: Thu, 16 May 2019 01:32:39 +0000 Subject: [PATCH] [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 --- compiler-rt/test/fuzzer/fork-sigusr.test | 4 ++-- compiler-rt/test/fuzzer/merge-sigusr.test | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/compiler-rt/test/fuzzer/fork-sigusr.test b/compiler-rt/test/fuzzer/fork-sigusr.test index 8ec8f00..0737f0d 100644 --- a/compiler-rt/test/fuzzer/fork-sigusr.test +++ b/compiler-rt/test/fuzzer/fork-sigusr.test @@ -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 diff --git a/compiler-rt/test/fuzzer/merge-sigusr.test b/compiler-rt/test/fuzzer/merge-sigusr.test index 9b55b85..83c00a2 100644 --- a/compiler-rt/test/fuzzer/merge-sigusr.test +++ b/compiler-rt/test/fuzzer/merge-sigusr.test @@ -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 -- 2.7.4