summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/zram/zram_lib.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tools/testing/selftests/zram/zram_lib.sh')
-rwxr-xr-xtools/testing/selftests/zram/zram_lib.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/testing/selftests/zram/zram_lib.sh b/tools/testing/selftests/zram/zram_lib.sh
index f6a9c73e7a44..9e73a4fb9b0a 100755
--- a/tools/testing/selftests/zram/zram_lib.sh
+++ b/tools/testing/selftests/zram/zram_lib.sh
@@ -18,6 +18,9 @@ MODULE=0
dev_makeswap=-1
dev_mounted=-1
+# Kselftest framework requirement - SKIP code is 4.
+ksft_skip=4
+
trap INT
check_prereqs()
@@ -27,7 +30,7 @@ check_prereqs()
if [ $uid -ne 0 ]; then
echo $msg must be run as root >&2
- exit 0
+ exit $ksft_skip
fi
}