btrfsprogs v4.5.3 changed the formatting of some error messages.
This patch extends the filter for btrfs prop to handle those.
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
Add _require_runas and _runas functions instead of open-coding it in
test cases.
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
Commit 8469a8c1: "xfs/133-4: filter redundant projid 0 quota report
info out" added _filter_project_quota to common/filter, and this
conflicted with a _filter_project_quota function in generic/082. So
rename the function in generic/082 to avoid the conflict.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
ext4/271 runs in no journal mode (-onoload), so running test with
journal related mount options makes no sense, and test fails after
kernel commit 1e381f60dad9 ("ext4: do not allow journal_opts for fs
w/o journal"), journal related mount options are not allowed in no
journal mode. So _notrun if there're journal related mount options.
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
Some tests require that there's no certain mount option in
MKFS_OPTIONS, so introduce a new helper
_exclude_scratch_mount_option() to do the check on $MOUNT_OPTIONS.
Also convert generic/192 and xfs/134 to use this helper.
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
btrfs fi sync /mnt, now does not output anything for success,
so the 006.out should be updated.
This change in btrfs-progs was introduced in the commit
b005ca024990569d2de459485682158633937928
btrfs-progs: fi sync: make it silent by default
which was integrated at btrfs-progs version v4.5.2
Signed-off-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
Create file/dir over whiteout by another user, uid/gid of the
file/dir should be current fsuid/fsgid, not the mounter's.
This upstream kernel patch fixed the issue
d0e13f5 ovl: fix uid/gid when creating over whiteout
Reviewed-by: Xiong Zhou <xzhou@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
Test getcwd() failure after unsuccessful rmdir, the getcwd() call
should return the correct path.
Upstream commit ce9113bbcbf4 ("ovl: fix getcwd() failure after
unsuccessful rmdir") fixed this issue.
Reviewed-by: Xiong Zhou <xzhou@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
Test visible whiteout issue after renaming file from lowerdir to a
dir in upperdir.
Upstream commit 45d117389696 ("ovl: ignore lower entries when
checking purity of non-directory entries") fixed the issue
Reviewed-by: Xiong Zhou <xzhou@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
Usually xfs/186 _notrun on crc enabled XFS because of
_require_attr_v1, since v2 attr format is always enabled on v5 XFS.
But when testing on 512B block size XFS, i.e. MKFS_OPTIONS="-m crc=0
-b size=512", test fails. This is because crc enabled XFS was
created in the end, not 512B block size XFS with crc disabled, and
that's not what we want to test.
The reason why _scratch_mkfs_xfs creates a different XFS than
expected is that, it may ignore $MKFS_OPTIONS if mkfs fails due to
conflicts between $MKFS_OPTIONS and the provided mkfs options.
In the case of xfs/186, "-b size=512" conflicts with "-i size=512",
and the first mkfs fails, then it ends up with a 4k block size XFS
with crc enabled (the default config).
Fix it by checking crc enablement status and attr version in the
test, to make sure it's testing on expected XFS.
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
Test 186 won't run when crcs are enabled, because
attrv1 is not allowed with crc=1.
However, ftype is still allowed with crc=0, so
this creates v3 directories, and xfs_db prints
them as such (along with the filetype), which
breaks the test output.
We can filter & replace to fix up the test in
this case.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
A recent test uses the uuidgen utility to generate UUID-based
filenames, but this package is not necessarily installed as part of
the core packages of every distro.
As such, add the UUIDGEN_PROG environment variable to the common
configuration and update the test to require the existence of
uuidgen to run.
Signed-off-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
Btrfs after v4.2 kernel will leaks qgroup numbers for relocated data
extents, due to the design of tree block direct swap.
This test case will check if such data balance will corrupt qgroup.
Reported-by: Mark Fasheh <mfasheh@suse.de>
Reported-by: Filipe Manana <fdmanana@gmail.com>
Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
XFS had a bug to hang on remount in this case, this kernel commit
fix the issue.
5cb13dc cancel the setfilesize transation when io error happen
Reviewed-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
Test symlink to very long path, so that path could not be hold in
inode, then check symlink file contains correct path.
There was a bug in CRC XFS, that the path in remote symlink was not
correct, this issue is fixed by this kernel commit
2ac56d3 xfs: fix remote symlinks on V5/CRC filesystems
Reviewed-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
Commit 688f869 fixed this bug:
ext4: Initialize fsync transaction ids in ext4_new_inode()
We manually modify jbd2 journal_superblock_s.s_sequence to be a very
large number, which will greatly reduce the time taken to trigger
this bug, though it seems some too hacked.
Signed-off-by: Wang Xiaoguang <wangxg.fnst@cn.fujitsu.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
Test if qgroup can handle extent de-reference during reallocation.
"extent de-reference" means that reducing an extent's reference
count or freeing an extent.
Although current qgroup can handle it, we still need to prevent any
regression which may break current qgroup.
Signed-off-by: Lu Fengqi <lufq.fnst@cn.fujitsu.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
Some tests use killall command, but killall may not exist.
We should check whether killall exists or not.
Signed-off-by: Masayoshi Mizuma <m.mizuma@jp.fujitsu.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
If we're running against a old version of xfsprogs that lacks some
of the structures that the golden output knows about, copy the
structure size definition from the golden output to the program
output. This way we can check for structure size mutations on old
xfsprogs without generating false error reports for structs that
don't exist in the old release.
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>
Ensure that we can handle the case where the refcount stays the same
even though the actual sharers changes.
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>
Make sure that we can handle multiple bmbt records mapping to a
single rmapbt record. This can happen if you fallocate more than
2^21 contiguous blocks to a file.
(Also add some helpers that can create huge devices with some
dm-zero and dm-snapshot fakery.)
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>