On Tue, Dec 16, 2014 at 07:31:29AM +1100, Dave Chinner wrote: > On Tue, Dec 16, 2014 at 01:09:26AM +0800, Eryu Guan wrote: > > Tests like xfs/179 depend on the return value of _check_scratch_fs to > > detect fs corruption, but _check_$FSTYP_filesystem always returns 0. > > which means xfs/179 is wrong, because when _check_scratch_fs fails it > exits immediately with status = 1, which triggers the test harness > to record a test failure. (i.e. xfs/179 != check, so exits) > > So this change is not actually going to allow tests to check the > return value of _check_scratch_fs, and check itself doesn't care if > the filesystem is corrupt or not - it just reports the state and > moves on to the next test.... You're right, _check_scratch_fs sets status=1 before exit, this change mainly benefits _check_{fs,scratch}_fs calls out of tests, like in check. I'll update the commit message in v2. > > > Also don't exit if these functions called by 'check', like what > > _check_xfs_filesystem() does. > > That's a separate issue, and should be in it's own patch ;) Will do in v2. Thanks for the review! Eryu -- To unsubscribe from this list: send the line "unsubscribe fstests" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html