Commit Graph

42 Commits

Author SHA1 Message Date
Dave Chinner 3345d2150e xfstests: clean up and simply check CLI option parsing
The options are parsed in a messy loop of option parsing and 
actions on secondary arguments. Turn it into something much neater
and easy to understand rather than a mess of temporary variables
and tortured logic...

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Phil White <pwhite@sgi.com>
[rjohnston@sgi.com fixed typos in commit message]
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
2013-03-26 10:40:20 -05:00
Dave Chinner 6b29d72898 xfstests: fold common into check
There is only one user of the common file now - check. Fold the two
into one file as the split of functionality is not necessary
anymore.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Phil White <pwhite@sgi.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
2013-03-26 10:40:19 -05:00
David Sterba 9958693bdb xfstests: determine path of logger
The path of the syslog writer utility 'logger' is hardcoded and not
always correct, use set_prog_path.

Signed-off-by: David Sterba <dsterba@suse.cz>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
2013-03-12 07:47:06 -05:00
David Sterba 6f000a96dc xfstests: make length of diff output configurable
In commit 11c1d79414 "xfstests: Change the diff output of failed
tests", the diff output of a failed test was hardcoded to 10 lines to
avoid overly long output and user can get the full output by manually
running the diff. However this is not always possible and convenient,
eg. in repeated automated tests where the required information is lost
after the test round finished. Then the caputred logs do not contain
enough informatin for analysis.

Introduce the DIFF_LENGTH env variable to tune the diff size, keeping it
10 as deafult and 0 to disable the limit.

Signed-off-by: David Sterba <dsterba@suse.cz>
Reviewed-by: Ben Myers <bpm@sgi.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
2013-03-05 14:42:36 -06:00
Lukas Czerner 11c1d79414 xfstests: Change the diff output of failed tests
Currently the entire diff is printed to the stdout in the case that the
test output template differs from the actual test run. However in some
cases the diff can be _very_ long. This commit changes it so that we
print only first 10 lines of the diff.

Also indent the diff output from the left by four spaces for better
output readability.

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Reviewed-by: Ben Myers <bpm@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
2013-01-17 16:43:19 -06:00
Stefan Behrens 4f12ea5a4e before test execution, print test number to syslog
When the xfstests are executed in a batch (like "check 001-299")
and produce syslog output, it is helpful to know which test was
causing the output. Therefore each time a test is started, a
syslog message is generated that contains the number of the
xfstest.

Signed-off-by: Stefan Behrens <sbehrens@giantdisaster.de>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
2012-03-08 16:28:31 -06:00
Lukas Czerner a323184c77 xfstests: Show duration of current test
It may be useful to compare both times, last and current, in the
xfstests output.

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: Alex Elder <aelder@sgi.com>
2010-08-30 10:11:56 -05:00
Dave Chinner 771e69de67 xfstests: Convert all tests to use /bin/bash
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>
2010-01-20 10:27:08 +11:00
Christoph Hellwig 40690b12d1 don't print scratch mkfs and mount options without scratch device
Also clean up the way the test configuration is printed.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
2009-07-07 16:20:59 +02:00
Theodore Ts'o 41c40276a4 skip _check_test_fs unless a test is actually run
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>
2009-06-20 19:01:43 +02:00
Felix Blyakher 491d467f3c Add GPL license plate to SGI's files.
Signed-off-by: Felix Blyakher <felixb@sgi.com>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Felix Blyakher <felixb@sgi.com>
2009-06-05 15:41:14 -05:00
Christoph Hellwig 74cff05770 xfstests: fix syntax error in check
Bash 3.2 wants a space before the closing "]" in a test.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Felix Blyakher <felixb@sgi.com>
2009-06-04 19:12:55 +02:00
Eric Sandeen 3ae9f2f8e8 Make the SCRATCH_DEV optional
Tests will fail gracefully if there is no SCRATCH_DEV defined, so change

the check script to allow it, and update README to reflect this.

This just makes it simpler to set up the tests, at the expense of
coverage.

Long term it might be nice to allow either SCRATCH_DEV xor TEST_DEV
to be missing, but for now this is simple.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2009-06-03 13:11:35 -05:00
Eric Sandeen 2014d88a12 Report which tests did get run
fs type mismatches are now likely enough that it may be
nice to report which tests -were- run at the end...

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2009-05-28 11:40:39 -05:00
Andrew Jones 4800bae8cc The test device is now used as a nfs filesystem.
Merge of master-melb:xfs-cmds:26462a by kenmcd.

  modified this test to run on xfs only.
2006-07-07 16:00:24 +00:00
Allan Randall b698d3d581 Added feature to allow remaining tests to be written to file
Merge of master-melb:xfs-cmds:26253a by kenmcd.

  Added feature to allow remaining tests to be written to file
2006-06-15 04:03:28 +00:00
Nathan Scott d259454b19 Update copyright annotations and license boilerplates to correspond with SGI Legals preferences.
Merge of master-melb:xfs-cmds:24329a by kenmcd.
2005-11-09 02:50:19 +00:00
ptools af9fb020ce Fixed general IRIX/Linux problems when running the -udf option.
Changed specific _scratch_xfs_mkfs to general _scratch_mkfs call.
2004-07-09 04:04:14 +00:00
fsgqa 837dc52c91 Fix merge botch resulting in each test being run twice by check. 2004-06-29 04:16:16 +00:00
ptools 81f3c307df Fix issue with TIMESTAMP and added asg qa machines to common.config
Removed date file from TIMESTAMP var.
2004-06-18 06:14:48 +00:00
ptools ab2a0df1e3 Fixed merge issue with TIMESTAMP string printing twice.
Fixed merge issue with TIMESTAMP string printing twice.
2004-06-17 08:29:19 +00:00
fsgqa 562962e6b1 QA tweaks - use a single os type source mainly (drop get_os, use HOST_OS) 2004-06-16 06:08:04 +00:00
ptools 7facbfb74b Fix merge issues.
Removed debug flag.
2004-06-16 05:38:57 +00:00
ptools 048a7a8add More merge conflicts 2004-06-15 07:36:09 +00:00
fsgqa e23849bf53 cleanup some qa stuff
Get rid of checking log for recovery msgs. It's too much
hassle and probably not worth it.
2004-04-23 04:08:39 +00:00