From: Petr Vorel <pvorel@suse.cz>
To: Sebastian Chlad <sebastianchlad@gmail.com>
Cc: Sebastian Chlad <sebastian.chlad@suse.com>,
Martin Doucha <martin.doucha@suse.com>,
ltp@lists.linux.it
Subject: Re: [LTP] [PATCH] nfs: Adapt the lib to allow to test in 2-host mode
Date: Sun, 22 Feb 2026 21:34:42 +0100 [thread overview]
Message-ID: <20260222203442.GB417048@pevik> (raw)
In-Reply-To: <20260221135338.26236-2-sebastian.chlad@suse.com>
Hi Sebastian,
[ Cc Martin and Cyril ]
> nfs_lib.sh checked key server_side prerequisites on the system under test.
> In 2_host setup this incorrectly required server_side tools on lhost.
> This patch keep netns behavior unchanged, but in true 2-host mode run
> server-side checks on rhost via tst_rhost_run().
First, thank you for fixing 2 host side setup.
> Signed-off-by: Sebastian Chlad <sebastian.chlad@suse.com>
> ---
> testcases/network/nfs/nfs_stress/nfs_lib.sh | 22 +++++++++++++++++----
> 1 file changed, 18 insertions(+), 4 deletions(-)
> diff --git a/testcases/network/nfs/nfs_stress/nfs_lib.sh b/testcases/network/nfs/nfs_stress/nfs_lib.sh
> index 1ac8bd657..e52f96a5a 100644
> --- a/testcases/network/nfs/nfs_stress/nfs_lib.sh
> +++ b/testcases/network/nfs/nfs_stress/nfs_lib.sh
> @@ -45,7 +45,7 @@ TST_SKIP_FILESYSTEMS="exfat,ext2,ext3,fuse,ntfs,vfat,tmpfs"
> TST_MOUNT_DEVICE=1
> TST_FORMAT_DEVICE=1
> TST_NEEDS_ROOT=1
> -TST_NEEDS_CMDS="$TST_NEEDS_CMDS mount exportfs mount.nfs"
> +TST_NEEDS_CMDS="$TST_NEEDS_CMDS mount mount.nfs"
> TST_SETUP="${TST_SETUP:-nfs_setup}"
> TST_CLEANUP="${TST_CLEANUP:-nfs_cleanup}"
> TST_NEEDS_DRIVERS="nfsd"
> @@ -186,10 +186,24 @@ nfs_setup()
> tst_brk TCONF "Cannot run nfs-stress test on mounted NFS"
> fi
> + if tst_net_use_netns; then
> + tst_cmd_available exportfs || tst_brk TCONF "'exportfs' not found"
You would here use tst_require_cmds exportfs, but ...
> + else
> + tst_rhost_run -c "command -v exportfs >/dev/null" || tst_brk TCONF "'exportfs' not found on rhost"
> + fi
... if you remove exportfs from TST_NEEDS_CMDS you can use the same code for
both netns and 2 based setup (tst_rhost_run should work well on netns).
I was thinking about having a special variable for checking rhost only, but
given that tst_test.sh is now also deprecated, we will have to solve this in
shell loader.
> +
> if tst_cmd_available pgrep; then
> - for i in rpc.mountd rpc.statd; do
> - pgrep $i > /dev/null || tst_brk TCONF "$i not running"
> - done
> + if tst_net_use_netns; then
> + tst_res TINFO "checking rpc.mountd/rpc.statd on lhost (netns mode)"
> + for i in rpc.mountd rpc.statd; do
> + pgrep $i > /dev/null || tst_brk TCONF "$i not running"
> + done
> + else
> + tst_res TINFO "checking rpc.mountd/rpc.statd on rhost (2-host mode)"
> + for i in rpc.mountd rpc.statd; do
> + tst_rhost_run -c "pgrep $i > /dev/null" || tst_brk TCONF "$i not running on rhost"
> + done
> + fi
And here of course as well use tst_rhost_run for both.
Kind regards,
Petr
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2026-02-22 20:35 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-21 13:53 [LTP] [PATCH] nfs: Adapt the lib to allow to test in 2-host mode Sebastian Chlad
2026-02-22 20:34 ` Petr Vorel [this message]
2026-02-23 10:41 ` Sebastian Chlad
2026-02-23 10:55 ` [LTP] [PATCH v2] " Sebastian Chlad
2026-02-24 9:24 ` Petr Vorel
2026-02-23 12:01 ` [LTP] [PATCH] " Petr Vorel
2026-02-23 16:54 ` Cyril Hrubis
2026-02-23 17:01 ` Sebastian Chlad via ltp
2026-02-24 9:38 ` Petr Vorel
2026-02-24 10:44 ` Cyril Hrubis
2026-02-24 11:46 ` Petr Vorel
2026-02-24 12:20 ` Cyril Hrubis
2026-02-24 16:11 ` Petr Vorel
2026-02-25 9:24 ` Sebastian Chlad
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=20260222203442.GB417048@pevik \
--to=pvorel@suse.cz \
--cc=ltp@lists.linux.it \
--cc=martin.doucha@suse.com \
--cc=sebastian.chlad@suse.com \
--cc=sebastianchlad@gmail.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.