Skip to contentSkip to conversation

kselftest/cgroup: fix test_stress.sh to use OUTPUT dir

PATCH Applied Phil Auld 3 participants 7 messages May 12, 2022 – May 13, 2022

Subsystems (2)
lore
Share & tools
lore

Phil Auld

author
#0 lore raw

PATCH 1/1 kselftest/cgroup: fix test_stress.sh to use OUTPUT dir

Running cgroup kselftest with O= fails to run the with_stress test due to hardcoded ./test_core. Find test_core binary using the OUTPUT directory.

Fixes 1a99fcc035fb ("selftests: cgroup: Run test_core under interfering stress")
---
 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 15d9d5896394..109c044f715f 100755
@@ -1,4 +1,4 @@
 #!/bin/bash
 # SPDX-License-Identifier: GPL-2.0
 
-./with_stress.sh -s subsys -s fork ./test_core
+./with_stress.sh -s subsys -s fork ${OUTPUT}/test_core
Signature · 1 line
2.18.0
maintainer Applied
#1 lore raw
Quoted 5 lines · Phil Auld

Running cgroup kselftest with O= fails to run the with_stress test due to hardcoded ./test_core. Find test_core binary using the OUTPUT directory.

Fixes 1a99fcc035fb ("selftests: cgroup: Run test_core under interfering stress")

Applied to cgroup/for-5.19.

Thanks.

Signature · 1 line
tejun
#2 lore raw
In reply to Phil Auld
Quoted 14 lines · Phil Auld

Running cgroup kselftest with O= fails to run the with_stress test due to hardcoded ./test_core. Find test_core binary using the OUTPUT directory.

Fixes 1a99fcc035fb ("selftests: cgroup: Run test_core under interfering stress")
---
  tools/testing/selftests/cgroup/test_stress.sh | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/cgroup/test_stress.sh +0 -0
index 15d9d5896394..109c044f715f 100755

tools/testing/selftests/cgroup/test_stress.sh line 4

Quoted 5 lines
tools/testing/selftests/cgroup/test_stress.sh +1 -1
@@ -1,4 +1,4 @@
  #!/bin/bash
  # SPDX-License-Identifier: GPL-2.0
 
-./with_stress.sh -s subsys -s fork ./test_core
+./with_stress.sh -s subsys -s fork ${OUTPUT}/test_core

I would suggest using "${OUTPUT:-.}" as the variable OUTPUT may not be defined if test_stress.sh is run interactively.

Cheers,
Longman

maintainer
#3 lore raw

Can you send a quick patch?

Thanks.

Quoted 30 lines · Waiman Long
Quoted 14 lines · Phil Auld

Running cgroup kselftest with O= fails to run the with_stress test due to hardcoded ./test_core. Find test_core binary using the OUTPUT directory.

Fixes 1a99fcc035fb ("selftests: cgroup: Run test_core under interfering stress")
---
  tools/testing/selftests/cgroup/test_stress.sh | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/cgroup/test_stress.sh +0 -0
index 15d9d5896394..109c044f715f 100755

tools/testing/selftests/cgroup/test_stress.sh line 4

Quoted 5 lines
tools/testing/selftests/cgroup/test_stress.sh +1 -1
@@ -1,4 +1,4 @@
  #!/bin/bash
  # SPDX-License-Identifier: GPL-2.0
 
-./with_stress.sh -s subsys -s fork ./test_core
+./with_stress.sh -s subsys -s fork ${OUTPUT}/test_core

I would suggest using "${OUTPUT:-.}" as the variable OUTPUT may not be defined if test_stress.sh is run interactively.

Cheers,
Longman

Signature · 1 line
tejun
#4 lore raw
Quoted 1 line · Tejun Heo

Can you send a quick patch?

Will do.

Cheers,
Longman

Quoted 33 lines

Thanks.

Quoted 28 lines · Waiman Long
Quoted 14 lines · Phil Auld

Running cgroup kselftest with O= fails to run the with_stress test due to hardcoded ./test_core. Find test_core binary using the OUTPUT directory.

Fixes 1a99fcc035fb ("selftests: cgroup: Run test_core under interfering stress")
---
   tools/testing/selftests/cgroup/test_stress.sh | 2 +-
   1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/cgroup/test_stress.sh +0 -0
index 15d9d5896394..109c044f715f 100755

tools/testing/selftests/cgroup/test_stress.sh line 4

Quoted 5 lines
tools/testing/selftests/cgroup/test_stress.sh +1 -1
@@ -1,4 +1,4 @@
   #!/bin/bash
   # SPDX-License-Identifier: GPL-2.0
 
-./with_stress.sh -s subsys -s fork ./test_core
+./with_stress.sh -s subsys -s fork ${OUTPUT}/test_core

I would suggest using "${OUTPUT:-.}" as the variable OUTPUT may not be defined if test_stress.sh is run interactively.

Cheers,
Longman

author
#5 lore raw
In reply to Waiman Long
Quoted 11 lines · On Fri, May 13, 2022 at 12:19:24PM -0400 Waiman Long wrote:
Quoted 9 lines · Phil Auld

Running cgroup kselftest with O= fails to run the with_stress test due to hardcoded ./test_core. Find test_core binary using the OUTPUT directory.

Fixes 1a99fcc035fb ("selftests: cgroup: Run test_core under interfering stress")
---
  tools/testing/selftests/cgroup/test_stress.sh | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 14 lines

tools/testing/selftests/cgroup/test_stress.sh line 3

Quoted 9 lines
tools/testing/selftests/cgroup/test_stress.sh +1 -1
index 15d9d5896394..109c044f715f 100755
@@ -1,4 +1,4 @@
  #!/bin/bash
  # SPDX-License-Identifier: GPL-2.0
-./with_stress.sh -s subsys -s fork ./test_core
+./with_stress.sh -s subsys -s fork ${OUTPUT}/test_core

I would suggest using "${OUTPUT:-.}" as the variable OUTPUT may not be defined if test_stress.sh is run interactively.

I worked both ways as is.

Quoted 3 lines

Cheers,
Longman

author
#6 lore raw
Quoted 27 lines · On Fri, May 13, 2022 at 12:32:15PM -0400 Phil Auld wrote:
Quoted 11 lines · On Fri, May 13, 2022 at 12:19:24PM -0400 Waiman Long wrote:
Quoted 9 lines · Phil Auld

Running cgroup kselftest with O= fails to run the with_stress test due to hardcoded ./test_core. Find test_core binary using the OUTPUT directory.

Fixes 1a99fcc035fb ("selftests: cgroup: Run test_core under interfering stress")
---
  tools/testing/selftests/cgroup/test_stress.sh | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 14 lines

tools/testing/selftests/cgroup/test_stress.sh line 3

Quoted 9 lines
tools/testing/selftests/cgroup/test_stress.sh +1 -1
index 15d9d5896394..109c044f715f 100755
@@ -1,4 +1,4 @@
  #!/bin/bash
  # SPDX-License-Identifier: GPL-2.0
-./with_stress.sh -s subsys -s fork ./test_core
+./with_stress.sh -s subsys -s fork ${OUTPUT}/test_core

I would suggest using "${OUTPUT:-.}" as the variable OUTPUT may not be defined if test_stress.sh is run interactively.

Quoted 3 lines

I worked both ways as is.

But I'm not sure why :) Yours is probably better.

Cheers,
Phil

Quoted 5 lines
Quoted 3 lines

Cheers,
Longman