All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kseltest/cgroup: Make test_stress.sh work if run interactively
@ 2022-05-13 19:09 ` Waiman Long
  0 siblings, 0 replies; 6+ messages in thread
From: Waiman Long @ 2022-05-13 19:09 UTC (permalink / raw)
  To: Tejun Heo, Shuah Khan
  Cc: cgroups, linux-kselftest, linux-kernel, Phil Auld,
	Michal Koutný,
	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.

Signed-off-by: Waiman Long <longman@redhat.com>
---
 tools/testing/selftests/cgroup/test_stress.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/cgroup/test_stress.sh b/tools/testing/selftests/cgroup/test_stress.sh
index 109c044f715f..3c9c4554d5f6 100755
--- a/tools/testing/selftests/cgroup/test_stress.sh
+++ b/tools/testing/selftests/cgroup/test_stress.sh
@@ -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
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH] kseltest/cgroup: Make test_stress.sh work if run interactively
@ 2022-05-13 19:09 ` Waiman Long
  0 siblings, 0 replies; 6+ messages in thread
From: Waiman Long @ 2022-05-13 19:09 UTC (permalink / raw)
  To: Tejun Heo, Shuah Khan
  Cc: cgroups-u79uwXL29TY76Z2rM5mHXA,
	linux-kselftest-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, Phil Auld,
	Michal Koutný,
	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.

Signed-off-by: Waiman Long <longman-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
 tools/testing/selftests/cgroup/test_stress.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/cgroup/test_stress.sh b/tools/testing/selftests/cgroup/test_stress.sh
index 109c044f715f..3c9c4554d5f6 100755
--- a/tools/testing/selftests/cgroup/test_stress.sh
+++ b/tools/testing/selftests/cgroup/test_stress.sh
@@ -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
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] kseltest/cgroup: Make test_stress.sh work if run interactively
@ 2022-05-13 19:34   ` Tejun Heo
  0 siblings, 0 replies; 6+ messages in thread
From: Tejun Heo @ 2022-05-13 19:34 UTC (permalink / raw)
  To: Waiman Long
  Cc: Shuah Khan, cgroups, linux-kselftest, linux-kernel, Phil Auld,
	Michal Koutný

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.
> 
> Signed-off-by: Waiman Long <longman@redhat.com>

Applied to cgroup/for-5.19.

Thanks, much appreciated.

-- 
tejun

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] kseltest/cgroup: Make test_stress.sh work if run interactively
@ 2022-05-13 19:34   ` Tejun Heo
  0 siblings, 0 replies; 6+ messages in thread
From: Tejun Heo @ 2022-05-13 19:34 UTC (permalink / raw)
  To: Waiman Long
  Cc: Shuah Khan, cgroups-u79uwXL29TY76Z2rM5mHXA,
	linux-kselftest-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, Phil Auld,
	Michal Koutný

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.
> 
> Signed-off-by: Waiman Long <longman-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>

Applied to cgroup/for-5.19.

Thanks, much appreciated.

-- 
tejun

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] kseltest/cgroup: Make test_stress.sh work if run interactively
@ 2022-05-13 20:17   ` Phil Auld
  0 siblings, 0 replies; 6+ messages in thread
From: Phil Auld @ 2022-05-13 20:17 UTC (permalink / raw)
  To: Waiman Long
  Cc: Tejun Heo, Shuah Khan, cgroups, linux-kselftest, linux-kernel,
	Michal Koutný

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.
> 
> Signed-off-by: Waiman Long <longman@redhat.com>
> ---
>  tools/testing/selftests/cgroup/test_stress.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/testing/selftests/cgroup/test_stress.sh b/tools/testing/selftests/cgroup/test_stress.sh
> index 109c044f715f..3c9c4554d5f6 100755
> --- a/tools/testing/selftests/cgroup/test_stress.sh
> +++ b/tools/testing/selftests/cgroup/test_stress.sh
> @@ -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
> -- 
> 2.27.0
> 


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


Cheers,
Phil

-- 


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] kseltest/cgroup: Make test_stress.sh work if run interactively
@ 2022-05-13 20:17   ` Phil Auld
  0 siblings, 0 replies; 6+ messages in thread
From: Phil Auld @ 2022-05-13 20:17 UTC (permalink / raw)
  To: Waiman Long
  Cc: Tejun Heo, Shuah Khan, cgroups-u79uwXL29TY76Z2rM5mHXA,
	linux-kselftest-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, Michal Koutný

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.
> 
> Signed-off-by: Waiman Long <longman-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> ---
>  tools/testing/selftests/cgroup/test_stress.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/testing/selftests/cgroup/test_stress.sh b/tools/testing/selftests/cgroup/test_stress.sh
> index 109c044f715f..3c9c4554d5f6 100755
> --- a/tools/testing/selftests/cgroup/test_stress.sh
> +++ b/tools/testing/selftests/cgroup/test_stress.sh
> @@ -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
> -- 
> 2.27.0
> 


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


Cheers,
Phil

-- 


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-05-13 20:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-13 19:09 [PATCH] kseltest/cgroup: Make test_stress.sh work if run interactively Waiman Long
2022-05-13 19:09 ` Waiman Long
2022-05-13 19:34 ` Tejun Heo
2022-05-13 19:34   ` Tejun Heo
2022-05-13 20:17 ` Phil Auld
2022-05-13 20:17   ` Phil Auld

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.