summaryrefslogtreecommitdiffstats
path: root/tests/ts/ipcs
diff options
context:
space:
mode:
authorRuediger Meier2014-05-15 11:24:59 +0200
committerRuediger Meier2014-05-15 12:48:35 +0200
commit12826d4c20358a2e096b0df8e34dfb0fa88c5b21 (patch)
treea58ebc33e776045a827e205c5b2b5e7edfab3fa8 /tests/ts/ipcs
parenttests: add function ts_check_prog (diff)
downloadkernel-qcow2-util-linux-12826d4c20358a2e096b0df8e34dfb0fa88c5b21.tar.gz
kernel-qcow2-util-linux-12826d4c20358a2e096b0df8e34dfb0fa88c5b21.tar.xz
kernel-qcow2-util-linux-12826d4c20358a2e096b0df8e34dfb0fa88c5b21.zip
tests: consolidate some checks for commands
Use ts_check_prog for mdadm, readelf, file, ntpdate, bc (mdadm was not always checked so far). There are some positive side-effects. We are using always $PATH now instead of randomly hardcoded /usr/bin, /sbin, etc. If we ever want to change this again, we should do this generically in ts_init. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
Diffstat (limited to 'tests/ts/ipcs')
-rwxr-xr-xtests/ts/ipcs/limits2
-rwxr-xr-xtests/ts/ipcs/limits23
2 files changed, 2 insertions, 3 deletions
diff --git a/tests/ts/ipcs/limits b/tests/ts/ipcs/limits
index 71980b533..851d4edfa 100755
--- a/tests/ts/ipcs/limits
+++ b/tests/ts/ipcs/limits
@@ -26,7 +26,7 @@ ts_init "$*"
ts_check_test_command "$TS_CMD_IPCS"
ts_skip_nonroot
-type bc >/dev/null 2>&1 || ts_skip "cannot find bc command"
+ts_check_prog "bc"
. $TS_SELF/functions.sh
diff --git a/tests/ts/ipcs/limits2 b/tests/ts/ipcs/limits2
index ea90174b9..23331985e 100755
--- a/tests/ts/ipcs/limits2
+++ b/tests/ts/ipcs/limits2
@@ -23,8 +23,7 @@ TS_DESC="basic limits"
ts_init "$*"
ts_check_test_command "$TS_CMD_IPCS"
-
-type bc >/dev/null 2>&1 || ts_skip "cannot find bc command"
+ts_check_prog "bc"
. $TS_SELF/functions.sh