dump: _cleanup_dump should only check the scratch fs if the test required it
authorDarrick J. Wong <darrick.wong@oracle.com>
Tue, 18 Jun 2019 21:07:08 +0000 (14:07 -0700)
committerEryu Guan <guaneryu@gmail.com>
Sun, 23 Jun 2019 13:20:20 +0000 (21:20 +0800)
commit03a2da5879c08619304f396c9cf4b84ee9e416ff
treea72caf2f9973f3a5f87283705619bbcf66574f1d
parentde36c063fcfbebf69871b0e3721d156d7eb2825d
dump: _cleanup_dump should only check the scratch fs if the test required it

_cleanup_dump always tries to check the scratch fs, even if the caller
didn't actually _require_scratch.  If a previous test wrote garbage to
the scratch device then the dump test will fail here when repair
stumbles over the garbage.

This was observed by running xfs/016 and xfs/036 in succession.  xfs/016
writes 0xc6 to the scratch device and tries to format a small log.  If
the log is too small the format fails and the test will _notrun.  The
subsequent xfs/036 will _notrun and then _cleanup_dump if no tape device
is set, at which point we try to check the scratch device and logprint
aborts due to the abnormal log size (0xc6c6c6c6).

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Allison Collins <allison.henderson@oracle.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
common/dump