summaryrefslogtreecommitdiffstats
path: root/tests/ts/hwclock
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/hwclock
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/hwclock')
-rwxr-xr-xtests/ts/hwclock/systohc4
1 files changed, 1 insertions, 3 deletions
diff --git a/tests/ts/hwclock/systohc b/tests/ts/hwclock/systohc
index 8a3eccaf4..a2df4fd9b 100755
--- a/tests/ts/hwclock/systohc
+++ b/tests/ts/hwclock/systohc
@@ -26,9 +26,7 @@ ts_init "$*"
ts_check_test_command "$TS_CMD_HWCLOCK"
ts_skip_nonroot
-
-PATH='/usr/sbin:/usr/bin:/sbin:/bin'
-type ntpdate >/dev/null 2>&1 || ts_skip "cannot find ntpdate command"
+ts_check_prog "ntpdate"
set -o pipefail