Skip to contentSkip to conversation

generic/499: add bfoster's alternate reproducer

PATCH In review Darrick J. Wong 3 participants 3 messages Jul 11, 2018 – Jul 12, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 generic/499: add bfoster's alternate reproducer

From: Darrick J. Wong <[email protected]>

Add Brian Foster's alternate reproducer code for this problem so that we increase the chances that one of them will reproduce the race problem.

---
 tests/generic/499 |   19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
tests/generic/499 +19 -0
index 99d6d308..e0b95871 100755
@@ -33,6 +33,7 @@ _require_xfs_io_command "fzero"
 
 rm -f $seqres.full
 
+# djwong's reproducer
 _scratch_mkfs >>$seqres.full 2>&1
 _scratch_mount
 
@@ -52,6 +53,24 @@ victim=$SCRATCH_MNT/a
 touch $victim
 $here/ltp/fsx --replay-ops $tmp.fsxops $victim > $tmp.output || cat $tmp.output
 
+# bfoster/hch reproducer
+_scratch_unmount
+_scratch_mkfs_sized $((1024 * 1024 * 100)) >>$seqres.full 2>&1
+_scratch_mount
+
+$XFS_IO_PROG -fc "pwrite 0 100m" -c fsync $SCRATCH_MNT/file >>$seqres.full 2>&1
+rm -f $SCRATCH_MNT/file
+
+cat >> $tmp.fsxops << ENDL
+truncate 0x0 0x1f0d6 0x380e1
+write 0x1ad87 0x6c99 0x180d6
+zero_range 0x14426 0xd3aa 0x21a20 keep_size
+mapread 0x1f69a 0x2386 0x21a20
+ENDL
+
+touch $victim
+$here/ltp/fsx --replay-ops $tmp.fsxops $victim > $tmp.output || cat $tmp.output
+
 echo "Silence is golden"
 status=0
 exit
#2 lore raw
In reply to Darrick J. Wong
Quoted 23 lines · Darrick J. Wong

From: Darrick J. Wong <[email protected]>

Add Brian Foster's alternate reproducer code for this problem so that we increase the chances that one of them will reproduce the race problem.

---
 tests/generic/499 |   19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
tests/generic/499 +1 -0
index 99d6d308..e0b95871 100755
@@ -33,6 +33,7 @@ _require_xfs_io_command "fzero"
 
 rm -f $seqres.full
 
+# djwong's reproducer
 _scratch_mkfs >>$seqres.full 2>&1
 _scratch_mount
 

tests/generic/499 victim=$SCRATCH_MNT/a · line 59

Quoted 7 lines
tests/generic/499 +4 -0
@@ -52,6 +53,24 @@ victim=$SCRATCH_MNT/a
 touch $victim
 $here/ltp/fsx --replay-ops $tmp.fsxops $victim > $tmp.output || cat $tmp.output
 
+# bfoster/hch reproducer
+_scratch_unmount
+_scratch_mkfs_sized $((1024 * 1024 * 100)) >>$seqres.full 2>&1
+_scratch_mount

This test uses a different fs setup (_scratch_mkfs_sized), and adds new sub-test to an existing case, I think it really deserves a new test.

Thanks,
Eryu

Quoted 17 lines
tests/generic/499 +14 -0
+
+$XFS_IO_PROG -fc "pwrite 0 100m" -c fsync $SCRATCH_MNT/file >>$seqres.full 2>&1
+rm -f $SCRATCH_MNT/file
+
+cat >> $tmp.fsxops << ENDL
+truncate 0x0 0x1f0d6 0x380e1
+write 0x1ad87 0x6c99 0x180d6
+zero_range 0x14426 0xd3aa 0x21a20 keep_size
+mapread 0x1f69a 0x2386 0x21a20
+ENDL
+
+touch $victim
+$here/ltp/fsx --replay-ops $tmp.fsxops $victim > $tmp.output || cat $tmp.output
+
 echo "Silence is golden"
 status=0
 exit