If the kill fails because the processes have already terminates,
the output from kill (no such process) will cause the test to
fail. Make sure kill doesn't output anything.
Signed-off-by: Dave Chinner <david@fromorbit.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Printf format warnings and return value warnings need fixing.
Signed-off-by: Dave Chinner <david@fromorbit.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
tempnam() generates a compiler warning as a dangerous function.
This code doesn't care about security issues with tempnam, so
remove it and just manually build the filenames without the
randomness of tempnam.
Signed-off-by: Dave Chinner <david@fromorbit.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Use correct types for bulkstat structure to avoid pointer warnings.
Signed-off-by: Dave Chinner <david@fromorbit.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Otherwise it fails to match the golden output. Also add
the test to the auto group so that it is run regularly now
that the growfs problems are fixed.
Signed-off-by: Dave Chinner <david@fromorbit.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Using signal() to set up signal handlers doesn't always do what you
want. A recent upgrade made test 208 fail because wait() was not
getting interrupted by a SIGALRM. Tracing showed that signal() was
being converted to a sigaction(SA_RESTART) handler, which allows
syscalls that return ERESTARTSYS to immediately restart without
returning EINTR to the calling process. The kernel code returns
ERESTARTSYS to signal interruptions while in wait().
Replace the use of signal with sigaction() to ensure that the
SA_RESTART flag is not set and the EINTR is delivered to the process
sitting in wait(). This makes test 208 terminate at 200s again.
Signed-off-by: Dave Chinner <david@fromorbit.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
It does not contain the output from the recently added test,
so fails when the test actually succeeds.
Signed-off-by: Dave Chinner <david@fromorbit.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
While most tests use /bin/sh, they are dependent on /bin/sh being a
bash shell. Convert all the tests to execute via /bin/bash as it is
much, much simpler than trying to debug and remove all the bashisms
throughout the test code.
Signed-off-by: Dave Chinner <david@fromorbit.com>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
Remove explicit target-per-file rules in the subdirectories being
built and replace them with target based rules using the buildrules
hooks for doing this. This results in the makefiles being simpler,
smaller and more consistent. It does mean that all binaries are
linked against the common set of libraries but this does not cause
any harm.
This patch does not address the dmapi subdirectory of the xfstests
build system.
Signed-off-by: Dave Chinner <david@fromorbit.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
We don't need to see every compiler command line for every file that
is compiled. This makes it hard to see warnings and errors during
compile. For progress notification, we really only need to see the
directory/file being operated on.
Turn down the verbosity of output by suppressing various make output
and provide better overall visibility of which directory is being
operated on, what the operation is and what is being done to the
files by the build/clean process.
This patch only addresses the top level makefile and build rules; it
does not clean up the subdirectories - these will be addressed by a
followup patch. It also does not touch the dmapi section of the
xfstests build system.
The old style verbose builds can still be run via "make V=1 ..."
Signed-off-by: Dave Chinner <david@fromorbit.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Arrange to ignore duplicate entries reported by the repquota command.
This can happen if an id is used more than once (such as when two user
names are assigned the same uid).
Do this here by simply dropping any reported entries whose id number
has already been seen in the output.
Signed-off-by: Alex Elder <aelder@sgi.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Arrange to ignore duplicate entries reported by the "repquota"
xfs_quota command. This can happen if an id is used more than once
(such as when two user names are assigned the same uid).
Since we are already sorting the output we can accomplish this by
adding the "-u" (unique) option to the sort command. Shorten some
long lines while we're at it.
Signed-off-by: Alex Elder <aelder@sgi.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Test 073 is currently failing w/ xfs_repair problems, and when
it does, the whole series stops because the test dir still has
a loopback mounted filesystem on it, and it can't unmount.
Fix that.
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
I occasionally get failures in 131 like:
gethostbyname: Success
1) perror is the wrong thing for gethostbyname errors, so this
is confusing
2) the locktest thread doesn't get killed, so the fs
is busy and the next test fails when it can't unmount
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Looks like gfs2 (recently?) needs more arguments for the
mkfs overwrite test.
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Alex Elder <aelder@sgi.com>
We have very little fsr test coverage in the test suite right now.
042 is the only test that runs it, and it only defragments a single
file.
Improve the coverage by simply running xfs_fsr of the test
filesystem. This gives xfs_fsr a wide variety of inodes to try to
defragment. A simple test like this would have tripped over the
attr2 fork offset problems in the swap extents ioctl long ago
thanks to the varied nature of inodes the test suite leaves around
in this filesystem.
Signed-off-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
With the log size now going past 128MB, test 206 creates a filesystem
with a much larger log than 128MB. The golden output expects at
128MB log size, so the test breaks. Filter the log size out of the
mkfs output and golden output so that the test works on both older and
newer mkfs binaries.
Signed-off-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Loop devices are now created and destroyed on demand, and
the existing hacks to do this no longer work. Remove them.
Signed-off-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Add a test to check if we update the ctime properly if not updating
the mtime in futimens.
Uses a C program contributed by Eric Blake <ebb9@byu.net>.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <david@fromorbit.com>