Skip to contentSkip to conversation

xfstests-bld: fix setting mkfs options for ext4

PATCH In review Eric Biggers 2 participants 2 messages Feb 22, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xfstests-bld: fix setting mkfs options for ext4

From: Eric Biggers <[email protected]>

Commit ebbfbefce909 ("test-appliance: add support for xfstests to use EXT_MKFS_OPTIONS") changed the test appliances to set both MKFS_OPTIONS and EXT_MKFS_OPTIONS when starting 'check'. However, MKFS_OPTIONS was not exported into the environment, so it was not actually being recognized. Fix this by exporting it.

---
 kvm-xfstests/test-appliance/files/root/fs/ext4/config | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kvm-xfstests/test-appliance/files/root/fs/ext4/config +1 -1
index 0dfedf6..cbfbeec 100644
@@ -28,7 +28,7 @@ function format_filesystem()
 
 function setup_mount_opts()
 {
-    MKFS_OPTIONS="$EXT_MKFS_OPTIONS"
+    export MKFS_OPTIONS="$EXT_MKFS_OPTIONS"
     if test -n "$EXT_MOUNT_OPTIONS" ; then
 	EXT_MOUNT_OPTIONS="-o block_validity,$EXT_MOUNT_OPTIONS"
     else
Signature · 1 line
2.11.0.483.g087da7b7c-goog
#1 lore raw
Quoted 8 lines · Eric Biggers

From: Eric Biggers <[email protected]>

Commit ebbfbefce909 ("test-appliance: add support for xfstests to use EXT_MKFS_OPTIONS") changed the test appliances to set both MKFS_OPTIONS and EXT_MKFS_OPTIONS when starting 'check'. However, MKFS_OPTIONS was not exported into the environment, so it was not actually being recognized. Fix this by exporting it.

Oops. Nice catch!

BTW, I am very much thinking about sending in a patch upstream so that xfstests recognizes EXT_MKFS_OPTIONS. The problem is once we do this it will break people's config file or other systems that wrap xfstests if they are just using the bare MKFS_OPTIONS. I'm making kvm-xfstests/gce-xfstests be able to be agile with respect to this proposed change, by setting both, but this could potentially break other people.

There's a larger issue here, which is that xfstests as a whole is very inconsistent, on a file system by file system basis, about whether or not <FSTYPE>_MKFS_OPTIONS and <FSTYPE>_MOUNT_OPTIONS are used or not.

It might be nice to fix the larger problem, but for now I'm more focused on making ext4 consistent with most (but not all) of the other file systems supported by xfstests.

- Ted