The ability to use a mounted device node as the primary argument
to xfs_growfs was added back in with:
7e8275f8 xfs_growfs: allow mounted device node as argument
because it was an undocumented behavior that some userspace depended on.
This test exercises that functionality.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
This reverts commit 37520a314b.
This commit has been reported to regress, at least, xfs/139 and
btrfs/09[58]. Let's revert it for now.
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
Yang Xu reported a test failure in xfs/148 that I think comes from
extended attributes being returned in a different order than they were
set. Since order isn't important in this test, sort the output to make
it consistent.
Reported-by: Yang Xu <xuyang2018.ky@cn.fujitsu.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
After this test is passed, checking filesystems will execute. Then
xfs_logprint will be failed and xfs_repair will take a long time
because there is not really creating the file system in this test
and wipefs executes before this test. So there is no need checking
filesystems.
Signed-off-by: Baihua Lu <lubaihua0331@gmail.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
With a recent change to xfs_io[1], the fsxattr.xflags output line
has added another flag column, so xfs/207 starts failing.
Rather than testing for an exact set of flags, test whether the
specific flag we are interested in is set or unset.
[1] xfs_io/lsattr: expose FS_XFLAG_HASATTR flag
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Amir Goldstein <amir73il@gmail.com>
Reviewed-by: Bill O'Donnell <billodo@redhat.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
There are some testcases use below two kind of commands to get file
size, generalize the second way as global function _get_filesize()
to simply codes.
1. ls -l $1 | $AWK_PROG '{print $5}'
2. stat -c %s $1
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
This test corrupts the filesystem to see what assertions and other
things to get logged, so don't treat that as a failure.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
Calling src/<file> without path '$here' may cause the problem that
the file cannot be found.
For example, Running generic/192 with overlayfs(Let ubifs as base
fs) yields the following output:
generic/192 - output mismatch
QA output created by 192
sleep for 5 seconds
test
+./common/rc: line 316: src/t_dir_type: No such file or directory
delta1 is in range
delta2 is in range
...
When the use case fails, the call stack in generic/192 is:
local unknowns=$(src/t_dir_type $dir u | wc -l) common/rc
_supports_filetype common/rc
_overlay_mount common/overlay
_overlay_test_mount common/overlay
_test_mount common/rc
_test_cycle_mount generic/192
Before _test_cycle_mount() being invoked, generic/192 executed 'cd
/' to change work dir from 'xfstests-dev' to '/', so src/t_dir_type
was not found.
[Eryu: some tests run src/<file> as regular user, don't add $here
prefix in such case, as a regular user may have no search permission
on $here]
Signed-off-by: Zhihao Cheng <chengzhihao1@huawei.com>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
On old kernel, since commit ded188b860 ("xfs: Fix the situation
that mount operation rejects corrupted XFS") running this case got
the mismatched output, as below:
-----------------------------------
+ check fs
+ corrupt image
+ mount image && modify files
-broken: 1
+broken: 0
+ repair fs
+ mount image (2)
------------------------------------
It fails because the broken is always equal to 0 when
_try_scratch_mount succeed. So remove this wrong assignment
operation.
Signed-off-by: Yang Xu <xuyang2018.jy@cn.fujitsu.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
Fix this test to use _scratch_mkfs_xfs instead of the open-coded mkfs
call. This is needed to make the test succeed when XFS DAX is enabled
and mkfs enables reflink by default.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
These tests primarily check that writes to a corrupt fs don't take down
the system, and that running repair will fix them. Therefore, redirect
stderr to seqres.full so that we don't fail these tests in DAX mode.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
This test depends on the pwrite creating delalloc blocks, which doesn't
happen if the scratch fs is mounted in dax mode (or has an extent size
hint applied). Therefore, check for delalloc blocks and _notrun if we
didn't get any.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
xfs/097 already requires finobt support by
_require_xfs_mkfs_finobt
_require_xfs_finobt
Always enable finobt feature at mkfs time, so test runs even finobt
is not set in MKFS_OPTIONS.
[Eryu: rewrite commit summary and log]
Signed-off-by: Yong Sun <yosun@suse.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
There's a bug on xfs cause statfs get negative f_ffree value from
a project quota directory. It's fixed by "de7243057 fs/xfs: fix
f_ffree value for statfs when project quota is set". So add statfs
testing on project quota block and inode count limit.
Signed-off-by: Zorro Lang <zlang@redhat.com>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
Check that the new v5 bulkstat commands do everything the old one do,
and then make sure the new functionality actually works.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
Create a helper function to return the number of AGs of a mounted
filesystem so that we can get rid of the open-coded versions in various
tests. The new helper will be used in a subsequent patch.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
The new v5 bulkstat and inumbers structures are correctly padded so that
no format changes are necessary across platforms, so add them to the
output.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
Don't check the structure size of the inogrp/bstat/fsop_bulkreq
structures because they're incorrectly padded. When we remove the
old typdefs the old filter stops working.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
Unmount the V4 filesystem we forcibly created to run this test during
test cleanup so that the post-test wrapup checks won't try to remount
the filesystem with different MOUNT_OPTIONS (specifically, the ones
that get screened out by _force_xfsv4_mount_options) and fail.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
A couple of releases ago, xfs_repair was patched to set the root inode
link count correctly when messing around with lost inodes. However, the
old xfs_repair remains in the golden output, so remove it and filter the
line so that we don't cause 'new' regressions on old software.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
For all the tests which require that quotas be disabled, remove the
quota mount options before mounting the scratch filesystem.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>