From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v7 2/7] test/test_zero_hugepage.sh: Skip test on read-only file system
Date: Tue, 3 Aug 2021 11:25:45 +0200 [thread overview]
Message-ID: <YQkLmb3pUPY8cKP8@yuki> (raw)
In-Reply-To: <20210802173536.19525-3-pvorel@suse.cz>
Hi!
> On GitHub Actions /proc/sys/vm/nr_hugepages is not allowed to be
> changed:
>
> ./test_zero_hugepage.sh: line 9: can't create /proc/sys/vm/nr_hugepages: Read-only file system
> tst_hugepage.c:57: TBROK: Failed to open FILE '/proc/sys/vm/nr_hugepages' for writing: EROFS (30)
> tst_sys_conf.c:102: TWARN: Failed to open FILE '/proc/sys/vm/nr_hugepages'
Hmm, it's rather strange to have proc mounted RO but I guess that we
can't do much about it. I guess that it wouldn't allow us to remount it
RW, so there is not much we can do about it.
> Signed-off-by: Petr Vorel <pvorel@suse.cz>
> ---
> New in v7.
>
> lib/newlib_tests/test_zero_hugepage.sh | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/lib/newlib_tests/test_zero_hugepage.sh b/lib/newlib_tests/test_zero_hugepage.sh
> index 10113006b..8a462478e 100755
> --- a/lib/newlib_tests/test_zero_hugepage.sh
> +++ b/lib/newlib_tests/test_zero_hugepage.sh
> @@ -1,12 +1,16 @@
> #!/bin/sh
> # SPDX-License-Identifier: GPL-2.0-or-later
> # Copyright (c) 2021 Yang Xu <xuyang2018.jy@fujitsu.com>
> +# Copyright (c) 2021 Petr Vorel <pvorel@suse.cz>
>
> echo "Testing .request_hugepages = TST_NO_HUGEPAGES"
>
> orig_value=`cat /proc/sys/vm/nr_hugepages`
>
> -echo "128" > /proc/sys/vm/nr_hugepages
> +if ! echo "128" > /proc/sys/vm/nr_hugepages; then
> + echo "TCONF: failed to open /proc/sys/vm/nr_hugepages"
> + exit 32
> +fi
I wonder if we should rather check if proc is mounted readonly
explicitly since this may hide all kinds of errors.
> ./test_zero_hugepage
>
> --
> 2.32.0
>
--
Cyril Hrubis
chrubis@suse.cz
next prev parent reply other threads:[~2021-08-03 9:25 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-02 17:35 [LTP] [PATCH v7 0/7] Run tests in CI Petr Vorel
2021-08-02 17:35 ` [LTP] [PATCH v7 1/7] lib: Print Summary: into stderr Petr Vorel
2021-08-03 9:30 ` Cyril Hrubis
2021-08-03 11:35 ` Petr Vorel
2021-08-02 17:35 ` [LTP] [PATCH v7 2/7] test/test_zero_hugepage.sh: Skip test on read-only file system Petr Vorel
2021-08-03 9:25 ` Cyril Hrubis [this message]
2021-08-03 11:34 ` Petr Vorel
2021-08-03 11:37 ` Cyril Hrubis
2021-08-03 16:46 ` Petr Vorel
2021-08-02 17:35 ` [LTP] [PATCH v7 3/7] lib: Add script for running tests Petr Vorel
2021-08-03 10:05 ` Cyril Hrubis
2021-08-02 17:35 ` [LTP] [PATCH v7 4/7] make: Add make test{, -c, -shell} targets Petr Vorel
2021-08-02 17:35 ` [LTP] [PATCH v7 5/7] build.sh: Add support for make test{, -c, -shell} Petr Vorel
2021-08-02 17:35 ` [LTP] [PATCH v7 6/7] CI: Run also make test-c, test-shell Petr Vorel
2021-08-03 11:31 ` Cyril Hrubis
2021-08-02 17:35 ` [LTP] [PATCH v7 7/7] ci: Install iproute2 Petr Vorel
2021-08-03 11:32 ` Cyril Hrubis
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=YQkLmb3pUPY8cKP8@yuki \
--to=chrubis@suse.cz \
--cc=ltp@lists.linux.it \
/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.