Re: [PATCH v2 14/14] fstests: add crash consistency fsx test using dm-log-writes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Sep 5, 2017 at 2:28 PM, Eryu Guan <eguan@xxxxxxxxxx> wrote:
> On Wed, Aug 30, 2017 at 05:51:46PM +0300, Amir Goldstein wrote:
>> DO NOT MERGE!!! this test fails most likely due to test bug.
>>
>> The random seed values in this patch fail the test consistently on ext4
>> always with the same fsck error ((end of extent exceeds allowed value).
>> btrfs also fails, but with slightly different fsck errors each run.
>> xfs fails sometimes on file checksum error.
>>
>> Cherry-picked the test from commit 70d41e17164b
>> in Josef Bacik's fstests tree (https://github.com/josefbacik/fstests).
>> Quoting from Josef's commit message:
>>
>>   The test just runs some ops and exits, then finds all of the good buffers
>>   in the directory we provided and:
>>   - replays up to the mark given
>>   - mounts the file system and compares the md5sum
>>   - unmounts and fsck's to check for metadata integrity
>>
>>   dm-log-writes will pretend to do discard and the replay-log tool will
>>   replay it properly depending on the underlying device, either by writing
>>   0's or actually calling the discard ioctl, so I've enabled discard in the
>>   test for maximum fun.
>>
>> [Amir:]
>> - Removed unneeded _test_falloc_support dynamic FSX_OPTS
>> - Added place holders for using constant random seeds
>> - Add test to new 'replay' group
>
> Perhaps replace it with 'log' group?

Josef's version was in log group. I added replay also to define
a new group for crash consistency tests.
...
>> +
>> +NUM_FILES=4
>> +NUM_OPS=200
>> +FSX_OPTS="-N $NUM_OPS -d -P $SANITY_DIR -i $LOGWRITES_DMDEV"
>> +# Set random seeds for fsx runs (0 for timestamp + pid)
>> +seeds=(- 2885 2886 2887 2888)
>          ^^ meant 0?

The for loops below work on index 1..$NUM_FILES, so seeds[0] is not used
I can change to iterate 0..$((NUMFILES-1)) if that matter.
Anyway, next version is not going to have preset seed values.

>> +# Run fsx for a while
>> +for j in `seq 1 $NUM_FILES`
>> +do
>> +     run_check $here/ltp/fsx $FSX_OPTS -S ${seeds[$j]} -j $j $SCRATCH_MNT/testfile$j &
>> +done
>> +wait
>> +
>> +test_md5=()
>> +test_size=()
>> +for j in `seq 1 $NUM_FILES`
>> +do
>> +     test_md5[$j]=$(md5sum $SCRATCH_MNT/testfile$j | cut -f 1 -d ' ')
>> +     test_size[$j]=$(_ls_l -h $SCRATCH_MNT/testfile$j | awk '{ print $5 }')
>> +done
>> +
--
To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux