Skip to contentSkip to conversation

generic/730: skip on ext4 when dax is enabled

PATCH In review Disha Goel 3 participants 4 messages Mar 18 – Mar 23

lore
Share & tools
lore

Disha Goel

author
#0 lore raw

PATCH 1/1 generic/730: skip on ext4 when dax is enabled

The generic/730 test utilizes the scsi_debug driver to create a synthetic SCSI block device for testing. However, scsi_debug does not support DAX capabilities.

When xfstests is configured with DAX mount options, ext4 strictly validates the block device during the mount phase. This results in a mount failure:
EXT4-fs (sdc): DAX unsupported by block device.

Skip this test for ext4 when the 'dax' mount option is present to avoid false failures.

---
 tests/generic/730 | 3 +++
 1 file changed, 3 insertions(+)
tests/generic/730 +3 -0
index 6b5d3196..b42f5f63 100755
@@ -20,6 +20,9 @@ _cleanup()
 . ./common/filter
 . ./common/scsi_debug
 
+if [ "$FSTYP" == "ext4" ] && echo "$MOUNT_OPTIONS" | grep -q "dax"; then
+	_notrun "ext4 does not support dax mounts on scsi_debug"
+fi
 
 # We don't actually use the test device, but we need a block based fs
 _require_test
Signature · 1 line
2.45.1
#1 lore raw
Quoted 9 lines · Disha Goel

The generic/730 test utilizes the scsi_debug driver to create a synthetic SCSI block device for testing. However, scsi_debug does not support DAX capabilities.

When xfstests is configured with DAX mount options, ext4 strictly validates the block device during the mount phase. This results in a mount failure:
EXT4-fs (sdc): DAX unsupported by block device.

Quoted 5 lines

Skip this test for ext4 when the 'dax' mount option is present to avoid false failures.

---

I think this case isn't a DAX related test case, even give it "-o dax=always", it won't test scsi_debug with that either. So why don't we simply skip the test if dax is detected in MOUNT_OPTIONS?

_exclude_scratch_mount_option dax

Any thoughts on this?

Thanks,
Zorro

Quoted 20 lines
 tests/generic/730 | 3 +++
 1 file changed, 3 insertions(+)
tests/generic/730 +3 -0
index 6b5d3196..b42f5f63 100755
@@ -20,6 +20,9 @@ _cleanup()
 . ./common/filter
 . ./common/scsi_debug
 
+if [ "$FSTYP" == "ext4" ] && echo "$MOUNT_OPTIONS" | grep -q "dax"; then
+	_notrun "ext4 does not support dax mounts on scsi_debug"
+fi
 
 # We don't actually use the test device, but we need a block based fs
 _require_test
Signature · 1 line
2.45.1
#2 lore raw
Quoted 7 lines · Zorro Lang

I think this case isn't a DAX related test case, even give it "-o dax=always", it won't test scsi_debug with that either. So why don't we simply skip the test if dax is detected in MOUNT_OPTIONS?

_exclude_scratch_mount_option dax

Any thoughts on this?

Agreed to all of the above.

author
#3 lore raw
Quoted 11 lines · Christoph Hellwig
Quoted 7 lines · Zorro Lang

I think this case isn't a DAX related test case, even give it "-o dax=always", it won't test scsi_debug with that either. So why don't we simply skip the test if dax is detected in MOUNT_OPTIONS?

_exclude_scratch_mount_option dax

Any thoughts on this?

Agreed to all of the above.

Thanks for the review. That makes sense.

I will send a v2 using _exclude_scratch_mount_option dax.

Signature · 2 lines
Regards,
Disha