citrun

watch C/C++ source code execute
Log | Files | Refs | LICENSE

commit 99763dcedf7dab57fb057bcc526b5da038e28c41
parent 72a8e56bb0a7bcf3d6bcd3380c213ea7cfa63cd3
Author: Kyle Milz <kyle@0x30.net>
Date:   Tue, 23 Aug 2016 23:33:27 -0600

t: remove USR1 signal handling

Diffstat:
Mt/rt_exectotals.sh | 2+-
Mt/rt_file_names.sh | 2+-
Mt/rt_header.sh | 2+-
Mtest/project.sh | 8--------
4 files changed, 3 insertions(+), 11 deletions(-)

diff --git a/t/rt_exectotals.sh b/t/rt_exectotals.sh @@ -13,5 +13,5 @@ $TEST_TOOLS/citrun-dump -t > execs.out sort -n execs.out > execs.sorted test_diff 3 "executions strictly increasing" execs.sorted execs.out -kill -USR1 $pid +kill $pid wait diff --git a/t/rt_file_names.sh b/t/rt_file_names.sh @@ -9,7 +9,7 @@ echo 1..2 $TEST_TOOLS/citrun-dump -f > filelist.out cat <<EOF > filelist.good -one.c 34 +one.c 26 three.c 9 two.c 11 EOF diff --git a/t/rt_header.sh b/t/rt_header.sh @@ -12,7 +12,7 @@ cat <<EOF | sed -e "s,%PID%,$pid," -e "s,%CWD%,`pwd -P`," > dump.good Found dead program with PID '%PID%' Runtime version: 0.0 Translation units: 3 - Lines of code: 54 + Lines of code: 46 Working directory: '%CWD%' EOF diff --git a/test/project.sh b/test/project.sh @@ -3,7 +3,6 @@ cat <<EOF > one.c #include <err.h> -#include <signal.h> #include <stdlib.h> long long fib(long long); @@ -18,18 +17,11 @@ usr1_sig(int signal) int main(int argc, char *argv[]) { - struct sigaction sa; long long n; if (argc != 2) errx(1, "argc != 2"); - sa.sa_handler = &usr1_sig; - sa.sa_flags = SA_RESTART; - sigfillset(&sa.sa_mask); - if (sigaction(SIGUSR1, &sa, NULL) == -1) - err(1, "sigaction"); - n = atoi(argv[1]); print_output(fib(n));