]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
tests: make /proc optional
authorKarel Zak <kzak@redhat.com>
Tue, 30 May 2017 08:47:06 +0000 (10:47 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 30 May 2017 09:03:28 +0000 (11:03 +0200)
Reported-by: Assaf Gordon <assafgordon@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
tests/ts/libmount/utils

index 3ace0ec73dcc31044de71ffb6947df916d6920a1..47f5163368a19f5435dbd500c8ffc2f3f0d18449 100755 (executable)
@@ -53,12 +53,20 @@ ts_valgrind $TESTPROG --ends-with "AAAbbbCCC" "CCC" &> $TS_OUTPUT
 ts_finalize_subtest
 
 ts_init_subtest "mountpoint"
-ts_valgrind $TESTPROG --mountpoint /proc &> $TS_OUTPUT
-ts_finalize_subtest
+if [ -d /proc ]; then
+       ts_valgrind $TESTPROG --mountpoint /proc &> $TS_OUTPUT
+       ts_finalize_subtest
+else
+       ts_skip_subtest "no /proc"
+fi
 
 ts_init_subtest "mountpoint-subdir"
-ts_valgrind $TESTPROG --mountpoint /proc/sys/kernel &> $TS_OUTPUT
-ts_finalize_subtest
+if [ -d /proc/sys/kernel ]; then
+       ts_valgrind $TESTPROG --mountpoint /proc/sys/kernel &> $TS_OUTPUT
+       ts_finalize_subtest
+else
+       ts_skip_subtest "no /proc"
+fi
 
 ts_init_subtest "mountpoint-root"
 ts_valgrind $TESTPROG --mountpoint / &> $TS_OUTPUT