Introduce a new test to verify xfs_quota administrator commands can
deal with invalid XFS mount path properly without NULL pointer
dereference issue.
Signed-off-by: Jie Liu <jeff.liu@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dave Chinner <david@fromorbit.com>
For historical reasons beyond my knowledge xfstests tries to abuse the
scratch device as test device for nfs and udf. Because not all test
have inherited the right usage of the _setup_testdir and _cleanup_testdir
helpers this leads to lots of unessecary test failures.
Remove the special casing, which gets nfs down to a minimal number of
failures.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Sugned-off-by: Dave Chinner <david@fromorbit.com>
xfs/206 displays the output for mkfs.xfs, xfs_growfs and xfs_info.
Change the filtering to hide the new output for the field type
feature.
While cleaning up the ftype output, also clean up the projid32bit
output in xfs_growfs and xfs_info.
Signed-off-by: Mark Tinguely <tinguely@sgi.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
We just want to remove "block device" in _filter_ro_mount(), so add
"mount:" back.
Add one more call of _filter_ro_mount() in xfs/200 to match 200.out.
Signed-off-by: Eryu Guan <eguan@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
Multi-stream xfsdump/xfsrestore of more than partialmax wholly-sparse
files segfaults with the following warning:
"partial_reg: Out of records. Extend attrs applied early."
Add a test that dumps and restores partialmax + 1 wholly-sparse files.
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
Verify extended attributes are not lost after multi-stream
xfsdump/xfsrestore of wholly-sparse files. The restore succeeds,
however the extended attributes for that file are lost.
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
Test xfs/016 fails to run due to invalid mkfs options. The log size
is reported as too small according to the minimum log size
calculation:
log size 512 blocks too small, minimum size is 853 blocks
Update log_size to the currently specified minimum.
Signed-off-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
In some cases selinux's creation of an xattr on the temporary
fd creates a local xattr, but the file we are trying to
defragment has attrs in extent format, and the forkoff mismatch
will cause xfs_fsr to fail. This test demonstrates it; I
have old patches sent to the list long ago that should fix
it. I'll resend them soon.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
test xfs/205 expects a certain log size, but defaults have
changed, the logs are bigger, and this test now fails w/ early
ENOSPC:
QA output created by 205
+ !!! disk full (expected)
+ !!! disk full (expected)
+ !!! disk full (expected)
*** one file
+ !!! disk full (expected)
*** one file, a few bytes at a time
...
Fix this by specifying the log size at mkfs time, so freespace is
as the test expects it to be.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
Long device names may be split onto their own line
on quota output:
Filesystem Blocks Quota Limit Warn/Time Mounted on
/dev/mapper/my-very-very-very-long-devicename
48M 0 0 00 [------] /mnt/scratch
which breaks tests that capture quota output - currently,
only xfs/108.
Add a _filter_quota() which fixes this.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
The mount binary changed its output w.r.t. red-only devices, and
stopped referring to a "block device."
This broke at least test xfs/200; add a common filter to remove
the "block device" from older mount binary output, and change
the 200.out file to match.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
Test 259 tries to make a loop device size which is 1 byte less
than 4T; losetup now warns that this makes little sense, and
the warning breaks the test output:
+losetup: /mnt/test/259.image: warning: file does not fit into a 512-byte sector the end of the file will be ignored.
The RH QE testcase did originally use loopback, so did
not in effect test anything other than 512-multiple boundaries.
Just drop the non-512-byte-multiple cases, they produce
devices exactly the same size as their 512-byte-multiple
neighbors.
(FWIW, this is a regression test for the bug that
d943b11 mkfs: get size of device properly
fixed.)
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
With coreutils v8.16 the style of apostrophes changed from `word' to
'word'. This is breaking some tests which use the older form.
This commit introduces function changes the golden output of the
affected tests and introduces a filter for the older style output.
[dchinner: modified to use a global filter in check rather than
per-test filters]
[rjohnston: minor comment change]
Signed-off-by: Tomas Racek <tracek@redhat.com>
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
Add a test for testing all 3 (user, group and project) quotas together.
This is a modified version of xfstest 050.
Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com>
Reviewed-by: Rich Johnston <rjohnston@sgi.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
Tests the XFS symlinks that are small enough to be in the
inode, but were move to a remote symlink due to an extended
attribute were correctly removed.
Signed-off-by: Mark Tinguely <tinguely@sgi.com>
Reviewed-by: Ben Myers <bpm@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
It was missed when converting all the tests as it was using
${seq}.full and none of the regexes matched it. Fix it up to direct
the output to the correct place.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Ben Myers <bpm@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
Now in tests/ there are some test cases whose mode is 0644. But they
should be 0755. So fix it.
Signed-off-by: Zheng Liu <wenqing.lz@taobao.com>
Reviewed-by: Dave Chinner <david@redhat.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
The -F flag to xfs_io originally enabled it to operate on non-xfs
filesystems. This restriction was removed upstream in favor of
gracefully failing on the handful of operations that actually
required xfs, and the option was deprecated.
However, xfstests is still used on distros with older xfsprogs, and
so "xfs_io -F" was necessary throughout xfstests.
Simplify this by appending -F to XFS_IO_PROG when it's needed -
i.e. if we're using old xfsprogs on a non-xfs filesystem.
This will eliminate errors when new tests leave out the -F, and
if and when -F is finally removed, there will be one central
location in xfstests to update.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Acked-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Rich Johnston <rjohnston@sgi.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
Replace the usage of the script xfs_check and add the relevant code to
xfstests.
This is in preparation of the planned deprecation of xfs_check.
Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
xfstests have some change on the organization of the testcases
and common* files:
* The common* scripts have been reorganized into the common/ dir.
* The testcases have been reorganized into sub test dirs under tests/.
* The run.* scripts have been removed.
This patch uses the simple way to make install support above changes:
Make up one Makefile for each newly created subdirs, which can control
'make install' separately.
v2 introduces the following changes compared with v1:
* Ignore the file 'group' under the top dir, for it's useless in the new
structures.
* Remove the redundant comments in the Makefiles.
* Use XXX_DIR instead of XXX_SUBDIR in the Makefiles under common/ and tests/.
* Export TESTS_DIR in teh top level Makefile instead of tests/Makefile.
* Obtain the names of dirs for testcases by iterating sub dirs under /tests,
not by enumeration in tests/Makefile.
Signed-off-by: Wang Sheng-Hui <shhuiw@gmail.com>
Reviewed-by: Rich Johnston <rjohnston@sgi.com>
[rjohnston@sgi.com Minor modification to Makefile]
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
Test 262 uses ${} notation for some variables, and so is resistant
to grep and sed matches. Change it to use the same notation as the
rest of xfstests and fix up the output file redirections made in
previous patches.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Phil White <pwhite@sgi.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>