diff options
author | Andreas Dilger <adilger@dilger.ca> | 2018-06-22 11:43:54 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2018-06-22 12:31:42 -0400 |
commit | 3819bff4cfceed456b2581228e66458cf800adf5 (patch) | |
tree | 8091ff8b525146546648e46dca8dd7a5ee4dce17 /tests/r_meta_bg_shrink | |
parent | 0647f84998bc7eebdde19ae38bb22156b2a0b34e (diff) | |
download | e2fsprogs-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_meta_bg_shrink')
-rw-r--r-- | tests/r_meta_bg_shrink/script | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/tests/r_meta_bg_shrink/script b/tests/r_meta_bg_shrink/script index de777775..c47d4ff8 100644 --- a/tests/r_meta_bg_shrink/script +++ b/tests/r_meta_bg_shrink/script @@ -1,6 +1,9 @@ -if test -x $RESIZE2FS_EXE -a -x $DEBUGFS_EXE; then - test_description="meta_bg shrink" +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 64bit,meta_bg,^resize_inode -b 1024" SIZE_1=1G SIZE_2=48M @@ -27,8 +30,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 - |