linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] kselftest/cgroup: fix test_stress.sh to use OUTPUT dir
@ 2022-05-12 14:34 Phil Auld
  2022-05-12 17:31 ` Tejun Heo
  2022-05-13 16:19 ` Waiman Long
  0 siblings, 2 replies; 7+ messages in thread
From: Phil Auld @ 2022-05-12 14:34 UTC (permalink / raw)
  To: linux-kernel; +Cc: mkoutny, tj, longman

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")
Signed-off-by: Phil Auld <pauld@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 15d9d5896394..109c044f715f 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 ./test_core
+./with_stress.sh -s subsys -s fork ${OUTPUT}/test_core
-- 
2.18.0


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

* Re: [PATCH] kselftest/cgroup: fix test_stress.sh to use OUTPUT dir
  2022-05-12 14:34 [PATCH] kselftest/cgroup: fix test_stress.sh to use OUTPUT dir Phil Auld
@ 2022-05-12 17:31 ` Tejun Heo
  2022-05-13 16:19 ` Waiman Long
  1 sibling, 0 replies; 7+ messages in thread
From: Tejun Heo @ 2022-05-12 17:31 UTC (permalink / raw)
  To: Phil Auld; +Cc: linux-kernel, mkoutny, longman

On Thu, May 12, 2022 at 10:34:39AM -0400, Phil Auld wrote:
> 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")
> Signed-off-by: Phil Auld <pauld@redhat.com>

Applied to cgroup/for-5.19.

Thanks.

-- 
tejun

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

* Re: [PATCH] kselftest/cgroup: fix test_stress.sh to use OUTPUT dir
  2022-05-12 14:34 [PATCH] kselftest/cgroup: fix test_stress.sh to use OUTPUT dir Phil Auld
  2022-05-12 17:31 ` Tejun Heo
@ 2022-05-13 16:19 ` Waiman Long
  2022-05-13 16:20   ` Tejun Heo
  2022-05-13 16:32   ` Phil Auld
  1 sibling, 2 replies; 7+ messages in thread
From: Waiman Long @ 2022-05-13 16:19 UTC (permalink / raw)
  To: Phil Auld, linux-kernel; +Cc: mkoutny, tj


On 5/12/22 10:34, Phil Auld wrote:
> 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")
> Signed-off-by: Phil Auld <pauld@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 15d9d5896394..109c044f715f 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 ./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


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

* Re: [PATCH] kselftest/cgroup: fix test_stress.sh to use OUTPUT dir
  2022-05-13 16:19 ` Waiman Long
@ 2022-05-13 16:20   ` Tejun Heo
  2022-05-13 16:50     ` Waiman Long
  2022-05-13 16:32   ` Phil Auld
  1 sibling, 1 reply; 7+ messages in thread
From: Tejun Heo @ 2022-05-13 16:20 UTC (permalink / raw)
  To: Waiman Long; +Cc: Phil Auld, lkml, Michal Koutný

Can you send a quick patch?

Thanks.

On Fri, May 13, 2022 at 6:19 AM Waiman Long <longman@redhat.com> wrote:
>
>
> On 5/12/22 10:34, Phil Auld wrote:
> > 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")
> > Signed-off-by: Phil Auld <pauld@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 15d9d5896394..109c044f715f 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 ./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
>


-- 
tejun

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

* Re: [PATCH] kselftest/cgroup: fix test_stress.sh to use OUTPUT dir
  2022-05-13 16:19 ` Waiman Long
  2022-05-13 16:20   ` Tejun Heo
@ 2022-05-13 16:32   ` Phil Auld
  2022-05-13 16:35     ` Phil Auld
  1 sibling, 1 reply; 7+ messages in thread
From: Phil Auld @ 2022-05-13 16:32 UTC (permalink / raw)
  To: Waiman Long; +Cc: linux-kernel, mkoutny, tj

On Fri, May 13, 2022 at 12:19:24PM -0400 Waiman Long wrote:
> 
> On 5/12/22 10:34, Phil Auld wrote:
> > 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")
> > Signed-off-by: Phil Auld <pauld@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 15d9d5896394..109c044f715f 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 ./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.


> Cheers,
> Longman
> 

-- 


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

* Re: [PATCH] kselftest/cgroup: fix test_stress.sh to use OUTPUT dir
  2022-05-13 16:32   ` Phil Auld
@ 2022-05-13 16:35     ` Phil Auld
  0 siblings, 0 replies; 7+ messages in thread
From: Phil Auld @ 2022-05-13 16:35 UTC (permalink / raw)
  To: Waiman Long; +Cc: linux-kernel, mkoutny, tj

On Fri, May 13, 2022 at 12:32:15PM -0400 Phil Auld wrote:
> On Fri, May 13, 2022 at 12:19:24PM -0400 Waiman Long wrote:
> > 
> > On 5/12/22 10:34, Phil Auld wrote:
> > > 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")
> > > Signed-off-by: Phil Auld <pauld@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 15d9d5896394..109c044f715f 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 ./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.
> 
>

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


Cheers,
Phil


> > Cheers,
> > Longman
> > 
> 
> -- 

-- 


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

* Re: [PATCH] kselftest/cgroup: fix test_stress.sh to use OUTPUT dir
  2022-05-13 16:20   ` Tejun Heo
@ 2022-05-13 16:50     ` Waiman Long
  0 siblings, 0 replies; 7+ messages in thread
From: Waiman Long @ 2022-05-13 16:50 UTC (permalink / raw)
  To: Tejun Heo; +Cc: Phil Auld, lkml, Michal Koutný

On 5/13/22 12:20, Tejun Heo wrote:
> Can you send a quick patch?

Will do.

Cheers,
Longman

>
> Thanks.
>
> On Fri, May 13, 2022 at 6:19 AM Waiman Long <longman@redhat.com> wrote:
>>
>> On 5/12/22 10:34, Phil Auld wrote:
>>> 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")
>>> Signed-off-by: Phil Auld <pauld@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 15d9d5896394..109c044f715f 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 ./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
>>
>


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

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

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-12 14:34 [PATCH] kselftest/cgroup: fix test_stress.sh to use OUTPUT dir Phil Auld
2022-05-12 17:31 ` Tejun Heo
2022-05-13 16:19 ` Waiman Long
2022-05-13 16:20   ` Tejun Heo
2022-05-13 16:50     ` Waiman Long
2022-05-13 16:32   ` Phil Auld
2022-05-13 16:35     ` Phil Auld

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).