From bd4f50f0441330259c437f3cfc4a779c01d90617 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 30 May 2017 10:47:06 +0200 Subject: [PATCH] tests: make /proc optional Reported-by: Assaf Gordon Signed-off-by: Karel Zak --- tests/ts/libmount/utils | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/tests/ts/libmount/utils b/tests/ts/libmount/utils index 3ace0ec73d..47f5163368 100755 --- a/tests/ts/libmount/utils +++ b/tests/ts/libmount/utils @@ -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 -- 2.47.2