summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rwxr-xr-xtests/t0001-statd-basic-mon-unmon.sh3
-rw-r--r--tests/test-lib.sh9
2 files changed, 11 insertions, 1 deletions
diff --git a/tests/t0001-statd-basic-mon-unmon.sh b/tests/t0001-statd-basic-mon-unmon.sh
index 92517a1..e1065e7 100755
--- a/tests/t0001-statd-basic-mon-unmon.sh
+++ b/tests/t0001-statd-basic-mon-unmon.sh
@@ -21,8 +21,9 @@
. ./test-lib.sh
-# This test needs root privileges
+# This test needs root privileges and /dev/log
check_root
+check_dev_log
start_statd
if [ $? -ne 0 ]; then
diff --git a/tests/test-lib.sh b/tests/test-lib.sh
index e47ad13..b62ac2a 100644
--- a/tests/test-lib.sh
+++ b/tests/test-lib.sh
@@ -37,6 +37,15 @@ check_root() {
fi
}
+# Most tests require /dev/log. Skip the test if it doesn't exist in this
+# environment.
+check_dev_log() {
+ if ! [ -e /dev/log ]; then
+ echo "*** Skipping this tests as it requires /dev/log ***"
+ exit 77
+ fi
+}
+
# is lockd registered as a service?
lockd_registered() {
rpcinfo -p | grep -q nlockmgr