From: Eryu Guan <guan@eryu.me>
To: Eric Sandeen <sandeen@redhat.com>
Cc: fstests <fstests@vger.kernel.org>
Subject: Re: [PATCH 1/3] fstests: add _require_sysctl helper
Date: Sun, 17 May 2020 23:50:30 +0800 [thread overview]
Message-ID: <20200517155030.GC2704@desktop> (raw)
In-Reply-To: <2989bb14-5d77-5e91-d415-2a5bdfcff7a6@redhat.com>
On Tue, May 05, 2020 at 03:17:38PM -0500, Eric Sandeen wrote:
> New _require_sysctl test to ensure that the sysctl we wish to test is
> available on the system.
>
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
> ---
>
> diff --git a/common/rc b/common/rc
> index 2000bd9d..2734dbf6 100644
> --- a/common/rc
> +++ b/common/rc
> @@ -4208,6 +4208,12 @@ _require_bsd_process_accounting()
> $ACCTON_PROG off >> $seqres.full
> }
>
> +_require_sysctl()
IMHO, this name seems a bit confusing, it looks like it requires the
sysctl command itself. How about _require_sysctl_entry ?
> +{
> + name=$1
Declare local var with 'local'.
> + sysctl $name &>/dev/null || _notrun "$name sysctl unavailable"
> +}
And I think this patch could be folded into the first test that takes
use of it, i.e. patch 2.
Thanks,
Eryu
> +
> init_rc
>
> ################################################################################
next prev parent reply other threads:[~2020-05-17 15:50 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-05 20:16 [PATCH 0/3] fstests: test restricted file access sysctls Eric Sandeen
2020-05-05 20:17 ` [PATCH 1/3] fstests: add _require_sysctl helper Eric Sandeen
2020-05-06 18:35 ` Bill O'Donnell
2020-05-17 15:50 ` Eryu Guan [this message]
2020-05-05 20:20 ` [PATCH 2/3] fstests: test restricted symlinks & hardlinks sysctls Eric Sandeen
2020-05-06 18:44 ` Bill O'Donnell
2020-05-06 18:48 ` Eric Sandeen
2020-05-06 18:52 ` Bill O'Donnell
2020-05-17 15:55 ` Eryu Guan
2020-05-18 14:42 ` Eric Sandeen
2020-05-18 14:45 ` Eric Sandeen
2020-05-05 20:21 ` [PATCH 3/3] fstests: test restricted file access sysctls Eric Sandeen
2020-05-06 18:47 ` Bill O'Donnell
2020-05-06 18:53 ` Bill O'Donnell
2020-05-06 19:23 ` Eric Sandeen
2020-05-06 19:29 ` [PATCH 3/3 V2] " Eric Sandeen
2020-05-06 19:42 ` Bill O'Donnell
2020-05-17 15:57 ` Eryu Guan
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=20200517155030.GC2704@desktop \
--to=guan@eryu.me \
--cc=fstests@vger.kernel.org \
--cc=sandeen@redhat.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.