This tests corner case in FITRIM implementation where range size is
smaller than file system block or zero. In this case FITRIM should fail
with EINVAL.
The problem was spotted in xfs and ext4 where in case of length = 0 the
'end' variable underflowed. In case of length smaller than 1 FSB FITRIM
finished successfully, but we really should rather return EINVAL in both
cases.
(This patch has to be applied after 'Use upstream version of fstrim
instead of the local one')
Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
The test covers several areas including enabling projid32bit
functionality dynamically by xfs_admin, dumping, restoring, quota
reporting and xfs_db projid values reporting.
This test case hits a bug with xfsdump/xfsrestore process on a
projid32bit enabled filesystem.
Eric Sandeen: change {16,32}less filenames to {16,32}bit, add quick group
Signed-off-by: Boris Ranto <ranto.boris@gmail.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Add three tests for verifying compatibility with xfsdump format 2.
Test 281 generates a format 2 dump and restores it.
Test 282 does a restore of a level 0 dump in the old dump format
followed by a restore of a level 1 dump in the current dump format.
Test 283 does a restore of a level 0 dump in the current dump format
followed by a restore of a level 1 dump in the old dump format.
Signed-off-by: Bill Kendall <wkendall@sgi.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
When offset + length is overflow of xfs_io builtin pread and pwrite in linux,
the error message should be "Invalid argument".
In 32_bit, offset + length should cause pread and pwrite to error, So the
out should be OK.
The patch fix as following:
- "pwrite64: Invalid argument" will be replaced with "pwrite64: File too large"
- "pread64: Invalid argument" will be replaced with "read 0/xxx bytes at offset <OFFSET>"
- delete _filter_xfs_io
- add auto group
- add 071.out.32
Signed-off-by: Peng Haitao <penght@cn.fujitsu.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
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>
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>
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>
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>
This test is for write-posix test. If writing a file when the disk is almost
full, the posix wants the call to write as much as possible but not none.
quote the POSIX:
If a write() requests that more bytes be written than there is room for
(for example, [XSI] [Option Start] the process' file size limit or
[Option End] the physical end of a medium), only as many bytes as there
is room for shall be written. For example, suppose there is space for 20
bytes more in a file before reaching a limit. A write of 512 bytes will
return 20. The next write of a non-zero number of bytes would give a
failure return (except as noted below).
Signed-off-by: Wu Bo <Wu.Bo@cn.fujitsu.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
This test is for preallocation test. If the disk is full, just with a prealloc
file has some free space that prealloc early. We need to check whether the write
to the free space is success or not.
Signed-off-by: Wu Bo <Wu.Bo@cn.fujitsu.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
This test is a stress test. It creates a set of threads for coping small files
into disk. I use a 2G disk for test, the ENOSPC arises usually but the disk is
not full under kenerl 3.0 with intel64.
Signed-off-by: Wu Bo <Wu.Bo@cn.fujitsu.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Implement the multi-stream placeholder tests 059 and 060. The comments
imply that these tests existed on IRIX, but I was unable to find them.
Test 059 does a simple 4-way dump and restore. Test 060 does a 4-way
dump, then restores each dump file individually (in a cumulative
fashion).
The tests are skipped if the installed xfsdump does not support
multi-stream output.
Reviewed-by: Alex Elder <aelder@sgi.com>
Signed-off-by: Bill Kendall <wkendall@sgi.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
- Same as 264 but with quota enabled.
- IO performed from $qa_user user
- fsstress granted with CAP_CHOWN capability.
Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
During stress testing we want to cover as much code paths as possible
fsstress is very good for this purpose. But it has expandable nature
(disk usage almost continually grow). So once it goes in no ENOSPC
condition it will be where till the end. But by running 'dd' writers
in parallel we can regularly trigger ENOSPC but only for a limited
periods of time because each time it opens the same file with O_TRUNC.
Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
This patch adds a couple of tests for xfsdump when multiple media files
are used. 267 tests the case where a file is split across multiple media
files, and 268 tests the case where a file ends on one media file and
the next media file starts on another file. These tests use a small
media file size (xfsdump -d) so that they don't rely on having to hit
end-of-tape.
Signed-off-by: Bill Kendall <wkendall@sgi.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Add a test for xfsdump -D, which skips unchanged directories during
an incremental backup. After doing an initial backup, a new file is
added to one directory (to verify that changed directories are
backed up) and several files are appended to. Then an incremental
backup is done with -D set. The test verifies the original and
restored filesystems match after applying the base and incremental
backups, and that the incremental restore output indicates that only
the one changed directory was backed up.
Signed-off-by: Bill Kendall <wkendall@sgi.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
This will verify the various raid features in btrfs and device
replacement functionality.
Signed-off-by: Anand Jain <Anand.Jain@oracle.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>