xfsdump tests using tapes (rather than files) can pass the tape pathname
to the dump/restore helper functions using the -f option. Change
_parse_args() so that this can be done for file-based tests as well, so
that they don't have to set the global 'dump_file' variable before doing
the dump or restore.
Signed-off-by: Bill Kendall <wkendall@sgi.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
The cumulative restore tests call _do_restore_file_cum(),
which requires a dump level to be passed in the -l option
in order to determine whether the restore directory needs
to be prepared or not. -l is not a valid xfsrestore option,
so doing things this way prevents tests from passing options
to xfsrestore. It's more straightforward to have the test
call _prepare_restore_dir itself prior to starting a series
of cumulative restores.
Signed-off-by: Bill Kendall <wkendall@sgi.com>
Signed-off-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>
It turns out lsqa.pl nees the test number and description first in the
file, so move the GPL boilerplates below it.
Also remove acouple of cases where we have one full copyright line + gpl
boilerplate before the description and another copyright line after
the description.
Signed-off-by: Christoph Hellwig <hch@lst.de>
One of the big cpu time consumers when running xfsqa on UML
is forking of new processes. when looping lots of times,
using 'expr' to calculate the loop counter increment means
we fork at least once every loop. using shell builtins means
that we don't fork and many tests run substantially faster.
Some tests are even runnable with this modification. e.g. 110
went from taking 4500s to run down to 9s with the loop iterators
changed to avoid forking.
Signed-off-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
We need a repeatable sort order.
Merge of master-melb:xfs-cmds:25663a by kenmcd.
Execute bits changed from xxx to x--
Need LC_COLLATE set for sort like we do in other qa tests.
We need a repeatable sort order.
use find with src/lstat64. Should convert other tests in the future.
Merge of master-melb:xfs-cmds:24773a by kenmcd.
Stop using ls for comparison with dump/restore for 065 and instead
use find with src/lstat64. Should convert other tests in the future.