summaryrefslogtreecommitdiffstats
path: root/tests/ts/kill
diff options
context:
space:
mode:
authorRuediger Meier2014-05-06 18:48:35 +0200
committerRuediger Meier2014-05-06 19:29:03 +0200
commit8d4d36e287790f8b121d06dc200ec52337a143b5 (patch)
treeb8272e3e0d42b0649f7fe90ebb191661816e1384 /tests/ts/kill
parenttests: add kill_functions.sh to avoid duplicate code (diff)
downloadkernel-qcow2-util-linux-8d4d36e287790f8b121d06dc200ec52337a143b5.tar.gz
kernel-qcow2-util-linux-8d4d36e287790f8b121d06dc200ec52337a143b5.tar.xz
kernel-qcow2-util-linux-8d4d36e287790f8b121d06dc200ec52337a143b5.zip
tests: kill_functions.sh needs gawk (skip if sourced)
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
Diffstat (limited to 'tests/ts/kill')
-rw-r--r--tests/ts/kill/kill_functions.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/ts/kill/kill_functions.sh b/tests/ts/kill/kill_functions.sh
index 043b4cb4f..73fff053d 100644
--- a/tests/ts/kill/kill_functions.sh
+++ b/tests/ts/kill/kill_functions.sh
@@ -1,11 +1,14 @@
+# unfortunately we are using gawk features
+type gawk >/dev/null 2>&1 || ts_skip "cannot find gawk"
+
# The test_sigreceive is ready when signal process mask contains SIGHUP
function check_test_sigreceive {
local rc=0
local pid=$1
for i in 0.01 0.1 1 1 1 1; do
- awk 'BEGIN { retval=1 }
+ gawk 'BEGIN { retval=1 }
/^SigCgt/ {
lbyte = strtonum("0x" substr($2, 16, 16))
if (and(lbyte, 1)) {