[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Mon, 1 Jan 2024 13:36:13 +0500
From: Muhammad Usama Anjum <usama.anjum@...labora.com>
To: Andrew Morton <akpm@...ux-foundation.org>,
Shuah Khan <shuah@...nel.org>
Cc: Muhammad Usama Anjum <usama.anjum@...labora.com>,
kernel@...labora.com,
linux-mm@...ck.org,
linux-kselftest@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH 2/2] 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.
Signed-off-by: Muhammad Usama Anjum <usama.anjum@...labora.com>
---
tools/testing/selftests/mm/compaction_test.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/mm/compaction_test.c b/tools/testing/selftests/mm/compaction_test.c
index 707b0809b717..656afba02dbc 100644
--- a/tools/testing/selftests/mm/compaction_test.c
+++ b/tools/testing/selftests/mm/compaction_test.c
@@ -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);
--
2.42.0
Powered by blists - more mailing lists