Commit Graph

1677 Commits

Author SHA1 Message Date
Chandra Seetharaman 385f466a3d xfstests: Test all 3 quotas simultaneously.
Add a test for testing all 3 (user, group and project) quotas together.

This is a modified version of xfstest 050.

Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com>
Reviewed-by: Rich Johnston <rjohnston@sgi.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
2013-08-27 12:09:12 -05:00
Liu Bo d943515bbc xfstests/btrfs/010: add snapshot-aware defrag for partial extents testcases
This is to test whether snapshot-aware defrag can work well on partial extents.

Reviewed-by: Ben Myers <bpm@sgi.com>
Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
2013-08-27 09:07:11 -05:00
Stefan Behrens 6bd8df93fa xfstests: btrfs/009 never shrinked or removed $seqres.full
Signed-off-by: Stefan Behrens <sbehrens@giantdisaster.de>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
2013-08-19 15:31:43 -05:00
Dwight Engen 511f9be259 xfstests generic/318: user namespace uid/gids in an ACL
Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
Reviewed-by: Rich Johnston <rjohnston@sgi.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
2013-08-19 15:30:42 -05:00
Dwight Engen 531a2473ce xfstests generic/317: user namespace uid/gids in an inode
[rjohnston: renumbered test to 317]

Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
Reviewed-by: <rjohnston@sgi.com>
Signed-off-by: <rjohnston@sgi.com>
2013-08-19 09:47:20 -05:00
Dwight Engen 3f424be639 xfstests: add nsexec user namespace helper
Add new program nsexec to facilitate creating/entering a user namespace. The
original source for the program is https://lwn.net/Articles/539940. I added
the -s option to become "root" in the user namespace.

Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
Reviewed-by: <rjohnston@sgi.com>
Signed-off-by: <rjohnston@sgi.com>
2013-08-19 09:40:12 -05:00
Stefan Behrens 0150222d1c xfstests: redirect output in btrfs/003
This test failed for me with output from 'btrfs balance':
     QA output created by 003
    +Done, had to relocate 4 out of 4 chunks
    +Done, had to relocate 5 out of 5 chunks
     Silence is golden

Signed-off-by: Stefan Behrens <sbehrens@giantdisaster.de>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
2013-08-16 10:53:51 -05:00
Lukas Czerner 9fe92ade36 xfstests: Allow to specify RESULT_BASE directory
This commit adds the possibility to specify RESULT_BASE directory from
the config file, or with environment variable. The default remains the
same "$here/results/".

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Reviewed-by: Chandra Seetharaman <sekharan@us.ibm.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
2013-08-16 09:27:55 -05:00
Lukas Czerner dcaf866187 xfstests: Allow to re-read configuration
Move configuration initialization into a function so we can re-read it
without the need to reinclude the common/config file which would be
ugly. This is in preparation for adding support for sections into config
files.

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Reviewed-by: Chandra Seetharaman <sekharan@us.ibm.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
2013-08-16 09:27:35 -05:00
Lukas Czerner 2ff460998d xfstests: Allow to recheck options in common/rc
Move configuration checks into separate function to allow us to recheck
the options without the need to reinclude the whole source file which is
ugly. We still run the check on include.

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Reviewed-by: Chandra Seetharaman <sekharan@us.ibm.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
2013-08-16 09:27:25 -05:00
Lukas Czerner c8527d1c8a xfstests: Export all important variables in common/config
Currently we do not export some of the important variables in
common/config. Fix this.

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Reviewed-by: Chandra Seetharaman <sekharan@us.ibm.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
2013-08-16 09:25:27 -05:00
Zheng Liu 060dd14cc8 xfstests: add a new test case for ext4 indirect-based file
After applied this commit (864688d3), xfstests #255 will not test a
file system that cannot support fallocate(2), such as a indirect-based
file in ext4.  So we need to add a new generic test case to test it.

The difference between #255 and this test case is only to use pwrite to
allocate blocks.  Other filesystems should survive in this test case.
In the mean time, a new argument '-u' is added into _test_generic_punch
not to run unwritten tests.

Signed-off-by: Zheng Liu <wenqing.lz@taobao.com>
Reviewed-by: Rich Johnston <rjohnston@sgi.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
2013-08-16 08:54:43 -05:00
Josef Bacik 617491caf4 Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: xfstests: make the scratch device for generic/256 slightly larger
Date: Tue, 02 Jul 2013 19:17:18 -0000
From: Josef Bacik <jbacik@fusionio.com>
X-Patchwork-Id: 5816
Message-Id: <1372792638-23957-1-git-send-email-jbacik@fusionio.com>
To: <linux-btrfs@vger.kernel.org>, <xfs@oss.sgi.com>

This is similar to a previous fix I sent.  1 gig makes us do mixed file block
groups for btrfs, so these enospc tests will usually fail because we don't have
space for metadata, which is the case for this test.  So jack the size up to
1.5gig so that btrfs can do its normal thing and pass the test.  Thanks,

Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Reviewed-by: Ben Myers <bpm@sgi.com>
2013-08-15 13:57:38 -05:00
Koen De Wit 74357dea4a xfstests: fix _mount_ops_filter() to support $TEST_DIR containing -o
If multiple mount options are given with multiple -o parameters,
_mount_ops_filter concatenates them by replacing all -o's with a comma
(except for the first -o).

If $TEST_DIR contains "-o" (e.g. /mnt/test-os/) you get errors like this:

   # ./check generic/002
     mount: mount point /mnt/test,s/ does not exist
     common/rc: retrying test device mount with external set
     mount: mount point /mnt/test,s/ does not exist
     common/rc: could not mount /dev/sdc3 on /mnt/test-os/

Fix it by only replacing -o's that are preceded by at least one space.

Signed-off-by: Koen De Wit <koen.de.wit@oracle.com>
Reviewed-by: Ben Myers <bpm@sgi.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
2013-08-15 11:27:54 -05:00
Josef Bacik f3df3fab7d xfstests: btrfs/009: regression test for subvol delete
We were allowing users to delete their default subvolume, which is problematic.
This test is a regression test to make sure we don't let that happen in the
future.  Thanks,

Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>

[rjohnston: renumbered test from 003 to 009]
2013-08-14 15:42:59 -05:00
Josef Bacik 6ef348f857 xfstests: btrfs/008, another send regression test
This is a regression test for a problem we had where we'd assume we had created
a directory if it only had subvols inside of it.  This was happening because
subvols would have lower inode numbers than our current send progress because
their inode numbers are based off of a different counter.  Thanks,

Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>

[rjohnston: renumbered test from 002 to 008]
2013-08-14 14:54:34 -05:00
Jan Schmidt af86f5668e xfstests btrfs/007: test send / receive
Basic send / receive functionality test for btrfs. Requires current
version of fsstress built (-x support). Relies on fssum tool but can
skip the test if it failed to build.

Signed-off-by: Jan Schmidt <list.xfs@jan-o-sch.net>
Reviewed-by: Josef Bacik <jbacik@fusionio.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>

[rjohnston: renumbered test from 316 to 007]
2013-08-13 17:17:03 -05:00
Jan Schmidt df0fd18101 xfstests: add fssum tool
fssum is a tool to build a recursive checksum for a file system. The home
repository of fssum is

    git://git.kernel.org/pub/scm/linux/kernel/git/arne/far-progs.git

Signed-off-by: Jan Schmidt <list.xfs@jan-o-sch.net>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
2013-08-13 17:08:56 -05:00
David Sterba aab6d4e47d xfstests: renumber existing btrfs tests to start with 1
Current numbering is inheried from the single testsuite series. There
are only 6 btrfs-specific tests and it makes more sense to start adding
new ones at a more natural place than 300-something. There's no overlap
with the old and new numbers and I hope there' will be no confusion when
referencing them.

Signed-off-by: David Sterba <dsterba@suse.cz>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
2013-08-13 16:16:27 -05:00
Josef Bacik 54d6adf7c9 xfstests: generic/315: allow a little tolerance for our used check
So df in btrfs is tricky at best, and relying on it for accurate information is
not great, but it's the best way to verify this test.  To get around btrfs being
inconsistent sometimes just use _within_tolerance to check our new df value to
make sure that our truncate did something.  With this patch I no longer see
transient failures of this test.  Thanks,

Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Reviewed-by: Jie Liu <jeff.liu@oracle.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
2013-07-30 13:37:11 -05:00
Josef Bacik f2c8cf5b3a xfstests: generic/314 filter out total from ls -l output
ls -l will show the nblocks for the directory, and this made it into the golden
output for 314.  The problem is nblocks is 0 for btrfs directories because we're
awesome, which makes us fail this test.  So filter out the "total blah" line of
ls -l so btrfs can pass this test too.  Thanks,

Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
2013-07-26 11:15:42 -05:00
Ben Myers aee563c643 Revert "xfstests: exit out if _scratch_mount fails"
This reverts commit 74bcf51c06.

Unfortunately this commit causes dmapi tests to be run on systems which
don't have dmapi installed, so they fail.

Signed-off-by: Ben Myers <bpm@sgi.com>
2013-07-26 11:07:33 -05:00
Jie Liu 6fe0ad6faf xfstests: generic/315, verify preallocated disk space is released per truncate
Introduce generic test 315 to verify if the disk space is
released after truncating a preallocated file back to the
old smaller size.  Before Linux-3.10, Btrfs/OCFS2 test
failed in this case.

The test file is fallocated with FALLOC_FL_KEEP_SIZE option.

Signed-off-by: Jie Liu <jeff.liu@oracle.com>
Reviewed-by: Ben Myers <bpm@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
2013-07-19 17:16:27 -05:00
Jie Liu b7ff5113a7 xfstests: clean up remake related matters from README
Cleanup 'remake' related matters from the README file as the
remake utility has already been removed by:

commit 609d17c4eb

	xfstests: remove remake script

Signed-off-by: Jie Liu <jeff.liu@oracle.com>
Reviewed-by: Ben Myers <bpm@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
2013-07-19 16:00:24 -05:00
David Sterba 31955a27b5 xfstests: skip generic/192 if noatime is set
Test generic/192 fails if noatime is set

generic/192
    -delta1 - access time after sleep in-core: 40
    -delta2 - access time after sleep on-disk: 40
    +delta1 - access time after sleep in-core: 0
    +delta2 - access time after sleep on-disk: 0

but it's pointless to test atime effects with noatime.

Signed-off-by: David Sterba <dsterba@suse.cz>
Reviewed-by: Ben Myers <bpm@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
2013-07-19 15:50:09 -05:00