If we're doing write/overwrite/snapshot/resource exhaustion tests on
the scratch device, use the test directory to hold the loop
termination signal files. This way we don't run infinitely because
we can't create the flag due to ENOSPC.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Eryu Guan <eguan@redhat.com>
There're many tests don't remove $seqres.full before writing to it, and
accumulating logs there, then the logs are always growing over time.
Let's fix them once.
generic/16[1-8] generic/170 and generic/33[34] truncate $seqres.full in
the middle of the test, which results in partial logs. Fix them as well.
xfs/227 has duplicated lines to remove $seqres.full, remove the extra
line.
Signed-off-by: Eryu Guan <eguan@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
This makes it clear when we are using "mount ; umount" versus "mount
-o remount" for most file systems. The reason for this distinction is
(a) tests may want to test the difference between what happens on the
remount versus the munt paths, (b) with tmpfs, "mount ; umount" will
cause the contents of all of the files to disappear which makes many
tests sad, and (c) some mount options may not be changed using "mount
-o remount".
Currently _scratch_mount performs "_scratch_mount ; _scratch_umount"
so mechnically rename this function to _scratch_cycle_mount. This was
done mechnically using the script fragment:
git grep "_scratch_remount" | \
awk -F: '{print $1}' | sort -u | \
xargs sed -i 's/_scratch_remount/_scratch_cycle_mount/g'
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
Set up an impossibly small filesystem and try to reflink and rewrite a
file on it to see what happens when we ENOSPC. Basically
generic/16[67] but with a constrained fs size.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Fix style problems such as unnecessary use of quotes, add helper
variables to reduce visual clutter, and other minor fixes to make the
first batch of tests more closely resemble the second round tests.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Turns out that check already runs _check_filesystems after each test,
so we don't need to do this at the end of each test.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Since $TESTDIR is a local variable, make it lowercase to avoid
confusion with $TEST_DIR. While we're at it, make all the local
variables lowercase.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
Replace every explicit mount/umount of scratch or test devices with
helper functions. This allows the next patch to add in hooks to these
functions in order to set up & tear down overlayfs on every mount/umount
(also adds _test_unmount(), which didn't exist prior)
[Eryu Guan rebased the patch agains latest master and replaced more
mount/umount with helpers]
Signed-off-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eric Sandeen <esandeen@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
Make sure that running reflink ops while other IO is ongoing doesn't
break the filesystem.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Acked-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dave Chinner <david@fromorbit.com>