From: Petr Vorel <pvorel@suse.cz>
To: Nikita Yushchenko <nikita.yushchenko@virtuozzo.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH] nfs_lib.sh: run exportfs at "server side" in LTP_NETNS case
Date: Thu, 13 Jan 2022 16:50:30 +0100 [thread overview]
Message-ID: <YeBKRoYuuZFVBmHf@pevik> (raw)
In-Reply-To: <20220112161942.4065665-2-nikita.yushchenko@virtuozzo.com>
Hi Nikita,
[ Cc Alexey ]
> In LTP_NETNS case, nfs server is the root namespace and nfs client is
> the ltp namespace.
> Then, exportfs shall be executed locally, without tst_rhost_run.
> Otherwise, things implicitly depend on /var/lib/nfs being the same in
> the root namespace and the ltp namespace.
Not sure if I understand your use case. Do you run rpc.statd (or what is using
/var/lib/nfs) in non-default net namespace?
> Signed-off-by: Nikita Yushchenko <nikita.yushchenko@virtuozzo.com>
> ---
> testcases/network/nfs/nfs_stress/nfs_lib.sh | 10 ++++++++--
> 1 file changed, 8 insertions(+), 2 deletions(-)
> diff --git a/testcases/network/nfs/nfs_stress/nfs_lib.sh b/testcases/network/nfs/nfs_stress/nfs_lib.sh
> index b01215136..b50ccf196 100644
> --- a/testcases/network/nfs/nfs_stress/nfs_lib.sh
> +++ b/testcases/network/nfs/nfs_stress/nfs_lib.sh
> @@ -81,8 +81,14 @@ nfs_setup_server()
> {
> local export_cmd="exportfs -i -o fsid=$$,no_root_squash,rw *:$remote_dir"
> - if ! tst_rhost_run -c "test -d $remote_dir"; then
> - tst_rhost_run -s -c "mkdir -p $remote_dir; $export_cmd"
> + if [ -n "$LTP_NETNS" ]; then
Please use tst_net_use_netns (as in the patch I Cc you just now).
Shouldn't be also $LTP_NFS_NETNS_USE_LO considered?
Kind regards,
Petr
> + if ! test -d $remote_dir; then
> + mkdir -p $remote_dir; $export_cmd
> + fi
> + else
> + if ! tst_rhost_run -c "test -d $remote_dir"; then
> + tst_rhost_run -s -c "mkdir -p $remote_dir; $export_cmd"
> + fi
> fi
> }
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2022-01-13 15:50 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-12 16:19 [LTP] [PATCH] nfs_flock: fail the test if lock/unlock ops fail Nikita Yushchenko via ltp
2022-01-12 16:19 ` [LTP] [PATCH] nfs_lib.sh: run exportfs at "server side" in LTP_NETNS case Nikita Yushchenko via ltp
2022-01-13 15:50 ` Petr Vorel [this message]
2022-01-13 16:27 ` Nikita Yushchenko via ltp
2022-01-14 20:23 ` Petr Vorel
2022-01-14 21:29 ` Nikita Yushchenko via ltp
2022-01-13 17:21 ` [LTP] [PATCH] nfs_flock: fail the test if lock/unlock ops fail Petr Vorel
2022-01-14 9:31 ` Martin Doucha
2022-01-14 20:03 ` Petr Vorel
2023-04-29 19:28 ` 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=YeBKRoYuuZFVBmHf@pevik \
--to=pvorel@suse.cz \
--cc=ltp@lists.linux.it \
--cc=nikita.yushchenko@virtuozzo.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox