Commit Graph

5 Commits

Author SHA1 Message Date
Andreas Dilger
c5d9d3ce5f tests: don't run sed multiple times on test output
Don't call sed multiple times on the output, and avoid the use
of temporary files, or if possible.  It would be convenient to
use "sed -i" to only update the output file once, but this is
not portable to all platforms.

[ Fixed a few test regression failures --tytso ]

Signed-off-by: Andreas Dilger <adilger@dilger.ca>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-06-22 17:59:35 -04:00
Andreas Dilger
b7454eb8ee tests: remove redundant sed filtering
Now that the majority of device name filtering is in filter.sed,
it does not need to be specified explicitly for every test.

Fix the error message printed in debugfs when opening the device
to match that used in other tools.  This simplifies the filtering,
and will be helpful if debugfs messages are internationalized.

[ Fixed up some test failures in m_hugefile t_uninit_bg_rm --tytso ]

Signed-off-by: Andreas Dilger <adilger@dilger.ca>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-06-22 14:06:53 -04:00
Andreas Dilger
3819bff4cf tests: clean up $DEBUGFS_EXE usage in scripts
Instead of putting the entire test script under an implicit
"if test -x $DEBUGFS_EXE" conditional (sometimes indenting
the code, and sometimes not), rather check for the reverse
and exit the test script early if $DEBUGFS_EXE is missing.

In some places, tests were running $DEBUGFS_EXE directly,
when they should be running $DEBUGFS (which will run with
Fortify, or other options).

[ Fixed up missing exit statement in f_detect_junk. --tytso ]

Signed-off-by: Andreas Dilger <adilger@dilger.ca>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-06-22 12:31:42 -04:00
Andreas Dilger
845eac42ed tests: don't leave temporary files at end of test
Don't leave temp files around after test has completed successfully.
Some test scripts were creating their own temporary files, and in
some cases test_one was skipping a test completely (e.g. slow) after
the temp file had been created.

Signed-off-by: Andreas Dilger <adilger@dilger.ca>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2017-10-15 16:04:46 -04:00
Darrick J. Wong
2f8c0d028c debugfs: implement fallocate
Implement a fallocate function for debugfs, and add some tests to
demonstrate that it works (more or less).

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2015-06-10 20:01:24 -04:00