From b78a8da7a4d77b7649da647b30efeff9f8275031 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 27 May 2009 15:20:01 +0200 Subject: [PATCH] tests: don't run some mount tests for non-root users Signed-off-by: Karel Zak --- tests/functions.sh | 6 +++--- tests/ts/mount/noncanonical | 1 + tests/ts/mount/paths | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/functions.sh b/tests/functions.sh index b2e17f3c..d07b7e31 100644 --- a/tests/functions.sh +++ b/tests/functions.sh @@ -153,7 +153,7 @@ function ts_init_subtest { [ $TS_NSUBTESTS -eq 0 ] && echo TS_NSUBTESTS=$(( $TS_NSUBTESTS + 1 )) - printf "%18s: %-27s ..." "" "$TS_SUBNAME" + printf "%16s: %-27s ..." "" "$TS_SUBNAME" } function ts_init { @@ -161,7 +161,7 @@ function ts_init { ts_init_env "$*" - printf "%15s: %-30s ..." "$TS_COMPONENT" "$TS_DESC" + printf "%13s: %-30s ..." "$TS_COMPONENT" "$TS_DESC" [ "$is_fake" == "yes" ] && ts_skip "fake mode" } @@ -218,7 +218,7 @@ function ts_finalize { done if [ $TS_NSUBTESTS -ne 0 ]; then - printf "%13s..." + printf "%11s..." if [ $TS_NSUBFAILED -ne 0 ]; then ts_failed "$TS_NSUBFAILED from $TS_NSUBTESTS sub-tests" else diff --git a/tests/ts/mount/noncanonical b/tests/ts/mount/noncanonical index d9be68be..31149923 100755 --- a/tests/ts/mount/noncanonical +++ b/tests/ts/mount/noncanonical @@ -20,6 +20,7 @@ TS_DESC="non canonical path" . $TS_TOPDIR/functions.sh ts_init "$*" +ts_skip_nonroot [ ! -e "/etc" ] && ts_skip "/etc not such file of directory" diff --git a/tests/ts/mount/paths b/tests/ts/mount/paths index 93b44ae9..bb2cabf3 100755 --- a/tests/ts/mount/paths +++ b/tests/ts/mount/paths @@ -20,6 +20,7 @@ TS_DESC="basic paths" . $TS_TOPDIR/functions.sh ts_init "$*" +ts_skip_nonroot $TS_CMD_MOUNT -n -f -v -v -v /dev/dummy /mnt &> $TS_OUTPUT -- 2.39.5