mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
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 <ren.tamura.oss@gmail.com> Signed-off-by: Tejun Heo <tj@kernel.org>
This commit is contained in:
parent
7b56cc82e5
commit
7b00d5eecf
|
|
@ -87,7 +87,7 @@ time=0
|
|||
start=$(date +%s)
|
||||
|
||||
while [ $time -lt $duration ] ; do
|
||||
$*
|
||||
"$@"
|
||||
rc=$?
|
||||
[ $rc -eq 0 ] || break
|
||||
time=$(($(date +%s) - $start))
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user