public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers@kernel.org>
To: Theodore Ts'o <tytso@mit.edu>
Cc: fstests@vger.kernel.org, linux-ext4@vger.kernel.org
Subject: [xfstests-bld PATCH] test-appliance: remove convenience fstab entries
Date: Sat, 30 Apr 2022 10:57:33 -0700	[thread overview]
Message-ID: <20220430175733.110401-1-ebiggers@kernel.org> (raw)

From: Eric Biggers <ebiggers@google.com>

Fstab entries for the xfstests filesystems interfere with xfstests
because they change the behavior of 'mount -o remount MOUNTPOINT' to
remount relative to the mount options from the fstab rather than the
actual mount options.  For example:

With fstab:
	$ mount -o lazytime /dev/vdc /vdc
	$ mount -o remount /vdc
	$ findmnt /vdc
	TARGET SOURCE   FSTYPE OPTIONS
	/vdc   /dev/vdc ext4   rw,relatime

Without fstab:
	$ rm /etc/fstab
	$ mount -o lazytime /dev/vdc /vdc
	$ mount -o remount /vdc
	$ findmnt /vdc
	TARGET SOURCE   FSTYPE OPTIONS
	/vdc   /dev/vdc ext4   rw,relatime,lazytime

So the lazytime option was lost on remount due to the fstab.  This
happens with other mount options too; lazytime is just an example.

This breaks xfstest ext4/053.

Remove the fstab entries, as they were only needed to make it slightly
easier to manually mount filesystems in an interactive shell.  So 'mount
/vdc' will no longer work, but 'mount /dev/vdc /vdc' will still work.

Alternatively we could make xfstests always use
'mount --options-source=mtab' instead of just 'mount', but xfstests
calls 'mount' in a bunch of different places.  We could still do it
anyway, though; let me know if that would be preferred.

Signed-off-by: Eric Biggers <ebiggers@google.com>
---
 kvm-xfstests/test-appliance/files/etc/fstab | 15 ++-------------
 1 file changed, 2 insertions(+), 13 deletions(-)

diff --git a/kvm-xfstests/test-appliance/files/etc/fstab b/kvm-xfstests/test-appliance/files/etc/fstab
index fbd0c69..4a6395d 100644
--- a/kvm-xfstests/test-appliance/files/etc/fstab
+++ b/kvm-xfstests/test-appliance/files/etc/fstab
@@ -7,18 +7,7 @@ debugfs		/sys/kernel/debug debugfs defaults	0	0
 v_tmp		/vtmp	9p	trans=virtio,version=9p2000.L,msize=262144,nofail,x-systemd.device-timeout=1	0	0
 /dev/rootfs	/	ext4    noatime 0 1
 
-# Convenience entries for interactive mounting (e.g. 'mount /vdb')
-/dev/vdb	/vdb	auto	defaults,noauto		0	0
-/dev/vdc	/vdc	auto	defaults,noauto		0	0
-/dev/vdd	/vdd	auto	defaults,noauto		0	0
-/dev/vde	/vde	auto	defaults,noauto		0	0
-/dev/vdf	/vdf	auto	defaults,noauto		0	0
 /dev/vdg	/results auto	defaults		0	2
-/dev/vdi	/vdi	auto	defaults,noauto		0	0
-/dev/vdj	/vdj	auto	defaults,noauto		0	0
 
-localhost:/test	/mnt/test nfs 	defaults,noauto		0	0
-localhost:/scratch /mnt/scratch nfs defaults,noauto	0	0
-
-/vdc/scratch	/scratch none	defaults,noauto,bind	0	0
-/vdc/test	/test	 none	defaults,noauto,bind	0	0
+# Don't include entries for the xfstests filesystems (/vdb, /vdc, etc.) here, as
+# they interfere with xfstests by changing the behavior of 'mount -o remount'.
-- 
2.36.0


             reply	other threads:[~2022-04-30 17:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-30 17:57 Eric Biggers [this message]
2022-05-02  3:59 ` [xfstests-bld PATCH] test-appliance: remove convenience fstab entries Theodore Ts'o

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=20220430175733.110401-1-ebiggers@kernel.org \
    --to=ebiggers@kernel.org \
    --cc=fstests@vger.kernel.org \
    --cc=linux-ext4@vger.kernel.org \
    --cc=tytso@mit.edu \
    /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