diff options
author | Craig Small <csmall@dropbear.xyz> | 2020-04-28 19:40:07 +1000 |
---|---|---|
committer | Craig Small <csmall@dropbear.xyz> | 2020-05-11 16:59:18 +1000 |
commit | 557fda8f980c9b12bcdad995077d774fb6b17cb1 (patch) | |
tree | baffdeebbe3c57054b8bd671e707c201abe0b4a7 /testsuite/kill.test | |
parent | 89392e67a94303fea234e6c1b2c1b298e2eade48 (diff) | |
download | procps-ng-557fda8f980c9b12bcdad995077d774fb6b17cb1.tar.gz |
build-sys: Enable testing of sigqueue
The referenced commits enavled both pkill and kill to send an integer to
the killed or signalled process. The test_process now will report on the
integer if sent and the testsuite changes take advantage of this
new feature.
Another process make/destroy set had to be made as using spawn
instead of exec changes both the SID and TTY for the underlying
process, making other tests fail.
References:
commit 7d55409b82602dac540c011000c9c5abedb5158a
commit 2b804a532a90a98bccc5255a728da9076a5e4f4f
Diffstat (limited to 'testsuite/kill.test')
-rw-r--r-- | testsuite/kill.test/kill.exp | 41 |
1 files changed, 18 insertions, 23 deletions
diff --git a/testsuite/kill.test/kill.exp b/testsuite/kill.test/kill.exp index 1948517..2032e0e 100644 --- a/testsuite/kill.test/kill.exp +++ b/testsuite/kill.test/kill.exp @@ -45,26 +45,21 @@ set test "kill convert signal number to name with space" spawn $kill -l 1 expect_pass "$test" "^HUP\\s*" -#set test "kill numbered process" -#make_testproc -#if { [ file isdirectory "/proc/$testproc1_pid" ] && [ file isdirectory "/proc/$testproc2_pid" ] } { -#} else { -# perror "Could not start test processes" -#} -#exec $kill -KILL $testproc1_pid -#wait -#if { [ file exists "/proc/$testproc1_pid" ] } { -# exec kill $testproc2_pid -# fail "$test (proc 1 exists)" -#} else { -# exec $kill -KILL $testproc2_pid -# wait -# if { [ file exists "/proc/$testproc2_pid" ] } { -# exec kill $testproc2_pid -# fail "$test (proc 2 exists)" -# } else { -# pass "$test" -# } -#} -## Cleanup -#exec rm $testproc_path +make_pipeproc + +set test "kill with SIGUSR1" +spawn $kill -USR1 $pipeproc_pid +expect_blank_continue "$test" +expect_pipeproc_pass "$test" "SIG SIGUSR1" + +set test "kill with long SIGUSR2" +spawn $kill -s SIGUSR2 $pipeproc_pid +expect_blank_continue "$test" +expect_pipeproc_pass "$test" "SIG SIGUSR2" + +set test "kill with queued int" +spawn $kill -USR1 -q 42 $pipeproc_pid +expect_blank_continue "$test" +expect_pipeproc_pass "$test" "SIG SIGUSR1 value=42" + +kill_pipeproc |