summaryrefslogtreecommitdiff
path: root/tools/testing
diff options
context:
space:
mode:
authorBrendan Jackman <jackmanb@google.com>2025-03-11 16:18:20 +0300
committerAndrew Morton <akpm@linux-foundation.org>2025-03-17 08:06:39 +0300
commite9269b2cc403b7681980e7219cf2dc339fca8d38 (patch)
tree020de26d4c06d738f2147a3b2c4f1826e8d6ccdd /tools/testing
parent32b42970e8614c0b8652fcd441acec937bc2595e (diff)
downloadlinux-e9269b2cc403b7681980e7219cf2dc339fca8d38.tar.xz
selftests/mm: drop unnecessary sudo usage
This script must be run as root anyway (see all the writing to privileged files in /proc etc). Remove the unnecessary use of sudo to avoid breaking on single-user systems that don't have sudo. This also avoids confusing readers. Link: https://lkml.kernel.org/r/20250311-mm-selftests-v4-9-dec210a658f5@google.com Signed-off-by: Brendan Jackman <jackmanb@google.com> Reviewed-by: Dev Jain <dev.jain@arm.com> Cc: Lorenzo Stoakes <lorenzo.stoakes@oracle.com> Cc: Mateusz Guzik <mjguzik@gmail.com> Cc: Shuah Khan <shuah@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'tools/testing')
-rwxr-xr-xtools/testing/selftests/mm/run_vmtests.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/mm/run_vmtests.sh b/tools/testing/selftests/mm/run_vmtests.sh
index 4b5e45a10219..31a576d70b57 100755
--- a/tools/testing/selftests/mm/run_vmtests.sh
+++ b/tools/testing/selftests/mm/run_vmtests.sh
@@ -402,7 +402,7 @@ CATEGORY="madv_populate" run_test ./madv_populate
if [ -x ./memfd_secret ]
then
-(echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope 2>&1) | tap_prefix
+(echo 0 > /proc/sys/kernel/yama/ptrace_scope 2>&1) | tap_prefix
CATEGORY="memfd_secret" run_test ./memfd_secret
fi