All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH 1/1] cgroup_lib.sh: Improve error messages
@ 2025-04-16  7:21 Petr Vorel
  2025-04-16  7:33 ` Li Wang via ltp
  2025-04-16  7:34 ` Li Wang via ltp
  0 siblings, 2 replies; 7+ messages in thread
From: Petr Vorel @ 2025-04-16  7:21 UTC (permalink / raw)
  To: ltp

Add a hint for error on a new controller.

Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
 testcases/kernel/controllers/cgroup_lib.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/testcases/kernel/controllers/cgroup_lib.sh b/testcases/kernel/controllers/cgroup_lib.sh
index 9e59221abb..86a5ceb7d4 100644
--- a/testcases/kernel/controllers/cgroup_lib.sh
+++ b/testcases/kernel/controllers/cgroup_lib.sh
@@ -119,12 +119,12 @@ cgroup_require()
 	ret=$?
 
 	if [ $ret -eq 32 ]; then
-		tst_brk TCONF "'tst_cgctl require' exited. Controller is probably not available?"
+		tst_brk TCONF "'tst_cgctl require $ctrl' exited. $ctrl controller not available?"
 		return $ret
 	fi
 
 	if [ $ret -ne 0 ]; then
-		tst_brk TBROK "'tst_cgctl require' exited"
+		tst_brk TBROK "'tst_cgctl require $ctrl' failed. LTP missing $ctrl controller support?"
 		return $ret
 	fi
 
-- 
2.49.0


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

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

* Re: [LTP] [PATCH 1/1] cgroup_lib.sh: Improve error messages
  2025-04-16  7:21 [LTP] [PATCH 1/1] cgroup_lib.sh: Improve error messages Petr Vorel
@ 2025-04-16  7:33 ` Li Wang via ltp
  2025-04-16  7:34 ` Li Wang via ltp
  1 sibling, 0 replies; 7+ messages in thread
From: Li Wang via ltp @ 2025-04-16  7:33 UTC (permalink / raw)
  To: Petr Vorel; +Cc: ltp

On Wed, Apr 16, 2025 at 3:21 PM Petr Vorel <pvorel@suse.cz> wrote:

> Add a hint for error on a new controller.
>
> Signed-off-by: Petr Vorel <pvorel@suse.cz>
>

Reviewed-by: Li Wang <liwang@redhat.com>

---
>  testcases/kernel/controllers/cgroup_lib.sh | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/testcases/kernel/controllers/cgroup_lib.sh
> b/testcases/kernel/controllers/cgroup_lib.sh
> index 9e59221abb..86a5ceb7d4 100644
> --- a/testcases/kernel/controllers/cgroup_lib.sh
> +++ b/testcases/kernel/controllers/cgroup_lib.sh
> @@ -119,12 +119,12 @@ cgroup_require()
>         ret=$?
>
>         if [ $ret -eq 32 ]; then
> -               tst_brk TCONF "'tst_cgctl require' exited. Controller is
> probably not available?"
> +               tst_brk TCONF "'tst_cgctl require $ctrl' exited. $ctrl
> controller not available?"
>                 return $ret
>         fi
>
>         if [ $ret -ne 0 ]; then
> -               tst_brk TBROK "'tst_cgctl require' exited"
> +               tst_brk TBROK "'tst_cgctl require $ctrl' failed. LTP
> missing $ctrl controller support?"
>                 return $ret
>         fi
>
> --
> 2.49.0
>
>

-- 
Regards,
Li Wang

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

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

* Re: [LTP] [PATCH 1/1] cgroup_lib.sh: Improve error messages
  2025-04-16  7:21 [LTP] [PATCH 1/1] cgroup_lib.sh: Improve error messages Petr Vorel
  2025-04-16  7:33 ` Li Wang via ltp
@ 2025-04-16  7:34 ` Li Wang via ltp
  2025-04-16  8:40   ` Petr Vorel
  1 sibling, 1 reply; 7+ messages in thread
From: Li Wang via ltp @ 2025-04-16  7:34 UTC (permalink / raw)
  To: Petr Vorel; +Cc: ltp

On Wed, Apr 16, 2025 at 3:21 PM Petr Vorel <pvorel@suse.cz> wrote:

> Add a hint for error on a new controller.
>
> Signed-off-by: Petr Vorel <pvorel@suse.cz>
> ---
>  testcases/kernel/controllers/cgroup_lib.sh | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/testcases/kernel/controllers/cgroup_lib.sh
> b/testcases/kernel/controllers/cgroup_lib.sh
> index 9e59221abb..86a5ceb7d4 100644
> --- a/testcases/kernel/controllers/cgroup_lib.sh
> +++ b/testcases/kernel/controllers/cgroup_lib.sh
> @@ -119,12 +119,12 @@ cgroup_require()
>         ret=$?
>
>         if [ $ret -eq 32 ]; then
> -               tst_brk TCONF "'tst_cgctl require' exited. Controller is
> probably not available?"
> +               tst_brk TCONF "'tst_cgctl require $ctrl' exited. $ctrl
> controller not available?"
>

s/exited/existed



>                 return $ret
>         fi
>
>         if [ $ret -ne 0 ]; then
> -               tst_brk TBROK "'tst_cgctl require' exited"
> +               tst_brk TBROK "'tst_cgctl require $ctrl' failed. LTP
> missing $ctrl controller support?"
>                 return $ret
>         fi
>
> --
> 2.49.0
>
>

-- 
Regards,
Li Wang

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

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

* Re: [LTP] [PATCH 1/1] cgroup_lib.sh: Improve error messages
  2025-04-16  7:34 ` Li Wang via ltp
@ 2025-04-16  8:40   ` Petr Vorel
  2025-04-16  8:51     ` Avinesh Kumar
  2025-04-16  8:52     ` Li Wang via ltp
  0 siblings, 2 replies; 7+ messages in thread
From: Petr Vorel @ 2025-04-16  8:40 UTC (permalink / raw)
  To: Li Wang; +Cc: ltp

Hi Li,

> > +++ b/testcases/kernel/controllers/cgroup_lib.sh
> > @@ -119,12 +119,12 @@ cgroup_require()
> >         ret=$?

> >         if [ $ret -eq 32 ]; then
> > -               tst_brk TCONF "'tst_cgctl require' exited. Controller is
> > probably not available?"
> > +               tst_brk TCONF "'tst_cgctl require $ctrl' exited. $ctrl
> > controller not available?"


> s/exited/existed

I understood that "exited" which was used previously was meant to be "exited
with non-zero" (I can improve it this way to be more precise). Do you really
think it's in TCONF related to controller existed?  I actually mean the opposite
- one wants controller which does not exist due not configured in the kernel.

Kind regards,
Petr


> >                 return $ret
> >         fi

> >         if [ $ret -ne 0 ]; then
> > -               tst_brk TBROK "'tst_cgctl require' exited"
> > +               tst_brk TBROK "'tst_cgctl require $ctrl' failed. LTP
> > missing $ctrl controller support?"
> >                 return $ret
> >         fi

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

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

* Re: [LTP] [PATCH 1/1] cgroup_lib.sh: Improve error messages
  2025-04-16  8:40   ` Petr Vorel
@ 2025-04-16  8:51     ` Avinesh Kumar
  2025-04-17  6:52       ` Petr Vorel
  2025-04-16  8:52     ` Li Wang via ltp
  1 sibling, 1 reply; 7+ messages in thread
From: Avinesh Kumar @ 2025-04-16  8:51 UTC (permalink / raw)
  To: Petr Vorel; +Cc: ltp

On Wednesday, April 16, 2025 10:40:57 AM CEST Petr Vorel wrote:
> Hi Li,
> 
> > > +++ b/testcases/kernel/controllers/cgroup_lib.sh
> > > @@ -119,12 +119,12 @@ cgroup_require()
> > >         ret=$?
> 
> > >         if [ $ret -eq 32 ]; then
> > > -               tst_brk TCONF "'tst_cgctl require' exited. Controller is
> > > probably not available?"
> > > +               tst_brk TCONF "'tst_cgctl require $ctrl' exited. $ctrl
> > > controller not available?"
> 
> 
> > s/exited/existed
> 
> I understood that "exited" which was used previously was meant to be "exited
> with non-zero" (I can improve it this way to be more precise). Do you really
> think it's in TCONF related to controller existed?  I actually mean the opposite
> - one wants controller which does not exist due not configured in the kernel.
> 
I was also writing the same.
I think we should just change it to 'failed' as you did below.


Reviewed-by: Avinesh Kumar <akumar@suse.de>


> Kind regards,
> Petr
> 
> 
> > >                 return $ret
> > >         fi
> 
> > >         if [ $ret -ne 0 ]; then
> > > -               tst_brk TBROK "'tst_cgctl require' exited"
> > > +               tst_brk TBROK "'tst_cgctl require $ctrl' failed. LTP
> > > missing $ctrl controller support?"
> > >                 return $ret
> > >         fi
> 

Regards,
Avinesh




-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

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

* Re: [LTP] [PATCH 1/1] cgroup_lib.sh: Improve error messages
  2025-04-16  8:40   ` Petr Vorel
  2025-04-16  8:51     ` Avinesh Kumar
@ 2025-04-16  8:52     ` Li Wang via ltp
  1 sibling, 0 replies; 7+ messages in thread
From: Li Wang via ltp @ 2025-04-16  8:52 UTC (permalink / raw)
  To: Petr Vorel; +Cc: ltp

On Wed, Apr 16, 2025 at 4:41 PM Petr Vorel <pvorel@suse.cz> wrote:

> Hi Li,
>
> > > +++ b/testcases/kernel/controllers/cgroup_lib.sh
> > > @@ -119,12 +119,12 @@ cgroup_require()
> > >         ret=$?
>
> > >         if [ $ret -eq 32 ]; then
> > > -               tst_brk TCONF "'tst_cgctl require' exited. Controller
> is
> > > probably not available?"
> > > +               tst_brk TCONF "'tst_cgctl require $ctrl' exited. $ctrl
> > > controller not available?"
>
>
> > s/exited/existed
>
> I understood that "exited" which was used previously was meant to be
> "exited
> with non-zero" (I can improve it this way to be more precise). Do you
> really
> think it's in TCONF related to controller existed?  I actually mean the
> opposite
> - one wants controller which does not exist due not configured in the
> kernel.
>

Ah, you're right, I was blind to read that.
Maybe I spent too much time looking at screens today:).

-- 
Regards,
Li Wang

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

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

* Re: [LTP] [PATCH 1/1] cgroup_lib.sh: Improve error messages
  2025-04-16  8:51     ` Avinesh Kumar
@ 2025-04-17  6:52       ` Petr Vorel
  0 siblings, 0 replies; 7+ messages in thread
From: Petr Vorel @ 2025-04-17  6:52 UTC (permalink / raw)
  To: Avinesh Kumar; +Cc: ltp

Hi Li, Avinesh,

> On Wednesday, April 16, 2025 10:40:57 AM CEST Petr Vorel wrote:
> > Hi Li,

> > > > +++ b/testcases/kernel/controllers/cgroup_lib.sh
> > > > @@ -119,12 +119,12 @@ cgroup_require()
> > > >         ret=$?

> > > >         if [ $ret -eq 32 ]; then
> > > > -               tst_brk TCONF "'tst_cgctl require' exited. Controller is
> > > > probably not available?"
> > > > +               tst_brk TCONF "'tst_cgctl require $ctrl' exited. $ctrl
> > > > controller not available?"


> > > s/exited/existed

> > I understood that "exited" which was used previously was meant to be "exited
> > with non-zero" (I can improve it this way to be more precise). Do you really
> > think it's in TCONF related to controller existed?  I actually mean the opposite
> > - one wants controller which does not exist due not configured in the kernel.

> I was also writing the same.
> I think we should just change it to 'failed' as you did below.

Merged, with this change. Thank you both for your review!

Kind regards,
Petr

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

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

end of thread, other threads:[~2025-04-17  6:52 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-16  7:21 [LTP] [PATCH 1/1] cgroup_lib.sh: Improve error messages Petr Vorel
2025-04-16  7:33 ` Li Wang via ltp
2025-04-16  7:34 ` Li Wang via ltp
2025-04-16  8:40   ` Petr Vorel
2025-04-16  8:51     ` Avinesh Kumar
2025-04-17  6:52       ` Petr Vorel
2025-04-16  8:52     ` Li Wang via ltp

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.