public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
* [xfstests-bld PATCH] test-appliance: remove convenience fstab entries
@ 2022-04-30 17:57 Eric Biggers
  2022-05-02  3:59 ` Theodore Ts'o
  0 siblings, 1 reply; 2+ messages in thread
From: Eric Biggers @ 2022-04-30 17:57 UTC (permalink / raw)
  To: Theodore Ts'o; +Cc: fstests, linux-ext4

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [xfstests-bld PATCH] test-appliance: remove convenience fstab entries
  2022-04-30 17:57 [xfstests-bld PATCH] test-appliance: remove convenience fstab entries Eric Biggers
@ 2022-05-02  3:59 ` Theodore Ts'o
  0 siblings, 0 replies; 2+ messages in thread
From: Theodore Ts'o @ 2022-05-02  3:59 UTC (permalink / raw)
  To: Eric Biggers; +Cc: Theodore Ts'o, fstests, linux-ext4

On Sat, 30 Apr 2022 10:57:33 -0700, Eric Biggers wrote:
> 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:
> 
> [...]

Applied, thanks!

[1/1] test-appliance: remove convenience fstab entries
      commit: d396dac653c99e46e4234d9600c6e2b0de433fdd

Best regards,
-- 
Theodore Ts'o <tytso@mit.edu>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-05-02  3:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-30 17:57 [xfstests-bld PATCH] test-appliance: remove convenience fstab entries Eric Biggers
2022-05-02  3:59 ` Theodore Ts'o

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox