All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: Marius Kittler <mkittler@suse.de>
Cc: Richard Palethorpe <rpalethorpe@suse.com>, ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v1] Skip cgroup-related tests if `/sys/fs/cgroup` readonly
Date: Mon, 25 Sep 2023 17:17:28 +0200	[thread overview]
Message-ID: <20230925151728.GE60471@pevik> (raw)
In-Reply-To: <20230925144206.16895-1-mkittler@suse.de>

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

  reply	other threads:[~2023-09-25 15:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230925151728.GE60471@pevik \
    --to=pvorel@suse.cz \
    --cc=ltp@lists.linux.it \
    --cc=mkittler@suse.de \
    --cc=rpalethorpe@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.