summaryrefslogtreecommitdiff
path: root/tests/f_resize_inode/script
diff options
context:
space:
mode:
authorAndreas Dilger <adilger@dilger.ca>2018-06-22 11:43:54 -0400
committerTheodore Ts'o <tytso@mit.edu>2018-06-22 12:31:42 -0400
commit3819bff4cfceed456b2581228e66458cf800adf5 (patch)
tree8091ff8b525146546648e46dca8dd7a5ee4dce17 /tests/f_resize_inode/script
parent0647f84998bc7eebdde19ae38bb22156b2a0b34e (diff)
downloade2fsprogs-3819bff4cfceed456b2581228e66458cf800adf5.tar.gz
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>
Diffstat (limited to 'tests/f_resize_inode/script')
-rw-r--r--tests/f_resize_inode/script11
1 files changed, 5 insertions, 6 deletions
diff --git a/tests/f_resize_inode/script b/tests/f_resize_inode/script
index 190871b4..0243bdac 100644
--- a/tests/f_resize_inode/script
+++ b/tests/f_resize_inode/script
@@ -1,6 +1,9 @@
-if test -x $DEBUGFS_EXE; then
-
test_description="e2fsck with resize_inode"
+if ! test -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs)"
+ return 0
+fi
+
FSCK_OPT=-yf
OUT=$test_name.log
if [ -f $test_dir/expect.gz ]; then
@@ -137,7 +140,3 @@ else
fi
unset IMAGE FSCK_OPT OUT EXP
-
-else #if test -x $DEBUGFS_EXE; then
- echo "$test_name: $test_description: skipped"
-fi