check: wipe scratch devices between tests

Wipe the scratch devices in between each test to ensure that tests are
formatting them and not making assumptions about previous contents.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
This commit is contained in:
Darrick J. Wong
2019-04-16 15:36:28 -07:00
committed by Eryu Guan
parent 5bb196119d
commit d0e484ac69
3 changed files with 14 additions and 2 deletions
+9
View File
@@ -3977,6 +3977,15 @@ _require_fibmap()
rm -f $file
}
_try_wipe_scratch_devs()
{
test -x "$WIPEFS_PROG" || return 0
for dev in $SCRATCH_DEV_POOL $SCRATCH_DEV $SCRATCH_LOGDEV $SCRATCH_RTDEV; do
test -b $dev && $WIPEFS_PROG -a $dev
done
}
init_rc
################################################################################