[PATCH] Test to ensure that the EOFBLOCK_FL gets set/unset correctly.
Akshay Lal
akshaylal at google.com
Fri Aug 27 18:10:07 CDT 2010
>> +# Test specific macros.
>> +BIT_NOT_SET=0 # inode flag - 0x40000 bit is set.
>> +BIT_SET=1 # inode flag - 0x400000 bit is not set.
>
> I'm thinking one of the values in the comment is not right :)
Duh. Thats silly of me.
Done.
>> +# Checks the state of the sample file in the filesystem and returns whether
>> +# the inode flag 0x400000 is set or not.
>
> I guess a little more comment here about why we do this only for ext4 might
> be good.
>
> Just to make it more obvious in the main test could you maybe call
> it something like _check_ext4_eof_flag() ? If we ever need to do
> testing on other filesystems we can adjust it.
Done.
>> + if ((${iflags} & 0x400000)); then
>> + echo "EOFBLOCK_FL bit is set."
>
> This will cause the test to fail on anything but ext4 because
> it's expected in the output but only happens for ext4...
>
> You could redirect it into $seq.full, just to have it for analysis
> if the test ever fails.
I've added an else condition to exit the test with the error message
that the test is only
supported on ext4 filesystems.
I've also redirected all echo messages to $seq.full
>> + # Run fsck on the fs. fsck -t ${FSTYP} -fn ${TEST_DEV}.
>> + _check_test_fs
>
> Ah now I see why you didn't call it _check_ext4_eof_flag() ;)
>
> This may not be necessary, the harness runs fsck after each
> test anyway. On a large filesystem this could take a pretty
> long time if you run fsck 6 times. I'd just drop
> this and let the post-test-fsck catch any problems.
Removed.
---------------------------------------------------------------------------------------
Updated patch:
---------------------------------------------------------------------------------------
More information about the xfs
mailing list