summaryrefslogtreecommitdiff
path: root/tests/r_ext4_small_bg
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/r_ext4_small_bg
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/r_ext4_small_bg')
-rw-r--r--tests/r_ext4_small_bg/script12
1 files changed, 5 insertions, 7 deletions
diff --git a/tests/r_ext4_small_bg/script b/tests/r_ext4_small_bg/script
index cdc6e4a3..87f5084d 100644
--- a/tests/r_ext4_small_bg/script
+++ b/tests/r_ext4_small_bg/script
@@ -1,6 +1,9 @@
-if test -x $RESIZE2FS_EXE -a -x $DEBUGFS_EXE; then
-
test_description="ext4 1024 blocksize with small block groups"
+if ! test -x $RESIZE2FS_EXE -o ! -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs/resize2fs)"
+ return 0
+fi
+
FEATURES="-t ext4 -O ^resize_inode -b 1024 -g 512"
SIZE_1=64M
SIZE_2=2G
@@ -24,8 +27,3 @@ else
fi
unset FEATURES SIZE_1 SIZE_2 LOG E2FSCK
-
-else #if test -x $RESIZE2FS_EXE -a -x $DEBUGFS_EXE; then
- echo "$test_name: $test_description: skipped"
-fi
-