xfs: test fixes for new 5.17 behaviors
[xfstests-dev.git] / common / xfs
index bfb1bf1eae8565f9fa853027720f5db59285a160..713e9fe78de998a70715a75580aa5d1784349016 100644 (file)
@@ -776,6 +776,18 @@ _reset_xfs_sysfs_error_handling()
        done
 }
 
+# Unmount an XFS with a dirty log
+_scratch_xfs_unmount_dirty()
+{
+       local f="$SCRATCH_MNT/.dirty_umount"
+
+       rm -f "$f"
+       echo "test" > "$f"
+       sync
+       _scratch_shutdown
+       _scratch_unmount
+}
+
 # Skip if we are running an older binary without the stricter input checks.
 # Make multiple checks to be sure that there is no regression on the one
 # selected feature check, which would skew the result.