Skip to contentSkip to conversation

test-appliance: remove convenience fstab entries

PATCH Applied Eric Biggers 2 participants 2 messages Apr 30, 2022 – May 2, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 test-appliance: remove convenience fstab entries

From: Eric Biggers <[email protected]>

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.

---
 kvm-xfstests/test-appliance/files/etc/fstab | 15 ++-------------
 1 file changed, 2 insertions(+), 13 deletions(-)
kvm-xfstests/test-appliance/files/etc/fstab +2 -13
index fbd0c69..4a6395d 100644
@@ -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'.
Signature · 1 line
2.36.0
#1 lore raw
Quoted 8 lines · Eric Biggers

From: Eric Biggers <[email protected]>

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,

Signature · 1 line
Theodore Ts'o <[email protected]>