mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-07 13:53:24 +00:00
selftests/mm: skip test if application doesn't has root privileges
The test depends on writing to nr_hugepages which isn't possible without root privileges. So skip the test in this case. Link: https://lkml.kernel.org/r/20240101083614.1076768-2-usama.anjum@collabora.com Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com> Cc: Shuah Khan <shuah@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
parent
9a21701edc
commit
8c9eea721a
@ -173,7 +173,7 @@ int main(int argc, char **argv)
|
||||
|
||||
ksft_print_header();
|
||||
|
||||
if (prereq() != 0)
|
||||
if (prereq() || geteuid())
|
||||
return ksft_exit_pass();
|
||||
|
||||
ksft_set_plan(1);
|
||||
|
Loading…
Reference in New Issue
Block a user