Skip to contentSkip to conversation

xfstests: avoid ext4/306 failures caused by incompatible mount options

PATCH Superseded Eric Whitney 4 participants 5 messages Jan 29, 2014 – Jan 31, 2014

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xfstests: avoid ext4/306 failures caused by incompatible mount options

ext4/306 will fail when mounting the ext3 file system it creates if an ext3-incompatible mount option is applied by _scratch_mount. This can happen if EXT_MOUNT_OPTIONS is defined appropriately in the test environment. For example, the block_validity option is commonly used to enhance ext4 testing, and it is not supported by ext3. Fix this by not including any mount options defined by the test environment.

---
 tests/ext4/306 | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
tests/ext4/306 +3 -2
index 398c4c0..e59c8ed 100755
@@ -52,9 +52,10 @@ grep -q ext3 /proc/filesystems || _notrun "This test requires ext3 support"
 
 rm -f $seqres.full
 
-# Make a small ext3 fs, (extents disabled) & mount it
+# Make a small ext3 fs, (extents disabled)
 yes | mkfs.ext3 $SCRATCH_DEV 512m >> $seqres.full 2>&1
-_scratch_mount -t ext3 || _fail "couldn't mount fs as ext3"
+# Mount it without _scratch_mount to avoid any ext3-incompatible mount options
+_mount -t ext3 $SCRATCH_DEV $SCRATCH_MNT || _fail "couldn't mount fs as ext3"
 # Create a small non-extent-based file
 echo "Create 1m testfile1"
 $XFS_IO_PROG -f $SCRATCH_MNT/testfile1 -c "pwrite 0 1m" | _filter_xfs_io
Signature · 1 line
1.8.3.2
#1 lore raw
Quoted 6 lines · Eric Whitney

ext4/306 will fail when mounting the ext3 file system it creates if an ext3-incompatible mount option is applied by _scratch_mount. This can happen if EXT_MOUNT_OPTIONS is defined appropriately in the test environment. For example, the block_validity option is commonly used to enhance ext4 testing, and it is not supported by ext3. Fix this by not including any mount options defined by the test environment.

I'm not sure I understand why the test is insisting that the file system be mounted using ext3. If the file system is created without the extents flag, all of the files will be created using indirect blocks, and fundamentally what this test is getting at is that after we grow the file system using resize2fs, the new blocks are available to be allocated and attached to an indirect block file.

We can do this by using ext4; I'm not sure why this test is trying to use ext3 to set up the test flie system. It might be better to get rid of the requirement to create the file system using ext3, since it will make the test runnable even if the ext3 file system hasn't been configured into the system and CONFIG_EXT23_AS_EXT4 is not enabled.

IIRC, Eric Sandeen wrote this test --- Eric, am I missing some reason why it was necessary to use ext3 here?

- Ted

#2 lore raw
Quoted 15 lines · Theodore Ts'o
Quoted 6 lines · Eric Whitney

ext4/306 will fail when mounting the ext3 file system it creates if an ext3-incompatible mount option is applied by _scratch_mount. This can happen if EXT_MOUNT_OPTIONS is defined appropriately in the test environment. For example, the block_validity option is commonly used to enhance ext4 testing, and it is not supported by ext3. Fix this by not including any mount options defined by the test environment.

I'm not sure I understand why the test is insisting that the file system be mounted using ext3. If the file system is created without the extents flag, all of the files will be created using indirect blocks, and fundamentally what this test is getting at is that after we grow the file system using resize2fs, the new blocks are available to be allocated and attached to an indirect block file.

Quoted 8 lines

We can do this by using ext4; I'm not sure why this test is trying to use ext3 to set up the test flie system. It might be better to get rid of the requirement to create the file system using ext3, since it will make the test runnable even if the ext3 file system hasn't been configured into the system and CONFIG_EXT23_AS_EXT4 is not enabled.

IIRC, Eric Sandeen wrote this test --- Eric, am I missing some reason why it was necessary to use ext3 here?

Nope. Tomayto, tomahto - I think the original report had trouble with an ext3 filesystem, so that's how I wrote the testcase.

It could be fixed either way, I think.

-Eric

Quoted 3 lines

- Ted

#3 lore raw

Kodiak Furr liked your message with Boxer. On January 29, 2014 at 3:43:59 PM CST, Eric Sandeen wrote:On 1/29/14, 3:38 PM, Theodore Ts'o wrote:> On Wed, Jan 29, 2014 at 03:45:02PM -0500, Eric Whitney wrote:>> ext4/306 will fail when mounting the ext3 file system it creates if an>> ext3-incompatible mount option is applied by _scratch_mount. This can>> happen if EXT_MOUNT_OPTIONS is defined appropriately in the test>> environment. For example, the block_validity option is commonly used>> to enhance ext4 testing, and it is not supported by ext3. Fix this by>> not including any mount options defined by the test environment.> > I'm not sure I understand why the test is insisting that the file> system be mounted using ext3. If the file system is created without> the extents flag, all of the files will be created using indirect> blocks, and fundamentally what this test is getting at is that after> we grow the file system using resize2fs, the new blocks are available> to be allocated and attached to an indirect block file.> > We can do this by using ext4; I'm not sure why this test is trying to> use ext3 to set up the test flie system. It might be better to get> rid of the requirement to create the file system using ext3, since it> will make the test runnable even if the ext3 file system hasn't been> configured into the system and CONFIG_EXT23_AS_EXT4 is not enabled.> > IIRC, Eric Sandeen wrote this test --- Eric, am I missing some reason> why it was necessary to use ext3 here?Nope. Tomayto, tomahto - I think the original report had trouble withan ext3 filesystem, so that's how I wrote the testcase.It could be fixed either way, I think.-Eric> > - Ted> --To unsubscribe from this list: send the line "unsubscribe linux-ext4" inthe body of a message to [email protected] majordomo info at http://vger.kernel.org/majordomo-info.html

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

#4 lore raw
In reply to Eric Sandeen

* Eric Sandeen <[email protected]>:

Quoted 22 lines · Theodore Ts'o
Quoted 21 lines · Eric Whitney
Quoted 6 lines

ext4/306 will fail when mounting the ext3 file system it creates if an ext3-incompatible mount option is applied by _scratch_mount. This can happen if EXT_MOUNT_OPTIONS is defined appropriately in the test environment. For example, the block_validity option is commonly used to enhance ext4 testing, and it is not supported by ext3. Fix this by not including any mount options defined by the test environment.

I'm not sure I understand why the test is insisting that the file system be mounted using ext3. If the file system is created without the extents flag, all of the files will be created using indirect blocks, and fundamentally what this test is getting at is that after we grow the file system using resize2fs, the new blocks are available to be allocated and attached to an indirect block file.

We can do this by using ext4; I'm not sure why this test is trying to use ext3 to set up the test flie system. It might be better to get rid of the requirement to create the file system using ext3, since it will make the test runnable even if the ext3 file system hasn't been configured into the system and CONFIG_EXT23_AS_EXT4 is not enabled.

Quoted 8 lines
Quoted 2 lines

IIRC, Eric Sandeen wrote this test --- Eric, am I missing some reason why it was necessary to use ext3 here?

Nope. Tomayto, tomahto - I think the original report had trouble with an ext3 filesystem, so that's how I wrote the testcase.

It could be fixed either way, I think.

If using ext3 doesn't add any additional value to the test, using ext4 instead certainly simplifies it. I'll post a V2 shortly.

Thanks,
Eric

Quoted 6 lines

-Eric

Quoted 3 lines

- Ted

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs