Commit Graph

8 Commits

Author SHA1 Message Date
Dave Chinner cf89aed924 generic: convert tests to SPDX license tags
Fully scripted conversion, see script in initial SPDX license commit
message.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
2018-06-09 11:35:42 +10:00
Darrick J. Wong 0bfb84110b common: add leading underscore to get_block_size
Add a leading underscore to the get_block_size helper since it's a
common function.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
2017-01-15 13:56:45 +08:00
Darrick J. Wong fff869cb9c fstests: use get_block_size helper
Don't open code grabbing the block size; just use the helper.

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>
2016-10-07 17:18:53 +08:00
Theodore Ts'o dddae984bc Rename _test_mount to _test_cycle_mount
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 _test_mount performs "_test_mount ; _test_umount"
so mechnically rename this function to _test_cycle_mount.  This was
done mechnically using the script fragment:

git grep -E "_test_remount" | \
	awk -F: '{print $1}' | sort -u | grep -v tests/xfs/189 \
	xargs sed -i 's/_test_remount/_test_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>
2016-02-19 10:45:04 +11:00
Darrick J. Wong 2616587012 reflink: fix style problems in existing tests
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>
2016-02-12 09:39:05 -08:00
Christoph Hellwig 911efb0897 reflink: change to relative margins
NFS uses 32K blocks and thus the numbers used for sanity checking
various reflink operations are way off.  Change to relative margings
and increase them a bit to make NFS happy.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
2016-02-08 09:27:15 +11:00
Darrick J. Wong 813524b566 tests: use lowercase variables for all the new reflink tests
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>
2016-02-08 09:27:15 +11:00
Darrick J. Wong bed1fedae6 reflink: test accuracy of free block counts
Check that the free block counts seem to be handled correctly in
the reflink operation and subsequent attempts to rewrite reflinked
copies.

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>
2015-11-17 08:39:43 +11:00