Fix device_test to properly fail for non-root user.

This commit is contained in:
Milan Broz
2018-03-01 14:05:51 +01:00
parent 17aefd333a
commit f0f5913efe

View File

@@ -70,12 +70,12 @@ check_sector_size() # $1 expected sector size
fi
}
dm_crypt_features
if [ $(id -u) != 0 ]; then
skip "You must be root to run this test, test skipped."
fi
dm_crypt_features
[ ! -d $MNT_DIR ] && mkdir $MNT_DIR
echo "[1] Using tmpfs for image"