Skip to contentSkip to conversation

kseltest/cgroup: Make test_stress.sh work if run interactively

PATCH Applied Waiman Long 3 participants 3 messages May 13, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kseltest/cgroup: Make test_stress.sh work if run interactively

Commit 54de76c01239 ("kselftest/cgroup: fix test_stress.sh to use OUTPUT dir") changes the test_core command path from . to $OUTPUT. However, variable OUTPUT may not be defined if the command is run interactively. Fix that by using ${OUTPUT:-.} to cover both cases.

---
 tools/testing/selftests/cgroup/test_stress.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/cgroup/test_stress.sh +1 -1
index 109c044f715f..3c9c4554d5f6 100755
@@ -1,4 +1,4 @@
 #!/bin/bash
 # SPDX-License-Identifier: GPL-2.0
 
-./with_stress.sh -s subsys -s fork ${OUTPUT}/test_core
+./with_stress.sh -s subsys -s fork ${OUTPUT:-.}/test_core
Signature · 1 line
2.27.0
maintainer Applied
#1 lore raw
Quoted 6 lines · Waiman Long

Commit 54de76c01239 ("kselftest/cgroup: fix test_stress.sh to use OUTPUT dir") changes the test_core command path from . to $OUTPUT. However, variable OUTPUT may not be defined if the command is run interactively. Fix that by using ${OUTPUT:-.} to cover both cases.

Applied to cgroup/for-5.19.

Thanks, much appreciated.

Signature · 1 line
tejun
#2 lore raw
In reply to Waiman Long
Quoted 23 lines · On Fri, May 13, 2022 at 03:09:28PM -0400 Waiman Long wrote:

Commit 54de76c01239 ("kselftest/cgroup: fix test_stress.sh to use OUTPUT dir") changes the test_core command path from . to $OUTPUT. However, variable OUTPUT may not be defined if the command is run interactively. Fix that by using ${OUTPUT:-.} to cover both cases.

---
 tools/testing/selftests/cgroup/test_stress.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/cgroup/test_stress.sh +1 -1
index 109c044f715f..3c9c4554d5f6 100755
@@ -1,4 +1,4 @@
 #!/bin/bash
 # SPDX-License-Identifier: GPL-2.0
 
-./with_stress.sh -s subsys -s fork ${OUTPUT}/test_core
+./with_stress.sh -s subsys -s fork ${OUTPUT:-.}/test_core
Signature · 1 line
2.27.0

Thanks Waiman! I did not think to try manually running it.

Cheers,
Phil