selftests/zram: must be run as root
Adding new functionality check_prereqs() to check test must be run as root Signed-off-by: Naresh Kamboju <naresh.kamboju@linaro.org> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
This commit is contained in:

committed by
Shuah Khan

parent
9fae100cbd
commit
2dfb28e341
@@ -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"
|
||||
|
Reference in New Issue
Block a user