This test creates some files, runs defrag on them,
and compares the before/after fragmentation as well
as file md5sums and timestamps.
The test currently expects to find e4defrag in
/usr/bin
It should be relatively easy to add more interestingly
fragmented files to the tests, as well as to test
that memory-mapped files aren't touched, etc -
but this gives us a framework.
V2: remount before checking file contents, and create
common.defrag.
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Not entirely sure how I managed this, but 198 was not in groups
so was never run - and wasn't in the makefile, so was never built.
Oops.
Fix that up, make it a generic test, and move it to the
aio-dio-regress subdir.
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
When nslookup is not available, execution would stop. This patch moves the
check for nslookup and the _get_fqdn function into the ./new script (since
this is the only place where it's used) and we don't fail any more but try
to find out our FQDN without nslookup.
Signed-off-by: Christian Kujau <lists@nerdbynature.de>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Don't list various non-mandatory options near the check for the
mandatory ones, and make the test for the mandatory ones a proper if
statements.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
Add two tests that check that log size scaling works correctly for old
and new maximum log sizes.
Signed-off-by: Dave Chinner <dgc@sgi.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Check that we correctly update the timestamps when writing to a file
through an mmap mapping. Currently fails for XFS due a VFS bug but
succeeds for many other filesystems.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
New test to test basic mixed fallocate + read & write,
includes a couple regression tests for bugs that ext4
hit. Uses xfs_io to generate fallocate calls, so requires
git xfsprogs and very recent glibc at this point.
Ext4 folks, this is hopefully a reasonable example of
how to add a new test. :)
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Also fix up 132 output, which was misfiltered due
to a bug in the filtering.
Doing this because I need this same filter for the next
added test.
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
This is just like test 072, but using fallocate instead
of the xfs ioctl. Just very basic fallocate tests.
Also adds a "prealloc" group (./check -g prealloc)
and a _require_xfs_io_falloc check.
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Commit 3ae9f2f8 purports to allow SCRATCH_DEV and SCRATCH_MNT to be
optional, but tests in common.config will cause check to exit with an
error if these environment variables are not defined. Fix this problem.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Christoph Hellwig <hch@lst.de>
The extN, reiserfs, gfs2, and btrfs filesysytem types should use the
same check for a block device as XFS and UDF, and not the test for
NFS, which was checking for host:/foo/bar/baz when checking for a
scratch device.
Also, the NFS logic was also incorrect, in that it would allow a
zero-length SCRATCH_DEV to continue.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Felix Blyakher <felixb@sgi.com>
Running _check_test_fs can take a non-trivial amount of time, and if a
test has been skipped because it doesn't work on Linux, or it doesn't
work of for ext4, it's pointless to re-run _check_test_fs. So move
the call to _check_test_fs so it is only run if a test is actually run.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Felix Blyakher <felixb@sgi.com>
Many/most dump tests include common.dump before checking
supported fs, and this means that even if the dump tests
are skipped, the sleep & filesystem check in _cleanup
gets run, which makes it take rather a long time to
skip these tests for non-xfs filesystems.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
configure & make succeeds w/o aio headers or libs,
so tests should handle that.
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Seems to work here... Also disable IRIX as supported,
since the comments & code say it doesn't work and
it short-circuits anyway.
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Make the following tests _supported_fs generic:
088 - test out CAP_DAC_OVERRIDE and CAP_DAC_SEARCH code
089 - Emulate the way Linux mount manipulates /etc/mtab
113 - aio-stress (explicitly mark as generic)
126 - tests various file permission options
129 - looptests
These all pass on ext3, ext4, btrfs, and gfs2 as well
as xfs.
Also remove "generic" group from "groups," which was
accidentally added.
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
These tests just do generic reads & writes with xfs_io;
if we add a "-F" they will run on other filesystems.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
There is already logic in 075 to gracefully skip nfs for fsx
invocations with -x (xfs-specific preallocation) - just extend
this to any non-xfs filesystem, and add to test 112 as well.
Later we can change this behavior to use fallocate and include
more filesystems but this gets some fsx coverage for now.
Test 127 doesn't seem to have anything xfs-specific, so mark
that as generic too.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Don't default to SGI copyright, someone else may be
making this test...
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>