public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH v1] Skip cgroup-related tests if `/sys/fs/cgroup` readonly
@ 2023-09-25 14:42 Marius Kittler
  2023-09-25 15:17 ` Petr Vorel
  2023-09-26 10:27 ` Richard Palethorpe
  0 siblings, 2 replies; 7+ messages in thread
From: Marius Kittler @ 2023-09-25 14:42 UTC (permalink / raw)
  To: ltp

Otherwise clone303 fails with TBROK when `/sys/fs/cgroup` is mounted as
read-only which is normal in a container. The test result should better
be TCONF like it is already done in case of a permission error.

Signed-off-by: Marius Kittler <mkittler@suse.de>
---
 lib/tst_cgroup.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/tst_cgroup.c b/lib/tst_cgroup.c
index fdeac6059..5240aadaa 100644
--- a/lib/tst_cgroup.c
+++ b/lib/tst_cgroup.c
@@ -383,6 +383,9 @@ static void cgroup_dir_mk(const struct cgroup_dir *const parent,
 		tst_brk(TCONF | TERRNO,
 			"Lack permission to make '%s/%s'; premake it or run as root",
 			dpath, dir_name);
+	} else if (errno == EROFS) {
+		tst_brk(TCONF | TERRNO, "'%s/%s' must not be read-only",
+			dpath, dir_name);
 	} else {
 		tst_brk(TBROK | TERRNO,
 			"mkdirat(%d<%s>, '%s', 0777)",
-- 
2.42.0


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

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

* Re: [LTP] [PATCH v1] Skip cgroup-related tests if `/sys/fs/cgroup` readonly
  2023-09-25 14:42 [LTP] [PATCH v1] Skip cgroup-related tests if `/sys/fs/cgroup` readonly Marius Kittler
@ 2023-09-25 15:17 ` Petr Vorel
  2023-09-26  7:12   ` Wei Gao via ltp
  2023-09-26 10:27 ` Richard Palethorpe
  1 sibling, 1 reply; 7+ messages in thread
From: Petr Vorel @ 2023-09-25 15:17 UTC (permalink / raw)
  To: Marius Kittler; +Cc: Richard Palethorpe, ltp

Hi all,

> Otherwise clone303 fails with TBROK when `/sys/fs/cgroup` is mounted as
> read-only which is normal in a container. The test result should better
> be TCONF like it is already done in case of a permission error.

Reviewed-by: Petr Vorel <pvorel@suse.cz>

IMHO another candidate for merging before release.

Kind regards,
Petr

> Signed-off-by: Marius Kittler <mkittler@suse.de>
> ---
>  lib/tst_cgroup.c | 3 +++
>  1 file changed, 3 insertions(+)

> diff --git a/lib/tst_cgroup.c b/lib/tst_cgroup.c
> index fdeac6059..5240aadaa 100644
> --- a/lib/tst_cgroup.c
> +++ b/lib/tst_cgroup.c
> @@ -383,6 +383,9 @@ static void cgroup_dir_mk(const struct cgroup_dir *const parent,
>  		tst_brk(TCONF | TERRNO,
>  			"Lack permission to make '%s/%s'; premake it or run as root",
>  			dpath, dir_name);
> +	} else if (errno == EROFS) {
> +		tst_brk(TCONF | TERRNO, "'%s/%s' must not be read-only",
> +			dpath, dir_name);
>  	} else {
>  		tst_brk(TBROK | TERRNO,
>  			"mkdirat(%d<%s>, '%s', 0777)",

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

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

* Re: [LTP] [PATCH v1] Skip cgroup-related tests if `/sys/fs/cgroup` readonly
  2023-09-25 15:17 ` Petr Vorel
@ 2023-09-26  7:12   ` Wei Gao via ltp
  2023-09-27  5:52     ` Petr Vorel
  0 siblings, 1 reply; 7+ messages in thread
From: Wei Gao via ltp @ 2023-09-26  7:12 UTC (permalink / raw)
  To: Petr Vorel; +Cc: Richard Palethorpe, ltp

On Mon, Sep 25, 2023 at 05:17:28PM +0200, Petr Vorel wrote:
> Hi all,
> 
> > Otherwise clone303 fails with TBROK when `/sys/fs/cgroup` is mounted as
> > read-only which is normal in a container. The test result should better
> > be TCONF like it is already done in case of a permission error.
> 
> Reviewed-by: Petr Vorel <pvorel@suse.cz>
  Tested-by: Wei Gao <wegao@suse.com>
> 
> IMHO another candidate for merging before release.
> 
> Kind regards,
> Petr
> 
> > Signed-off-by: Marius Kittler <mkittler@suse.de>
> > ---
> >  lib/tst_cgroup.c | 3 +++
> >  1 file changed, 3 insertions(+)
> 
> > diff --git a/lib/tst_cgroup.c b/lib/tst_cgroup.c
> > index fdeac6059..5240aadaa 100644
> > --- a/lib/tst_cgroup.c
> > +++ b/lib/tst_cgroup.c
> > @@ -383,6 +383,9 @@ static void cgroup_dir_mk(const struct cgroup_dir *const parent,
> >  		tst_brk(TCONF | TERRNO,
> >  			"Lack permission to make '%s/%s'; premake it or run as root",
> >  			dpath, dir_name);
> > +	} else if (errno == EROFS) {
> > +		tst_brk(TCONF | TERRNO, "'%s/%s' must not be read-only",
> > +			dpath, dir_name);
> >  	} else {
> >  		tst_brk(TBROK | TERRNO,
> >  			"mkdirat(%d<%s>, '%s', 0777)",
> 
> -- 
> Mailing list info: https://lists.linux.it/listinfo/ltp

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

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

* Re: [LTP] [PATCH v1] Skip cgroup-related tests if `/sys/fs/cgroup` readonly
  2023-09-25 14:42 [LTP] [PATCH v1] Skip cgroup-related tests if `/sys/fs/cgroup` readonly Marius Kittler
  2023-09-25 15:17 ` Petr Vorel
@ 2023-09-26 10:27 ` Richard Palethorpe
  2023-09-27  5:43   ` Petr Vorel
  1 sibling, 1 reply; 7+ messages in thread
From: Richard Palethorpe @ 2023-09-26 10:27 UTC (permalink / raw)
  To: Marius Kittler; +Cc: ltp

Hello,

Marius Kittler <mkittler@suse.de> writes:

> Otherwise clone303 fails with TBROK when `/sys/fs/cgroup` is mounted as
> read-only which is normal in a container. The test result should better
> be TCONF like it is already done in case of a permission error.
>
> Signed-off-by: Marius Kittler <mkittler@suse.de>

Reviewed-by: Richard Palethorpe <rpalethorpe@suse.com>

> ---
>  lib/tst_cgroup.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/lib/tst_cgroup.c b/lib/tst_cgroup.c
> index fdeac6059..5240aadaa 100644
> --- a/lib/tst_cgroup.c
> +++ b/lib/tst_cgroup.c
> @@ -383,6 +383,9 @@ static void cgroup_dir_mk(const struct cgroup_dir *const parent,
>  		tst_brk(TCONF | TERRNO,
>  			"Lack permission to make '%s/%s'; premake it or run as root",
>  			dpath, dir_name);
> +	} else if (errno == EROFS) {
> +		tst_brk(TCONF | TERRNO, "'%s/%s' must not be read-only",
> +			dpath, dir_name);
>  	} else {
>  		tst_brk(TBROK | TERRNO,
>  			"mkdirat(%d<%s>, '%s', 0777)",
> -- 
> 2.42.0


-- 
Thank you,
Richard.

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

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

* Re: [LTP] [PATCH v1] Skip cgroup-related tests if `/sys/fs/cgroup` readonly
  2023-09-26 10:27 ` Richard Palethorpe
@ 2023-09-27  5:43   ` Petr Vorel
  0 siblings, 0 replies; 7+ messages in thread
From: Petr Vorel @ 2023-09-27  5:43 UTC (permalink / raw)
  To: Richard Palethorpe; +Cc: ltp

Hi Richie, Wei,

thanks for your review/testing, merged.

Kind regards,
Petr

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

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

* Re: [LTP] [PATCH v1] Skip cgroup-related tests if `/sys/fs/cgroup` readonly
  2023-09-26  7:12   ` Wei Gao via ltp
@ 2023-09-27  5:52     ` Petr Vorel
  2023-09-27  7:36       ` Wei Gao via ltp
  0 siblings, 1 reply; 7+ messages in thread
From: Petr Vorel @ 2023-09-27  5:52 UTC (permalink / raw)
  To: Wei Gao; +Cc: Richard Palethorpe, ltp

Hi,

...
> > Reviewed-by: Petr Vorel <pvorel@suse.cz>
>   Tested-by: Wei Gao <wegao@suse.com>
    ^
	Unwanted whitespace before the tag.

Wei, please don't put this whitespace space next time.

Not only this is wrong, but it breaks automatic adding of your tag.
Patchwork (https://patchwork.ozlabs.org/project/ltp/list/) which we use for
downloading patches automatically adds all tags associated with the patch,
unless there is whitespace before the tag.

Kind regards,
Petr

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

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

* Re: [LTP] [PATCH v1] Skip cgroup-related tests if `/sys/fs/cgroup` readonly
  2023-09-27  5:52     ` Petr Vorel
@ 2023-09-27  7:36       ` Wei Gao via ltp
  0 siblings, 0 replies; 7+ messages in thread
From: Wei Gao via ltp @ 2023-09-27  7:36 UTC (permalink / raw)
  To: Petr Vorel; +Cc: Richard Palethorpe, ltp

On Wed, Sep 27, 2023 at 07:52:21AM +0200, Petr Vorel wrote:
> Hi,
> 
> ...
> > > Reviewed-by: Petr Vorel <pvorel@suse.cz>
> >   Tested-by: Wei Gao <wegao@suse.com>
>     ^
> 	Unwanted whitespace before the tag.
> 
> Wei, please don't put this whitespace space next time.
> 
> Not only this is wrong, but it breaks automatic adding of your tag.
> Patchwork (https://patchwork.ozlabs.org/project/ltp/list/) which we use for
> downloading patches automatically adds all tags associated with the patch,
> unless there is whitespace before the tag.
Got it. Thanks for correcting the error.
> 
> 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:[~2023-09-27  7:36 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-25 14:42 [LTP] [PATCH v1] Skip cgroup-related tests if `/sys/fs/cgroup` readonly Marius Kittler
2023-09-25 15:17 ` Petr Vorel
2023-09-26  7:12   ` Wei Gao via ltp
2023-09-27  5:52     ` Petr Vorel
2023-09-27  7:36       ` Wei Gao via ltp
2023-09-26 10:27 ` Richard Palethorpe
2023-09-27  5:43   ` Petr Vorel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox