summaryrefslogtreecommitdiffstats
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.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/testing/selftests/zram/zram_lib.sh b/tools/testing/selftests/zram/zram_lib.sh
index 3b6abf1942d7..424e68ed1487 100755
--- a/tools/testing/selftests/zram/zram_lib.sh
+++ b/tools/testing/selftests/zram/zram_lib.sh
@@ -20,6 +20,16 @@ dev_mounted=-1
trap INT
+check_prereqs()
+{
+ local msg="skip all tests:"
+
+ if [ $UID != 0 ]; then
+ echo $msg must be run as root >&2
+ exit 0
+ fi
+}
+
zram_cleanup()
{
echo "zram cleanup"