From: Petr Vorel <pvorel@suse.cz>
To: Li Wang <liwang@redhat.com>
Cc: LTP List <ltp@lists.linux.it>, linux-nfs@vger.kernel.org
Subject: Re: [LTP] [RFC][PATCH v2 9/9] nfs: Use TST_ALL_FILESYSTEMS=1
Date: Thu, 16 Jun 2022 08:51:24 +0200 [thread overview]
Message-ID: <YqrS7K3l3b3Vp+ys@pevik> (raw)
In-Reply-To: <CAEemH2dViRNFsreFRyyTtPECdVEyaAEE0CuYBmZrwor=rgi=mQ@mail.gmail.com>
> On Fri, Jun 10, 2022 at 5:44 AM Petr Vorel <pvorel@suse.cz> wrote:
> > Signed-off-by: Petr Vorel <pvorel@suse.cz>
> > ---
> > Hi NFS developers,
> > your comments are welcome. This is an effort how to support NFS tests on
> > all filesystems available on SUT. Using $TST_MNTPOINT means test run in
> > loop, each time different filesystem is used. It's implemented via
> > formatted loop device (the same way as in LTP C API).
> > Code is also at:
> > https://github.com/pevik/ltp/tree/shell/all_filesystems.v2
> > But this requires restarting NFS server (otherwise legacy
> > testcases/lib/daemonlib.sh
> > would have to be used), which is IMHO not optimal.
> > Without that (or only run 'systemctl reload nfs-server' or exportfs -r
> > on remote side) it cannot be umounted after testing - debugging with
> > fuser, code at:
> > https://github.com/pevik/ltp/commit/3656d035d43445a107154ef397ef1db2fad2c4f0
> > The problem is that loop device is still referenced by nfs server and
> > thus cannot be unmounted. Can this be somehow fixed? Is it even wanted
> > to have tests on loop device (the only reasonable way to support more
> > filesystems)? Also tests will run much longer (we could filter out some
> > filesystems not supported, if there are any).
> > # LTP_SINGLE_FS_TYPE=ext2 PATH="/opt/ltp/testcases/bin:$PATH" nfs07.sh -v
> > 3 -t tcp -i3
> > ## NOTE: testing itself is OK
> > nfs07 1 TINFO: initialize 'lhost' 'ltp_ns_veth2' interface
> > nfs07 1 TINFO: add local addr 10.0.0.2/24
> > nfs07 1 TINFO: add local addr fd00:1:1:1::2/64
> > nfs07 1 TINFO: initialize 'rhost' 'ltp_ns_veth1' interface
> > nfs07 1 TINFO: add remote addr 10.0.0.1/24
> > nfs07 1 TINFO: add remote addr fd00:1:1:1::1/64
> > nfs07 1 TINFO: Network config (local -- remote):
> > nfs07 1 TINFO: ltp_ns_veth2 -- ltp_ns_veth1
> > nfs07 1 TINFO: 10.0.0.2/24 -- 10.0.0.1/24
> > nfs07 1 TINFO: fd00:1:1:1::2/64 -- fd00:1:1:1::1/64
> > tst_device.c:89: TINFO: Found free device 0 '/dev/loop0'
> > tst_supported_fs_types.c:148: TINFO: WARNING: testing only ext2
> > tst_supported_fs_types.c:89: TINFO: Kernel supports ext2
> > tst_supported_fs_types.c:51: TINFO: mkfs.ext2 does exist
> > nfs07 1 TINFO: Testing on ext2
> > nfs07 1 TINFO: Formatting ext2 with opts='/dev/loop0'
> > nfs07 1 TINFO: timeout per run is 0h 5m 0s
> > nfs07 1 TINFO: mount.nfs: (linux nfs-utils 2.6.1)
> > nfs07 1 TINFO: setup NFSv3, socket type tcp
> > nfs07 1 TINFO: Mounting NFS: mount -v -t nfs -o proto=tcp,vers=3 10.0.0.2:/tmp/LTP_nfs07.A3PIB82iUv/mntpoint/3/tcp
> > /tmp/LTP_nfs07.A3PIB82iUv/mntpoint/3/0
> > nfs07 1 TPASS: All files and directories were correctly listed
> > nfs07 2 TPASS: All files and directories were correctly listed
> > nfs07 3 TPASS: All files and directories were correctly listed
> > nfs07 4 TINFO: Cleaning up testcase
> > ## DEBUGGING CODE in nfs_cleanup()
> > nfs07 4 TINFO: fuser -mv /tmp/LTP_nfs07.P1XS9smc5w ($TST_TMPDIR)
> > USER PID ACCESS COMMAND
> > /tmp/LTP_nfs07.P1XS9smc5w:
> > root kernel mount /tmp
> > root 2125 ..c.. tst_timeout_kil
> > nfs07 4 TINFO: fuser -mv /tmp/LTP_nfs07.P1XS9smc5w/mntpoint ($TST_MNTPOINT)
> > USER PID ACCESS COMMAND
> > /tmp/LTP_nfs07.P1XS9smc5w/mntpoint:
> > root kernel mount
> > /tmp/LTP_nfs07.P1XS9smc5w/mntpoint
> > nfs07 4 TINFO: fuser -mv /tmp/LTP_nfs07.P1XS9smc5w/mntpoint/3/0
> > USER PID ACCESS COMMAND
> > /tmp/LTP_nfs07.P1XS9smc5w/mntpoint/3/0:
> > root kernel mount
> > /tmp/LTP_nfs07.P1XS9smc5w/mntpoint/3/0
> > ## from nfs_cleanup()
> > ## grep -q "$local_dir" /proc/mounts && umount $local_dir
> > nfs07 4 TINFO: umount /tmp/LTP_nfs07.P1XS9smc5w/mntpoint/3/0
> > umount: /tmp/LTP_nfs07.P1XS9smc5w/mntpoint: target is busy.
> Maybe try with `umount -fl`?
Thank you! Unfortunately it does not work (I tried this before ending up with
restarting server because even -fl did not help).
I also consider the need of 'umount -fl' as kind of error just less aggressive
then restarting server. But if this is considered ok, why not.
Kind regards,
Petr
> unmount manual says:
> -f, --force force unmount (in case of an unreachable NFS system)
> -l, --lazy detach the filesystem now, clean up things later
WARNING: multiple messages have this Message-ID (diff)
From: Petr Vorel <pvorel@suse.cz>
To: Li Wang <liwang@redhat.com>
Cc: linux-nfs@vger.kernel.org, LTP List <ltp@lists.linux.it>
Subject: Re: [LTP] [RFC][PATCH v2 9/9] nfs: Use TST_ALL_FILESYSTEMS=1
Date: Thu, 16 Jun 2022 08:51:24 +0200 [thread overview]
Message-ID: <YqrS7K3l3b3Vp+ys@pevik> (raw)
In-Reply-To: <CAEemH2dViRNFsreFRyyTtPECdVEyaAEE0CuYBmZrwor=rgi=mQ@mail.gmail.com>
> On Fri, Jun 10, 2022 at 5:44 AM Petr Vorel <pvorel@suse.cz> wrote:
> > Signed-off-by: Petr Vorel <pvorel@suse.cz>
> > ---
> > Hi NFS developers,
> > your comments are welcome. This is an effort how to support NFS tests on
> > all filesystems available on SUT. Using $TST_MNTPOINT means test run in
> > loop, each time different filesystem is used. It's implemented via
> > formatted loop device (the same way as in LTP C API).
> > Code is also at:
> > https://github.com/pevik/ltp/tree/shell/all_filesystems.v2
> > But this requires restarting NFS server (otherwise legacy
> > testcases/lib/daemonlib.sh
> > would have to be used), which is IMHO not optimal.
> > Without that (or only run 'systemctl reload nfs-server' or exportfs -r
> > on remote side) it cannot be umounted after testing - debugging with
> > fuser, code at:
> > https://github.com/pevik/ltp/commit/3656d035d43445a107154ef397ef1db2fad2c4f0
> > The problem is that loop device is still referenced by nfs server and
> > thus cannot be unmounted. Can this be somehow fixed? Is it even wanted
> > to have tests on loop device (the only reasonable way to support more
> > filesystems)? Also tests will run much longer (we could filter out some
> > filesystems not supported, if there are any).
> > # LTP_SINGLE_FS_TYPE=ext2 PATH="/opt/ltp/testcases/bin:$PATH" nfs07.sh -v
> > 3 -t tcp -i3
> > ## NOTE: testing itself is OK
> > nfs07 1 TINFO: initialize 'lhost' 'ltp_ns_veth2' interface
> > nfs07 1 TINFO: add local addr 10.0.0.2/24
> > nfs07 1 TINFO: add local addr fd00:1:1:1::2/64
> > nfs07 1 TINFO: initialize 'rhost' 'ltp_ns_veth1' interface
> > nfs07 1 TINFO: add remote addr 10.0.0.1/24
> > nfs07 1 TINFO: add remote addr fd00:1:1:1::1/64
> > nfs07 1 TINFO: Network config (local -- remote):
> > nfs07 1 TINFO: ltp_ns_veth2 -- ltp_ns_veth1
> > nfs07 1 TINFO: 10.0.0.2/24 -- 10.0.0.1/24
> > nfs07 1 TINFO: fd00:1:1:1::2/64 -- fd00:1:1:1::1/64
> > tst_device.c:89: TINFO: Found free device 0 '/dev/loop0'
> > tst_supported_fs_types.c:148: TINFO: WARNING: testing only ext2
> > tst_supported_fs_types.c:89: TINFO: Kernel supports ext2
> > tst_supported_fs_types.c:51: TINFO: mkfs.ext2 does exist
> > nfs07 1 TINFO: Testing on ext2
> > nfs07 1 TINFO: Formatting ext2 with opts='/dev/loop0'
> > nfs07 1 TINFO: timeout per run is 0h 5m 0s
> > nfs07 1 TINFO: mount.nfs: (linux nfs-utils 2.6.1)
> > nfs07 1 TINFO: setup NFSv3, socket type tcp
> > nfs07 1 TINFO: Mounting NFS: mount -v -t nfs -o proto=tcp,vers=3 10.0.0.2:/tmp/LTP_nfs07.A3PIB82iUv/mntpoint/3/tcp
> > /tmp/LTP_nfs07.A3PIB82iUv/mntpoint/3/0
> > nfs07 1 TPASS: All files and directories were correctly listed
> > nfs07 2 TPASS: All files and directories were correctly listed
> > nfs07 3 TPASS: All files and directories were correctly listed
> > nfs07 4 TINFO: Cleaning up testcase
> > ## DEBUGGING CODE in nfs_cleanup()
> > nfs07 4 TINFO: fuser -mv /tmp/LTP_nfs07.P1XS9smc5w ($TST_TMPDIR)
> > USER PID ACCESS COMMAND
> > /tmp/LTP_nfs07.P1XS9smc5w:
> > root kernel mount /tmp
> > root 2125 ..c.. tst_timeout_kil
> > nfs07 4 TINFO: fuser -mv /tmp/LTP_nfs07.P1XS9smc5w/mntpoint ($TST_MNTPOINT)
> > USER PID ACCESS COMMAND
> > /tmp/LTP_nfs07.P1XS9smc5w/mntpoint:
> > root kernel mount
> > /tmp/LTP_nfs07.P1XS9smc5w/mntpoint
> > nfs07 4 TINFO: fuser -mv /tmp/LTP_nfs07.P1XS9smc5w/mntpoint/3/0
> > USER PID ACCESS COMMAND
> > /tmp/LTP_nfs07.P1XS9smc5w/mntpoint/3/0:
> > root kernel mount
> > /tmp/LTP_nfs07.P1XS9smc5w/mntpoint/3/0
> > ## from nfs_cleanup()
> > ## grep -q "$local_dir" /proc/mounts && umount $local_dir
> > nfs07 4 TINFO: umount /tmp/LTP_nfs07.P1XS9smc5w/mntpoint/3/0
> > umount: /tmp/LTP_nfs07.P1XS9smc5w/mntpoint: target is busy.
> Maybe try with `umount -fl`?
Thank you! Unfortunately it does not work (I tried this before ending up with
restarting server because even -fl did not help).
I also consider the need of 'umount -fl' as kind of error just less aggressive
then restarting server. But if this is considered ok, why not.
Kind regards,
Petr
> unmount manual says:
> -f, --force force unmount (in case of an unreachable NFS system)
> -l, --lazy detach the filesystem now, clean up things later
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2022-06-16 6:51 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-09 21:42 [PATCH 0/9] shell: nfs: $TST_ALL_FILESYSTEMS (.all_filesystems) Petr Vorel
2022-06-09 21:42 ` [LTP] " Petr Vorel
2022-06-09 21:42 ` [PATCH v2 1/9] tst_test.sh: Add $TST_MOUNT_DEVICE Petr Vorel
2022-06-09 21:42 ` [LTP] " Petr Vorel
2022-06-09 21:42 ` [PATCH v2 2/9] df01.sh: Use TST_MOUNT_DEVICE=1 Petr Vorel
2022-06-09 21:42 ` [LTP] " Petr Vorel
2022-06-09 21:42 ` [PATCH v2 3/9] tst_test.sh: allow ' in pattern for allowed variables Petr Vorel
2022-06-09 21:42 ` [LTP] " Petr Vorel
2022-06-17 11:59 ` Cyril Hrubis
2022-06-17 11:59 ` Cyril Hrubis
2022-06-09 21:42 ` [PATCH v2 4/9] shell: Add test for TST_MOUNT_DEVICE=1 Petr Vorel
2022-06-09 21:42 ` [LTP] " Petr Vorel
2022-07-11 15:02 ` Petr Vorel
2022-07-11 15:02 ` [LTP] " Petr Vorel
2022-06-09 21:42 ` [PATCH v2 5/9] tst_test.sh: Add $TST_ALL_FILESYSTEMS Petr Vorel
2022-06-09 21:42 ` [LTP] " Petr Vorel
2022-06-17 13:52 ` Cyril Hrubis
2022-06-17 13:52 ` Cyril Hrubis
2022-06-17 14:07 ` Petr Vorel
2022-06-17 14:07 ` Petr Vorel
2022-08-04 7:07 ` Petr Vorel
2022-08-04 7:07 ` [LTP] " Petr Vorel
2022-06-09 21:42 ` [PATCH v2 6/9] tst_device: Remove unnecessary braces Petr Vorel
2022-06-09 21:42 ` [LTP] " Petr Vorel
2022-06-17 13:57 ` Cyril Hrubis
2022-06-17 13:57 ` Cyril Hrubis
2022-06-09 21:42 ` [PATCH v2 7/9] tst_device: Add clear command Petr Vorel
2022-06-09 21:42 ` [LTP] " Petr Vorel
2022-06-17 14:02 ` Cyril Hrubis
2022-06-17 14:02 ` Cyril Hrubis
2022-06-09 21:42 ` [PATCH v2 8/9] shell: Add test for TST_ALL_FILESYSTEMS=1 Petr Vorel
2022-06-09 21:42 ` [LTP] " Petr Vorel
2022-06-16 5:59 ` Li Wang
2022-06-09 21:42 ` [RFC][PATCH v2 9/9] nfs: Use TST_ALL_FILESYSTEMS=1 Petr Vorel
2022-06-09 21:42 ` [LTP] " Petr Vorel
2022-06-16 6:11 ` Li Wang
2022-06-16 6:51 ` Petr Vorel [this message]
2022-06-16 6:51 ` Petr Vorel
2022-06-17 14:51 ` Cyril Hrubis
2022-06-17 14:51 ` Cyril Hrubis
2022-07-11 15:08 ` Petr Vorel
2022-07-11 15:08 ` 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=YqrS7K3l3b3Vp+ys@pevik \
--to=pvorel@suse.cz \
--cc=linux-nfs@vger.kernel.org \
--cc=liwang@redhat.com \
--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.