Commit Graph

3119 Commits

Author SHA1 Message Date
Bill O'Donnell 6a6e65aa50 xfs: test xfs_db to ensure type size taken into account with new type
xfs_db should take type size into account when setting type.
If type size isn't updated whenever type is set, a false crc
error can occur due to the stale size. This test checks for
that false crc error.

Signed-off-by: Bill O'Donnell <billodo@redhat.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
2017-07-28 18:53:51 +08:00
Xiao Yang 22b17d9e4f common/rc: factor out _ext4_disable_extent_zeroout() helper
1) This pattern is repeated in several seek_data/hole tests
   (e.g. generic/285, generic/436, generic/445 generic/448)
   and generic/009.  A common _ext4_disable_extent_zeroout()
   helper could be added and applied by generic/009 and
   _require_seek_data_hole().

2) On some old kernels(e.g. v3.1-v3.6), when vfs recognizes
   SEEK_DATA/HOLE flag && ext4 has no extent zeroout tunable
   in sysfs, these cases may trigger "sysfs entry not found"
   issue.  We can add check if extent_max_zeroout_kb exists
   on ext4 filesystem.
   The extent_max_zeroout_kb is introduced by:
   '67a5da564f97 ("ext4: make the zero-out chunk size tunable")'

3) Declare several vars as local in _require_seek_data_hole().

Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
2017-07-28 18:53:51 +08:00
Ernesto A. Fernández 8489391928 common/rc: support reiserfs in _scratch_mkfs_sized
Signed-off-by: Ernesto A. Fernández <ernesto.mnd.fernandez@gmail.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
2017-07-28 18:53:51 +08:00
Zorro Lang d613bee203 xfs/068: update golden output due to new operations in fsstress
I added some new operatoins to fsstress, and it changed the total
number of test operstions.

xfs/068 use a fixed seed (-s) and number of operations (-n) to run
fsstress, to get fixed number of files and directories. Due to my
patches break these fixed things, so update its expected result in
golden image.

Signed-off-by: Zorro Lang <zlang@redhat.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
2017-07-28 18:53:51 +08:00
Zorro Lang 3fcc2c75bf fsstress: add AIO read/write and fsync test
We found some bugs by aio read/write test, but there's no such
operations in fsstress. So add AIO test into fsstress to increase
AIO stress test.

Due to most kernels don't support aio fsync, so set its test
frequency to zero as default.

Signed-off-by: Zorro Lang <zlang@redhat.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
2017-07-28 18:53:50 +08:00
Zorro Lang 80499d8f5f fsstress: new writev and readv operations test
We found some bugs by writev operations recently, writev can cover
different test than normal write operation, so add writev and readv
operations into fsstress.

Signed-off-by: Zorro Lang <zlang@redhat.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
2017-07-28 18:53:50 +08:00
Eric Biggers fec7352230 include: remove some unused headers
test.h and usctest.h aren't used by anything.  Get rid of them.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
2017-07-28 18:53:50 +08:00
Eric Biggers fb05a91808 build: remove IRIX-specific build logic
As xfstests is no longer supported on IRIX, remove the ability to build
xfstests for IRIX.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
2017-07-28 18:53:50 +08:00
Eric Biggers 4556c97ebf common: remove IRIX-specific code
As xfstests is no longer supported on IRIX, remove IRIX-specific code
from the common helper scripts.

[eguan: add _filter_devchar back as xfs/061 needs it]

Signed-off-by: Eric Biggers <ebiggers@google.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
2017-07-28 18:52:12 +08:00
Eric Biggers 48a473b5da tests: clean up per-OS output files
Some tests had separate output files for IRIX and Linux.  Now that the
IRIX ones have been removed, rename the Linux ones and remove the
now-unneeded .cfg files and calls to _link_out_file.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
2017-07-24 12:34:52 +08:00
Eric Biggers 2983eebf07 tests: remove IRIX support from tests also supported on Linux
Many tests claimed (via _supported_os) to work on both Linux and IRIX.
Since IRIX is no longer supported by xfstests, update these to claim
Linux support only.  Then remove any obvious IRIX-specific logic in the
tests, and any IRIX-specific golden output files.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
2017-07-24 12:34:41 +08:00
Eric Biggers 0e3b0ab584 README: remove IRIX-specific documentation
xfstests is no longer supported on IRIX, so remove the IRIX-specific
instructions for building and running xfstests.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
2017-07-24 12:26:33 +08:00
Eric Biggers 46a6604d39 tests: make shared/051 a generic test
The ACL test shared/051 was very similar to generic/099 which was not
being run and was just removed; most likely the script was copy+pasted
at some point.  Since shared/051 has been getting maintained+run and is
not really XFS and UDF-specific, move it to generic, reusing the old
number of 099.  One change was required for it to work on other
filesystems: the output of 'find' must be sorted.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
2017-07-24 12:23:39 +08:00
Eric Biggers 5b55643c45 tests: remove generic/099
This IRIX-specific ACL test was nearly identical to shared/051, which
has been better maintained and will be made a generic test in the next
commit.  Therefore, remove the existing generic/099.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
2017-07-24 12:22:18 +08:00
Eric Biggers 5cb1f2b055 tests: remove xfs/057 and xfs/058
These two IRIX and XFS-specific tests were just placeholders which
didn't actually test anything.  It also seems they were meant to use the
acl_get and acl_test programs, but those weren't even being compiled.
Get rid of all this unused stuff.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
2017-07-24 12:22:12 +08:00
Eric Biggers 1ce90e01a7 tests: remove xfs/114 and xfs/115
These two IRIX and XFS-specific tests tested the "parent pointer"
feature which is not implemented by XFS on Linux.  Just remove them.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
2017-07-24 12:22:07 +08:00
Eric Biggers 27518372dc tests: remove udf/101
This IRIX and UDF-specific test essentially just created a UDF
filesystem with a specific size.  This isn't really useful because there
already are many generic tests that do _scratch_mkfs_sized.  So just
delete the test rather than trying to port it to Linux.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
2017-07-24 12:22:04 +08:00
Eric Biggers 004e03ed15 tests: remove udf/098
udf/098 was an IRIX and UDF-specific test which tested xattrs.  But the
Linux UDF driver doesn't support xattrs, and even if it did there are
already generic xattr tests --- including now generic/097 which is
basically the same test.  So just delete udf/098.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
2017-07-24 12:21:50 +08:00
Eric Biggers 3c64e7819a tests: port xfs/095 to Linux
This tests upgrading the XFS log to v2.  Switch from the IRIX xfs_chver
program to xfs_db.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
2017-07-24 12:21:13 +08:00
Eric Biggers 74d977646c tests: port generic/097 to Linux
This IRIX-specific test did some basic testing of extended attributes.
Port it to Linux; this mainly involved updating it to use the 'getfattr'
and 'setfattr' programs instead 'attr'.  Note that although 'attr' is
available on Linux, it's mainly for IRIX compatibility, the man page
recommends against using it on non-XFS filesystems, and it doesn't
support listing user xattrs only.  (In the last point it actually
differs from IRIX 'attr', but probably no one cares anymore.)  getfattr
also sorts its output by xattr name, so its output will be the same on
all filesystems unlike 'attr -l'.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
2017-07-24 12:17:42 +08:00
Eric Biggers f5413189db tests: port generic/093 to Linux
This IRIX-specific test mainly tested whether a file's capabilities are
cleared when it is written to.  Port the test to the Linux libcap tools
and update it to expect the Linux semantics which are a little simpler:
capabilities are always cleared even if the program is root (or has
CAP_FSETID).  The test also tests that chmod doesn't affect open file
descriptors; this is mostly unrelated, but keep it in for now.

[eguan: add _require_test_program rule for src/writemod]

Signed-off-by: Eric Biggers <ebiggers@google.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
2017-07-24 12:13:35 +08:00
Eric Biggers 22ea2f8c0a generic/192: use shorter sleep and tolerate 2s delay
generic/192 would sleep 40 seconds, update a file's atime, and then
fail if the atime was not exactly 40 seconds later.  This is
unreliable since things may be slow enough to cause an extra second
to elapse.  "Fix" this by allowing for 2 seconds of delay.  Also,
while we're at it shorten the sleep to a much more reasonable 5
seconds.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
2017-07-21 15:30:09 +08:00
Eric Biggers fe7748f097 generic/421: stop test from hanging on buggy kernels
On some buggy kernels, the 'find' command in generic/421 encounters
a "Permission denied" error when trying to search $dir, so it
doesn't find the file it's supposed to.  This causes 'cat' to read
from stdin, hanging the test.  Quote the argument to cat to make the
test fail right away rather than hanging.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
2017-07-20 11:14:56 +08:00
Jeff Layton 3d2b240421 generic: add a less thorough testing mode for fsync-err program
Currently we just have this test run on a whitelist of filesystems,
but it would be best to be able to run it on all of them. The
problem is that a lot of filesystems basically shut down once they
hit metadata errors.

Allow the fsync-err testcase to operate in two different modes. One
mode just does basic testing to ensure that we get an error back on
all fd's when we fsync. The other does a more thorough test to
ensure that we get back 0 on subsequent fsyncs when there hasn't
been any write activity.

For now, we just opt-in to the more thorough testing on certain
filesystems: xfs, ext3 and ext4 on the generic test. All other
filesystems will run in simple mode.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
2017-07-19 14:56:45 +08:00
Ernesto A. Fernández e1f216ddf6 generic: add test of file mode when setfacl fails
Check that the group permission bits of a file are not altered when
setfacl fails. At the time of this patch the test fails for at least
ext2, ext4, jfs and btrfs.

The failure in setfacl is induced by filling the device and setting
as many user attributes to the file as possible. For xfs this is not
enough, and the test will not run.

[eguan replaced setfattr with $SETFATTR_PROG and added enospc group]

Signed-off-by: Ernesto A. Fernández <ernesto.mnd.fernandez@gmail.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
2017-07-19 14:47:58 +08:00