In commit
d55123c080cb ("generic/247: filter out expected XFS warnings
for mixed mmap/direct I/O"), _scratch_unmount was removed from
generic/095 and added to generic/247. But actually generic/095 *should*
be unmounting SCRATCH_DEV; and generic/247 should be unmounting
TEST_DEV, not SCRATCH_DEV, since it doesn't use a scratch device (it was
failing if SCRATCH_DEV was not defined). Fix it.
[eguan: the original bug was introduced by me not Brian, as I
removed _scratch_unmount from wrong test]
Signed-off-by: Eric Biggers <ebiggers@google.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
# to be potent, we don't want to simply _disable_dmesg_check which could miss
# other potential bugs. So filter out the intentional WARNINGs, make sure test
# doesn't fail because of this warning and fails on other WARNINGs.
# to be potent, we don't want to simply _disable_dmesg_check which could miss
# other potential bugs. So filter out the intentional WARNINGs, make sure test
# doesn't fail because of this warning and fails on other WARNINGs.
+
+# umount before checking dmesg in case umount triggers any WARNING or Oops
+_scratch_unmount
+
if [ "$FSTYP" == "xfs" ]; then
_check_dmesg _filter_xfs_dmesg
else
if [ "$FSTYP" == "xfs" ]; then
_check_dmesg _filter_xfs_dmesg
else
# unmount and check dmesg, filtering out expected XFS warnings about mixed
# mmap/dio
# unmount and check dmesg, filtering out expected XFS warnings about mixed
# mmap/dio
if [ "$FSTYP" == "xfs" ]; then
_check_dmesg _filter_xfs_dmesg
else
if [ "$FSTYP" == "xfs" ]; then
_check_dmesg _filter_xfs_dmesg
else