Add 2 new test groups:
freeze: tests which test filesystem freeze
dangerous: tests which may hang or oops
The 2nd may be useful for automated testing to do i.e.
./check -g auto -x dangerous
./check -g auto,dangerous
to try to get fuller coverage before running into tests
which may panic or hang the box and stop the test cycle.
I doubt I have all the potential dangerous tests, but
they can be added later when found.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
To cover cases when fstrim arguments are not block/block group/file
system size aligned, we can be a bit more random. This commit changes
fstrim argument computing to use $RANDOM bash variable in order to have
different minlen, start, len argument settings and change the full fs
fstrim to be called randomly as well.
Also make kill and wait not complain about non existent process, since
it may have already finished before we attempt to kill it and wait for
it. No reason to fail the test.
Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
With Mitsuo Hayasaka's kernel patch "xfs: change available ranges of softlimit
and hardlimit in quota check", xfs quota behavior is slightly different.
This needs to be reflected in test 050. The new behavior is that we only start
the timer when we're above soft inode quota, and we don't start the timer when
we're at or below.
Signed-off-by: Ben Myers <bpm@sgi.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Btrfs progs has a defragment tool, so we can test 218 on btrfs now.
Signed-off-by: Liu Bo <liubo2009@cn.fujitsu.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
When I ran xfstests, 251 got failed cause I use a symlink and
"cp -axT" did not work as wish:
cp: cannot overwrite directory `/mnt/scratch/1' with non-directory
With this patch, 251 has passed.
Signed-off-by: Liu Bo <liubo2009@cn.fujitsu.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
This explicitly sends MS_SYNC as the flag to msync() in
fsx.c, in domapwrite(). Without this flag, the memory
written to the mmap'ed region will not be flushed to disk;
in fact, on Linux, calling msync() with a '0' or MS_ASYNC
flag is a no-op.
Signed-off-by: Curt Wohlgemuth <curtw@google.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Test 235 fails on ext2/ext3 with 1024 fs block size because a
16k write uses an extra metadata block. If we do a smaller write
this won't happen.
Reported by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
2 little fixes to common scsi_debug handling.
* don't consider the scsi_debug module in use in
_require, unless it can't be rmmod'd
* don't try to rmmod it in _put unless it is currently
loaded
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Ben Myers <bpm@sgi.com>
This tests the quota+freeze hang scenario described & fixed in
dcdbed85 quota: Fix deadlock with suspend and quotas
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Jan Kara <jack@suse.cz>
This test uses the scsi_debug module to test mkfs against
various physical & logical sector sizes, and with aligned
and unaligned devices.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
When the xfstests are executed in a batch (like "check 001-299")
and produce syslog output, it is helpful to know which test was
causing the output. Therefore each time a test is started, a
syslog message is generated that contains the number of the
xfstest.
Signed-off-by: Stefan Behrens <sbehrens@giantdisaster.de>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
This patch adds a couple more aio-stress runs to test 113. The first
simply adds -S, to test out AIO+DIO+O_SYNC. The second adds -S and -o
2, which directs aio-stress to only perform the random write test.
These two tests helped identify several bugs in ext4.
Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Removing the "-F" flag in xfs_io changed stat output.
Before the change when -F was used, whether or not the file
was on xfs, it skipped the extra FSGEOM call. Now that -F is
removed, it calls FSGEOM if the file is on an xfs fs. The "size"
grep in test 256 was a bit too loose and matched 2 lines if the
FSGEOM output was present, breaking the test.
A more specific grep for stat.size fixes this.
Reported-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Jan Kara was testing filesystem freeze, and was consistently locking
up, although my tests of 068 were passing. He pointed out that
he was running in read/write mode, and it was atime updates causing
the trouble. Sure enough, dropping "-w" from fsstress locked me up
too. Change this so we get better (and more realistic) coverage.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
cc: Jan Kara <jack@suse.cz>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
I was running 068 to test freeze changes, and realized that
"sync" is not in the op list when "-w" (write ops) is specified,
although fsync & fdatasync are. It seems to me that sync should
be a default write op as well.
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Distros(eg. RHEL5) with older version of coreutils have no truncate(1)
command. Use xfs_io instead to avoid "command not found" failures.
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
xfs_repair was leaving lost+found directory with a wrong link count when a
cleaned inode was re-used to create lost+found. This test case confirm that,
after xfs_repair is executed, the lost+found inode is left in a consistent
state.
Signed-off-by: Carlos Maiolino <cmaiolino@redhat.com>
Reviewed-by: Mark Tinguely <tinguely@sgi.com>
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Test 062 was made "generic" a while back, but it fails on any filesystem
which returns getfattr -R results (aka readdir results) in something
other than inode-order.
With a little awk-fu we can sort the records from getfattr -R so that
the output is the same for xfs as well as ext4, etc.
Also filter out lost+found which extN creates at mkfs time, but
some other filesystems do not.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
For some reason, non-xfs filesystems weren't getting mounted with
the selinux context; perhaps because none of the xattr tests used
to work on anything but xfs?
Anyway, 062 fails for extN unless we mount with the fs-wide
context.
So export SELINUX_MOUNT_OPTIONS for all filesystems.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
We failed to get fsck program to check the btrfs file system, it is
because btrfs uses its independent check tool which is named btrfsck
to check the file system, so the common checker -- fsck -- could not
find it, and reported there is no checker.
This patch fix it by using btrfsck directly.
Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
This commit fixes bd8ee45c. Changes:
- added a _require_btrfs helper function
- check for filefrag with _require_command
- always use _fail in case of errors
- added some comments
- removed $fresh code
- don't set FSTYP
Signed-off-by: Jan Schmidt <list.btrfs@jan-o-sch.net>
Signed-off-by: Christoph Hellwig <hch@lst.de>
This is a btrfs specific scratch test checking the backref walker. It
creates a file system with compressed and uncompressed data extents, picks
files randomly and uses filefrag to get their extents. It then asks the
btrfs utility (inspect-internal) to do the backref resolving from fs-logical
address (the one filefrag calls "physical") back to the inode number and
file-logical offset, verifying the result.
Signed-off-by: Jan Schmidt <list.btrfs@jan-o-sch.net>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Recent coreutils packages have changed the failure output of ln(1)
(again!) to be more verbose, breaking the filter in test 103:
-ln: creating symbolic link `SCRATCH_MNT/nosymlink/target' to `SCRATCH_MNT/nosymlink/source': Operation not permitted
+ln: failed to create symbolic link `SCRATCH_MNT/nosymlink/target' to `SCRATCH_MNT/nosymlink/source': Operation not permitted
Fix it.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>