Merge remote-tracking branches 'asoc/topic/wm8904', 'asoc/topic/wm8955' and 'asoc...
[firefly-linux-kernel-4.4.55.git] / tools / testing / selftests / zram / zram_lib.sh
index 424e68ed1487d86cd7d6c62e28348251781f6500..f6a9c73e7a442e7988b0820ebc809a342981df91 100755 (executable)
@@ -23,8 +23,9 @@ trap INT
 check_prereqs()
 {
        local msg="skip all tests:"
+       local uid=$(id -u)
 
-       if [ $UID != 0 ]; then
+       if [ $uid -ne 0 ]; then
                echo $msg must be run as root >&2
                exit 0
        fi