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/d_dumpe2fs_group_only/script | |
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/d_dumpe2fs_group_only/script')
-rw-r--r-- | tests/d_dumpe2fs_group_only/script | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/tests/d_dumpe2fs_group_only/script b/tests/d_dumpe2fs_group_only/script index 50481f02..c3ab7e2b 100644 --- a/tests/d_dumpe2fs_group_only/script +++ b/tests/d_dumpe2fs_group_only/script @@ -4,7 +4,10 @@ if [ $(uname -s) = "Darwin" ]; then return 0 fi -if test -x $DEBUGFS_EXE; then +if ! test -x $DEBUGFS_EXE; then + echo "$test_name: $test_description: skipped (no debugfs)" + return 0 +fi FSCK_OPT=-fy OUT=$test_name.log @@ -43,7 +46,3 @@ else fi unset IMAGE FSCK_OPT OUT EXP - -else #if test -x $DEBUGFS_EXE; then - echo "$test_name: $test_description: skipped" -fi |