Commit Graph

2653 Commits

Author SHA1 Message Date
Darrick J. Wong 27516d43f4 common/dmerror: fix mount option issues
Calling _mount doesn't work when we want to add mount options such
as realtime devices. Fix it by calling _scratch_options first then
mount with $SCRATCH_OPTIONS.

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>
2016-08-05 10:32:10 +08:00
Darrick J. Wong f9261d3646 xfs/128: cycle_mount the scratch device
This test uses the scratch device, so cycle that, not the test dev.
This is also a xfs_fsr test, so put it in the fsr group.

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>
2016-08-05 10:32:10 +08:00
Darrick J. Wong dd6eca7b0e common/rc: optionally test xfs_repair index rebuilding
Run xfs_repair twice more at the end of each test -- once to rebuild
the btree indices, and again with -n to check the rebuild work.
This is in addition to the regular dry-run spot check.

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>
2016-08-05 10:32:10 +08:00
Darrick J. Wong 49b0eda17a xfs/234: use scratch device helpers
Use the helper functions for scratch devices. This fixes a problem
where xfs/234 fails when there's a realtime device.

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-08-05 10:32:10 +08:00
Darrick J. Wong 7c848d24bb xfs/179: use scratch device helpers
Use the helper functions for scratch devices. This fixes a problem
where xfs/179 fails when there's a realtime device.

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-08-05 10:32:10 +08:00
Darrick J. Wong b85dfac4ca xfs/129: fix post-metadump remounting idiocy
Use the standard _scratch_mount to mount the filesystem from the
restored image, instead of trying to call mount directly. This is
needed in case we had custom mount options (like rtdev).

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-08-05 10:32:10 +08:00
Darrick J. Wong 2f8d7b2ff0 common/reflink: actually test dedupe on scratch device
In _require_scratch_dedupe, test the scratch device, not the
testdev.

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-08-05 10:32:10 +08:00
Darrick J. Wong c85204b430 xfs/122: list the new log redo items
List the new log redo items. These should have stable sizes.

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-08-05 10:32:10 +08:00
Darrick J. Wong 1496a4f5e9 xfs/310: fix the size calculation for the huge device
Fix the calculation of the dmhuge size. The previous calculation
tried to calculate the size correctly, but got it wrong for 1k block
sizes. Therefore, clean the whole mess up.

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-08-05 10:32:10 +08:00
Darrick J. Wong 946b199460 xfs: use rmapbt-checking helper
Don't open-code _notrun checks for the rmapbt, 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-08-05 10:32:10 +08:00
Darrick J. Wong 7c61e4c39e xfs/26[34]: remove duplicate tests
These two tests were accidentally double-added as xfs/30[78], but
the newer versions have fixed up helper usage and fewer whitespace
problems, so nuke the old tests.

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-08-05 10:32:10 +08:00
Christoph Hellwig 700b17bf92 generic/095: update warning whitelist
The recent direct I/O path refactor changed the function name in the
racing read case.  Update the test case to handle the new name in
addition to the old one.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
2016-08-03 10:56:22 +08:00
Omar Sandoval 6ba4f8a858 check: allow comments in exclude files
Sometimes it's useful to keep track of why we're excluding a particular
test. Technically, we can include whatever explanation we want in the
exclude file since we just grep for the test names, but properly
supporting comments is a little more robust. This patch makes it so that
the rest of a line after a '#' is ignored.

Signed-off-by: Omar Sandoval <osandov@fb.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
2016-08-03 10:52:17 +08:00
Eryu Guan 2d7ed0ce03 overlay: truncate running binaries from lower and upper dirs
Test truncate running executable binaries from lower and upper dirs.
truncate(2) should return ETXTBSY, not other errno nor segfault

Commit 03bea6040932 ("ovl: get_write_access() in truncate") fixed
this issue.

Reviewed-by: Xiong Zhou <xzhou@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
2016-07-31 10:37:08 +08:00
Eryu Guan 5f29278f84 overlay: remove stale file from upperdir
The upper dentry may become stale before we remove it from overlay,
e.g. file was removed from upperdir directly, which triggered
warning/oops in ovl_remove_and_whiteout().

Commit cfc9fde0b07c ("ovl: verify upper dentry in
ovl_remove_and_whiteout()") fixed this issue.

Reviewed-by: Xiong Zhou <xzhou@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
2016-07-31 10:37:08 +08:00
Eryu Guan 226279c01f overlay: dump overlay private xattr
Test dump overlay private xattr on overlayfs with multiple lower
dirs. All the lower layers, except the lowest one, should honor
overlay private xattr "trusted.overlay", which means it should not
be visible to user.

Commit b581755b1c56 ("ovl: xattr filter fix") fixed this issue.

Reviewed-by: Xiong Zhou <xzhou@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
2016-07-31 10:37:08 +08:00
Wang Xiaoguang 4427c1a44f generic: run write(2) and fallocate(2) in parallel
Currently in btrfs, there is something wrong with fallocate(2)'s
data space reservation, it'll temporarily occupy more data space
thant it really needs, which in turn will impact other operations'
data request.

In this test case, it runs write(2) and fallocate(2) in parallel and
the total needed data space for these two operations don't exceed
whole fs free data space, to see whether we will get any unexpected
ENOSPC error.

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>
2016-07-31 10:37:08 +08:00
Zorro Lang b18191a1d0 xfs/106: rewrite to make it a reliable regression test
xfs/106 is testing basic functions of xfs_quota command, but
there're three problems prevent people from running it as a reliable
regression test (i.e. it's not in 'auto' group):

- It tests unavailable commands in current xfs_quota, e.g. "warn"
- Lack of test coverage of important commands, e.g. "disable,
  enable, off and remove" commands
- Test output doesn't match golden image

So rewrite this case to test as many xfs_quota sub-commands and
options as possible and add it to 'auto' group, except:

- some "-v" options
- all "-a" options, because it's hard to get deterministic output
- default quota, this should be already covered by other tests
- project command options, I will write another case to test it
- report command -l option, which is a new option and will cause
  failure when testing with xfsprogs prior to 3.1 version.
- quot command -c option, which may output different histogram in
  different systems or hosts.
- warn command, which is not currently implemented.
- print, df, free, help, quit and path commands.

Signed-off-by: Zorro Lang <zlang@redhat.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
2016-07-31 10:36:53 +08:00
Jan Kara 6721ab08bd generic/235: Fix false failures for some quota formats
Different quota format may print additional information in
repquota(8) output after standard quota information is printed. If
format does support this additional printouts, repquota(8) will
separate possible output by two empty lines even if format handler
doesn't actually printout anything (which is currently always the
case for queries test generic/235 does). If format doesn't support
additional printouts, these two empty lines are not present in the
output. This inconsistency causes false failures for some quota
formats.

Fix the problem by filtering out empty lines out of repquota(8)
output.

Signed-off-by: Jan Kara <jack@suse.cz>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
2016-07-21 17:44:30 +08:00
Qu Wenruo fc2b488fd4 btrfs: Update quick and auto tag for btrfs group
Update the following quick/auto tag based on their execution time

btrfs/007
btrfs/050
btrfs/100
btrfs/101

Two systems are used to determine their execution time.  One is
backed by an SATA spinning rust, whose maximum R/W speed is about
100MB/s, modern desktop performance. (VM1)

Another one is a VM inside a openstack pool, with stronger CPU and
memory performance along with high latency storage.  Maximum R/W
speed is around 150MB/s, latency is much higher than normal HDD
though. (VM2)

The 'quick' standard is a little more restrict, only when both
systems pass the test within 30s(+/- 10%), while 'auto' is less
restrict, any system can pass within 5min(+/- 10%) will still stay
in 'auto' group.

Other test cases don't fit both standards on both systems will not
be modified.

Execution time result: (Unit: seconds)
------------------------------------------------------
Test case No. | VM1        | VM2      | Modification |
------------------------------------------------------
btrfs/007     | 4          | 2        | +quick       |
btrfs/050     | 4          | 13       | +quick       |
btrfs/100     | 57         | 151      | -quick       |
btrfs/101     | 45         | 59       | -quick       |
------------------------------------------------------

Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
2016-07-21 17:32:52 +08:00
Jan Kara e1f94410fc common/filter: Improve xfs_io filter
On my test setup xfs_io reports 'nan' in bytes/s and ops/s fields
when the operation takes zero time. Account for that in
_filter_xfs_io.

Signed-off-by: Jan Kara <jack@suse.cz>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
2016-07-21 17:29:05 +08:00
Jan Kara 9b06a9fcb5 generic/294: Filter backquotes from mknod error output
Really old versions of coreutils (mine are 8.12) quote a filename in the
output with a backquote in the beginning and normal quote in the end.
Improve _filter_mknod to handle that.

Signed-off-by: Jan Kara <jack@suse.cz>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
2016-07-21 14:38:31 +08:00
Eric Sandeen cf94bc8633 generic/075,112: fix up fsx error handling
When fsx fails we try to copy failure state to the results/
dir, but in some cases we are using $seqres instead of
$seq or $seq instead of $here/$seq; fix this up so the
failure state is accurately captured in the results/ dir.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
2016-07-20 11:15:52 +08:00
Qu Wenruo a4f0a9bfd6 btrfs: send on fully deduped file
For fully deduped file, whose file extents are all pointing to the
same extent, btrfs backref walk can be very time consuming, long
enough to trigger softlock.

Unfortunately, btrfs send is one of the caller of such backref walk
under an O(n) loop, making the total time complexity to O(n^3) or
more.

And even worse, btrfs send will allocate memory in such loop, to
trigger OOM on system with small memory(<4G).

This test case will check if btrfs send will cause these problems.

Reporeted-by: Tsutomu Itoh <t-itoh@jp.fujitsu.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>
2016-07-19 12:20:43 +08:00
Xiao Yang b6594600df xfs/083: disable dmesg check
xfs/083 will corrupt the fs intentionally, there will be WARNINGs
in dmesg as expected, so here disable dmesg check.

Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
2016-07-19 12:15:52 +08:00