From 7b00d5eecfa283d301e5f8c89a6b91d858020f3b Mon Sep 17 00:00:00 2001 From: Ren Tamura Date: Wed, 30 Sep 2026 15:03:34 +0900 Subject: [PATCH] selftests: cgroup: Preserve command arguments in with_stress.sh with_stress.sh invokes the requested command through unquoted $*. This subjects the arguments to word splitting and pathname expansion: arguments containing whitespace are split, empty arguments disappear, and literal wildcard characters can expand to filenames. Invoke the command through "$@" so that the command name and each argument are passed as supplied by the caller. Assisted-by: LLM Signed-off-by: Ren Tamura Signed-off-by: Tejun Heo --- tools/testing/selftests/cgroup/with_stress.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/cgroup/with_stress.sh b/tools/testing/selftests/cgroup/with_stress.sh index e28c35008f5b..a95fb3874644 100755 --- a/tools/testing/selftests/cgroup/with_stress.sh +++ b/tools/testing/selftests/cgroup/with_stress.sh @@ -87,7 +87,7 @@ time=0 start=$(date +%s) while [ $time -lt $duration ] ; do - $* + "$@" rc=$? [ $rc -eq 0 ] || break time=$(($(date +%s) - $start))