diff --git a/tests/d_dumpe2fs_group_only/script b/tests/d_dumpe2fs_group_only/script
index 50481f0..c3ab7e2 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
diff --git a/tests/d_fallocate/script b/tests/d_fallocate/script
index b3982a3..b41eaaf 100644
--- a/tests/d_fallocate/script
+++ b/tests/d_fallocate/script
@@ -1,4 +1,7 @@
-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
@@ -143,8 +146,8 @@ sif /k size 9216000
 ENDL
 echo "ex /k" >> $TMPFILE.cmd2
 
-$DEBUGFS_EXE -w -f $TMPFILE.cmd $TMPFILE > /dev/null 2>&1
-$DEBUGFS_EXE -f $TMPFILE.cmd2 $TMPFILE >> $OUT.new 2>&1
+$DEBUGFS -w -f $TMPFILE.cmd $TMPFILE > /dev/null 2>&1
+$DEBUGFS -f $TMPFILE.cmd2 $TMPFILE >> $OUT.new 2>&1
 sed -f $cmd_dir/filter.sed < $OUT.new >> $OUT
 rm -rf $OUT.new $TMPFILE.cmd $TMPFILE.cmd2
 
@@ -169,7 +172,3 @@ fi
 rm -f $EXP
 
 unset IMAGE FSCK_OPT OUT EXP
-
-else #if test -x $DEBUGFS_EXE; then
-	echo "$test_name: $test_description: skipped"
-fi
diff --git a/tests/d_fallocate_bigalloc/script b/tests/d_fallocate_bigalloc/script
index 9022a2b..9c8fde8 100644
--- a/tests/d_fallocate_bigalloc/script
+++ b/tests/d_fallocate_bigalloc/script
@@ -1,4 +1,7 @@
-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
@@ -144,8 +147,8 @@ sif /k size 9216000
 ENDL
 echo "ex /k" >> $TMPFILE.cmd2
 
-$DEBUGFS_EXE -w -f $TMPFILE.cmd $TMPFILE > /dev/null 2>&1
-$DEBUGFS_EXE -f $TMPFILE.cmd2 $TMPFILE >> $OUT.new 2>&1
+$DEBUGFS -w -f $TMPFILE.cmd $TMPFILE > /dev/null 2>&1
+$DEBUGFS -f $TMPFILE.cmd2 $TMPFILE >> $OUT.new 2>&1
 sed -f $cmd_dir/filter.sed < $OUT.new >> $OUT
 rm -rf $OUT.new $TMPFILE.cmd $TMPFILE.cmd2
 
@@ -170,7 +173,3 @@ fi
 rm -f $EXP
 
 unset IMAGE FSCK_OPT OUT EXP
-
-else #if test -x $DEBUGFS_EXE; then
-	echo "$test_name: $test_description: skipped"
-fi
diff --git a/tests/d_fallocate_blkmap/script b/tests/d_fallocate_blkmap/script
index 9c48cbc..86d1dee 100644
--- a/tests/d_fallocate_blkmap/script
+++ b/tests/d_fallocate_blkmap/script
@@ -1,4 +1,7 @@
-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
@@ -53,8 +56,8 @@ ENDL
 echo "stat /a" >> $TMPFILE.cmd2
 echo "stat /b" >> $TMPFILE.cmd2
 
-$DEBUGFS_EXE -w -f $TMPFILE.cmd $TMPFILE > /dev/null 2>&1
-$DEBUGFS_EXE -f $TMPFILE.cmd2 $TMPFILE >> $OUT.new 2>&1
+$DEBUGFS -w -f $TMPFILE.cmd $TMPFILE > /dev/null 2>&1
+$DEBUGFS -f $TMPFILE.cmd2 $TMPFILE >> $OUT.new 2>&1
 sed -f $cmd_dir/filter.sed -e '/^.*time:.*$/d' < $OUT.new >> $OUT
 rm -rf $OUT.new $TMPFILE.cmd $TMPFILE.cmd2
 
@@ -79,7 +82,3 @@ else
 fi
 
 unset IMAGE FSCK_OPT OUT EXP
-
-else #if test -x $DEBUGFS_EXE; then
-	echo "$test_name: $test_description: skipped"
-fi
diff --git a/tests/d_inline_dump/script b/tests/d_inline_dump/script
index 6df34b6..3193f78 100644
--- a/tests/d_inline_dump/script
+++ b/tests/d_inline_dump/script
@@ -1,42 +1,43 @@
 if ! test -x $DEBUGFS_EXE; then
-   echo "$test_name: $test_description: skipped"
-else
-    OUT=$test_name.log
-    EXP=$test_dir/expect
-    VERIFY_FSCK_OPT=-yf
+	echo "$test_name: $test_description: skipped (no debugfs)"
+	return 0
+fi
+
+OUT=$test_name.log
+EXP=$test_dir/expect
+VERIFY_FSCK_OPT=-yf
 
-    ZIMAGE=$test_dir/image.gz
-    gzip -d < $ZIMAGE > $TMPFILE
+ZIMAGE=$test_dir/image.gz
+gzip -d < $ZIMAGE > $TMPFILE
 
-    echo "*** long file" > $OUT
-    $DEBUGFS -R 'stat /file' $TMPFILE 2>&1 | $CLEAN_OUTPUT >> $OUT 2>&1
-    echo "*** short file" >> $OUT
-    $DEBUGFS -R 'stat /shortfile' $TMPFILE 2>&1 | $CLEAN_OUTPUT >> $OUT 2>&1
-    echo >> $OUT
+echo "*** long file" > $OUT
+$DEBUGFS -R 'stat /file' $TMPFILE 2>&1 | $CLEAN_OUTPUT >> $OUT 2>&1
+echo "*** short file" >> $OUT
+$DEBUGFS -R 'stat /shortfile' $TMPFILE 2>&1 | $CLEAN_OUTPUT >> $OUT 2>&1
+echo >> $OUT
 
-    echo "*** long dir" >> $OUT
-    $DEBUGFS -R 'stat /dir' $TMPFILE 2>&1 | $CLEAN_OUTPUT >> $OUT 2>&1
-    echo "*** short dir" >> $OUT
-    $DEBUGFS -R 'stat /shortdir' $TMPFILE 2>&1 | $CLEAN_OUTPUT >> $OUT 2>&1
-    echo >> $OUT
+echo "*** long dir" >> $OUT
+$DEBUGFS -R 'stat /dir' $TMPFILE 2>&1 | $CLEAN_OUTPUT >> $OUT 2>&1
+echo "*** short dir" >> $OUT
+$DEBUGFS -R 'stat /shortdir' $TMPFILE 2>&1 | $CLEAN_OUTPUT >> $OUT 2>&1
+echo >> $OUT
 
-    echo "*** long link" >> $OUT
-    $DEBUGFS -R 'stat /link' $TMPFILE 2>&1 | $CLEAN_OUTPUT >> $OUT 2>&1
-    echo "*** short link" >> $OUT
-    $DEBUGFS -R 'stat /shortlink' $TMPFILE 2>&1 | $CLEAN_OUTPUT >> $OUT 2>&1
+echo "*** long link" >> $OUT
+$DEBUGFS -R 'stat /link' $TMPFILE 2>&1 | $CLEAN_OUTPUT >> $OUT 2>&1
+echo "*** short link" >> $OUT
+$DEBUGFS -R 'stat /shortlink' $TMPFILE 2>&1 | $CLEAN_OUTPUT >> $OUT 2>&1
 
-    echo "*** end test" >> $OUT
+echo "*** end test" >> $OUT
 
-    cmp -s $OUT $EXP
-    status=$?
+cmp -s $OUT $EXP
+status=$?
 
-    if [ "$status" = 0 ] ; then
+if [ "$status" = 0 ] ; then
 	echo "$test_name: $test_description: ok"
 	touch $test_name.ok
-    else
+else
 	echo "$test_name: $test_description: failed"
 	diff $DIFF_OPTS $EXP $OUT > $test_name.failed
-    fi
-
-    unset VERIFY_FSCK_OPT NATIVE_FSCK_OPT OUT EXP TEST_DATA VERIFY_DATA ZIMAGE
 fi
+
+unset VERIFY_FSCK_OPT NATIVE_FSCK_OPT OUT EXP TEST_DATA VERIFY_DATA ZIMAGE
diff --git a/tests/d_loaddump/script b/tests/d_loaddump/script
index 04723f7..c91a6e9 100644
--- a/tests/d_loaddump/script
+++ b/tests/d_loaddump/script
@@ -1,4 +1,7 @@
-if test -x $DEBUGFS_EXE; then
+if ! test -x $DEBUGFS_EXE; then
+	echo "$test_name: $test_description: skipped (no debugfs)"
+	return 0
+fi
 
 OUT=$test_name.log
 EXP=$test_dir/expect
@@ -47,7 +50,11 @@ echo Exit status is $status >> $OUT
 # Do the verification
 #
 
-rm -f $VERIFY_DATA $TEST_DATA $TMPFILE $OUT.new
+if [ "$SKIP_UNLINK" != "true" ]; then
+	rm -f $VERIFY_DATA $TEST_DATA $TMPFILE $OUT.new
+else
+	echo "TMPFILE=$TMPFILE"
+fi
 cmp -s $OUT $EXP
 status=$?
 
@@ -60,7 +67,3 @@ else
 fi
 
 unset VERIFY_FSCK_OPT NATIVE_FSCK_OPT OUT EXP TEST_DATA VERIFY_DATA
-
-else #if test -x $DEBUGFS_EXE; then
-	echo "$test_name: $test_description: skipped"
-fi 
diff --git a/tests/d_punch/script b/tests/d_punch/script
index 7a77c69..5bb51cd 100644
--- a/tests/d_punch/script
+++ b/tests/d_punch/script
@@ -1,4 +1,7 @@
-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
@@ -97,8 +100,8 @@ punch /f 1 8998
 ENDL
 echo "ex /f" >> $TMPFILE.cmd2
 
-$DEBUGFS_EXE -w -f $TMPFILE.cmd $TMPFILE > /dev/null 2>&1
-$DEBUGFS_EXE -f $TMPFILE.cmd2 $TMPFILE >> $OUT.new 2>&1
+$DEBUGFS -w -f $TMPFILE.cmd $TMPFILE > /dev/null 2>&1
+$DEBUGFS -f $TMPFILE.cmd2 $TMPFILE >> $OUT.new 2>&1
 sed -f $cmd_dir/filter.sed < $OUT.new >> $OUT
 rm -rf $OUT.new $TMPFILE.cmd $TMPFILE.cmd2
 
@@ -123,7 +126,3 @@ else
 fi
 
 unset IMAGE FSCK_OPT OUT EXP
-
-else #if test -x $DEBUGFS_EXE; then
-	echo "$test_name: $test_description: skipped"
-fi
diff --git a/tests/d_punch_bigalloc/script b/tests/d_punch_bigalloc/script
index 6eb0571..7d0c7fe 100644
--- a/tests/d_punch_bigalloc/script
+++ b/tests/d_punch_bigalloc/script
@@ -1,4 +1,7 @@
-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
@@ -98,8 +101,8 @@ punch /f 1 8998
 ENDL
 echo "ex /f" >> $TMPFILE.cmd2
 
-$DEBUGFS_EXE -w -f $TMPFILE.cmd $TMPFILE > /dev/null 2>&1
-$DEBUGFS_EXE -f $TMPFILE.cmd2 $TMPFILE >> $OUT.new 2>&1
+$DEBUGFS -w -f $TMPFILE.cmd $TMPFILE > /dev/null 2>&1
+$DEBUGFS -f $TMPFILE.cmd2 $TMPFILE >> $OUT.new 2>&1
 sed -f $cmd_dir/filter.sed < $OUT.new >> $OUT
 rm -rf $OUT.new $TMPFILE.cmd $TMPFILE.cmd2
 
@@ -124,7 +127,3 @@ else
 fi
 
 unset IMAGE FSCK_OPT OUT EXP
-
-else #if test -x $DEBUGFS_EXE; then
-	echo "$test_name: $test_description: skipped"
-fi
diff --git a/tests/d_special_files/script b/tests/d_special_files/script
index a8c2858..746d724 100644
--- a/tests/d_special_files/script
+++ b/tests/d_special_files/script
@@ -1,4 +1,7 @@
-if test -x $DEBUGFS_EXE; then
+if ! test -x $DEBUGFS_EXE; then
+	echo "$test_name: $test_description: skipped (no debugfs)"
+	return 0
+fi
 
 OUT=$test_name.log
 EXP=$test_dir/expect
@@ -88,7 +91,3 @@ else
 fi
 
 unset VERIFY_FSCK_OPT NATIVE_FSCK_OPT OUT EXP TEST_DATA VERIFY_DATA
-
-else #if test -x $DEBUGFS_EXE; then
-	echo "$test_name: $test_description: skipped"
-fi 
diff --git a/tests/d_xattr_edits/script b/tests/d_xattr_edits/script
index b6451ee..13550a1 100644
--- a/tests/d_xattr_edits/script
+++ b/tests/d_xattr_edits/script
@@ -1,4 +1,7 @@
-if test -x $DEBUGFS_EXE; then
+if ! test -x $DEBUGFS_EXE; then
+	echo "$test_name: $test_description: skipped (no debugfs)"
+	return 0
+fi
 
 OUT=$test_name.log
 EXP=$test_dir/expect
@@ -135,7 +138,3 @@ else
 fi
 
 unset VERIFY_FSCK_OPT NATIVE_FSCK_OPT OUT EXP TEST_DATA VERIFY_DATA
-
-else #if test -x $DEBUGFS_EXE; then
-	echo "$test_name: $test_description: skipped"
-fi
diff --git a/tests/d_xattr_sorting/script b/tests/d_xattr_sorting/script
index 9e6e362..a599f3c 100644
--- a/tests/d_xattr_sorting/script
+++ b/tests/d_xattr_sorting/script
@@ -1,4 +1,7 @@
-if test -x $DEBUGFS_EXE; then
+if ! test -x $DEBUGFS_EXE; then
+	echo "$test_name: $test_description: skipped (no debugfs)"
+	return 0
+fi
 
 OUT=$test_name.log
 EXP=$test_dir/expect
@@ -89,7 +92,3 @@ else
 fi
 
 unset VERIFY_FSCK_OPT NATIVE_FSCK_OPT OUT EXP TEST_DATA VERIFY_DATA
-
-else #if test -x $DEBUGFS_EXE; then
-	echo "$test_name: $test_description: skipped"
-fi
diff --git a/tests/f_badcluster/script b/tests/f_badcluster/script
index ea9e488..0012594 100644
--- a/tests/f_badcluster/script
+++ b/tests/f_badcluster/script
@@ -1,27 +1,28 @@
-if test -x $DEBUGFS_EXE; then
-	IMAGE=$test_dir/../f_badcluster/image.gz
-	OUT=$test_name.log
-	EXP=$test_dir/expect
-	gzip -d < $IMAGE > $TMPFILE
-	$FSCK -fy $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed > $OUT
-	$FSCK -fy $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT
-	$FSCK -fy $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT
-	for i in a b c d e f g; do echo "stat /$i"; done > $TMPFILE.tmp
-	echo "quit" >> $TMPFILE.tmp
-	$DEBUGFS_EXE -f $TMPFILE.tmp $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT
-	rm -f $TMPFILE.tmp
+if ! test -x $DEBUGFS_EXE; then
+	echo "$test_name: $test_description: skipped (no debugfs)"
+	return 0
+fi
+
+IMAGE=$test_dir/../f_badcluster/image.gz
+OUT=$test_name.log
+EXP=$test_dir/expect
+gzip -d < $IMAGE > $TMPFILE
+$FSCK -fy $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed > $OUT
+$FSCK -fy $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT
+$FSCK -fy $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT
+for i in a b c d e f g; do echo "stat /$i"; done > $TMPFILE.tmp
+echo "quit" >> $TMPFILE.tmp
+$DEBUGFS -f $TMPFILE.tmp $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT
+rm -f $TMPFILE.tmp
 
-	cmp -s $OUT $EXP
-	status=$?
+cmp -s $OUT $EXP
+status=$?
 
-	if [ "$status" = 0 ]; then
-		echo "$test_name: $test_description: ok"
-		touch $test_name.ok
-	else
-		echo "$test_name: $test_description: failed"
-		diff $DIFF_OPTS $EXP $OUT > $test_name.failed
-		rm -f $test_name.tmp
-	fi
+if [ "$status" = 0 ]; then
+	echo "$test_name: $test_description: ok"
+	touch $test_name.ok
 else
-	echo "$test_name: skipped"
+	echo "$test_name: $test_description: failed"
+	diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+	rm -f $test_name.tmp
 fi
diff --git a/tests/f_bigalloc_badinode/script b/tests/f_bigalloc_badinode/script
index e58910f..c1dd454 100644
--- a/tests/f_bigalloc_badinode/script
+++ b/tests/f_bigalloc_badinode/script
@@ -1,4 +1,7 @@
-if test -x $DEBUGFS_EXE; then
+if ! test -x $DEBUGFS_EXE; then
+	echo "$test_name: $test_description: skipped (no debugfs)"
+	return 0
+fi
 
 SKIP_GUNZIP="true"
 TEST_DATA="$test_name.tmp"
@@ -18,7 +21,3 @@ EOF
 rm -f $TEST_DATA
 
 unset E2FSCK_TIME TEST_DATA
-
-else #if test -x $DEBUGFS_EXE; then
-	echo "$test_name: $test_description: skipped"
-fi
diff --git a/tests/f_bigalloc_orphan_list/script b/tests/f_bigalloc_orphan_list/script
index af9d753..63a0350 100644
--- a/tests/f_bigalloc_orphan_list/script
+++ b/tests/f_bigalloc_orphan_list/script
@@ -1,4 +1,7 @@
-if test -x $DEBUGFS_EXE; then
+if ! test -x $DEBUGFS_EXE; then
+	echo "$test_name: $test_description: skipped (no debugfs)"
+	return 0
+fi
 
 SKIP_GUNZIP="true"
 TEST_DATA="$test_name.tmp"
@@ -22,7 +25,3 @@ EOF
 rm -f $TEST_DATA
 
 unset E2FSCK_TIME TEST_DATA
-
-else #if test -x $DEBUGFS_EXE; then
-	echo "$test_name: $test_description: skipped"
-fi
diff --git a/tests/f_create_symlinks/script b/tests/f_create_symlinks/script
index 1a97216..7d712f5 100644
--- a/tests/f_create_symlinks/script
+++ b/tests/f_create_symlinks/script
@@ -1,4 +1,7 @@
-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=-yf
 OUT=$test_name.log
@@ -56,7 +59,3 @@ else
 fi
 
 unset IMAGE FSCK_OPT OUT EXP
-
-else #if test -a -x $DEBUGFS_EXE; then
-	echo "$test_name: $test_description: skipped"
-fi
diff --git a/tests/f_desc_size_bad/script b/tests/f_desc_size_bad/script
index 5440328..ae29627 100644
--- a/tests/f_desc_size_bad/script
+++ b/tests/f_desc_size_bad/script
@@ -1,5 +1,5 @@
 if ! test -x $DEBUGFS_EXE; then
-        echo "$test_name: $test_description: skipped"
+	echo "$test_name: $test_description: skipped (no debugfs)"
 	return 0
 fi
 
diff --git a/tests/f_detect_junk/script b/tests/f_detect_junk/script
index 429ff00..ab2a38c 100644
--- a/tests/f_detect_junk/script
+++ b/tests/f_detect_junk/script
@@ -1,6 +1,8 @@
 #!/bin/bash
 
-if [ "$(grep -c 'define HAVE_MAGIC_H' ../lib/config.h)" -gt 0 ]; then
+if [ "$(grep -c 'define HAVE_MAGIC_H' ../lib/config.h)" -eq 0 ]; then
+	echo "$test_name: skipped (no magic)"
+fi
 
 FSCK_OPT=-fn
 IMAGE=$test_dir/image.bz2
@@ -20,7 +22,7 @@ rm -rf $test_name.failed $test_name.ok
 echo "*** e2fsck" > $OUT
 $FSCK $FSCK_OPT $TMPFILE >> $OUT 2>&1
 echo "*** debugfs" >> $OUT
-test -x $DEBUGFS_EXE && $DEBUGFS_EXE -R 'quit' $TMPFILE >> $OUT 2>&1
+test -x $DEBUGFS_EXE && $DEBUGFS -R 'quit' $TMPFILE >> $OUT 2>&1
 echo "*** tune2fs" >> $OUT
 $TUNE2FS -i 0 $TMPFILE >> $OUT 2>&1
 echo "*** mke2fs" >> $OUT
@@ -38,7 +40,3 @@ else
 	diff -u $EXP $OUT >> $test_name.failed
 fi
 unset EXP OUT FSCK_OPT IMAGE
-
-else #if HAVE_MAGIC_H
-	echo "$test_name: $test_description: skipped"
-fi
diff --git a/tests/f_detect_xfs/script b/tests/f_detect_xfs/script
index c80f0f7..4da1cd9 100644
--- a/tests/f_detect_xfs/script
+++ b/tests/f_detect_xfs/script
@@ -17,7 +17,7 @@ rm -rf $test_name.failed $test_name.ok
 echo "*** e2fsck" > $OUT
 $FSCK $FSCK_OPT $TMPFILE >> $OUT 2>&1
 echo "*** debugfs" >> $OUT
-test -x $DEBUGFS_EXE && $DEBUGFS_EXE -R 'quit' $TMPFILE >> $OUT 2>&1
+test -x $DEBUGFS_EXE && $DEBUGFS -R 'quit' $TMPFILE >> $OUT 2>&1
 echo "*** tune2fs" >> $OUT
 $TUNE2FS -i 0 $TMPFILE >> $OUT 2>&1
 echo "*** mke2fs" >> $OUT
diff --git a/tests/f_dup4/script b/tests/f_dup4/script
index 498f525..aec862d 100644
--- a/tests/f_dup4/script
+++ b/tests/f_dup4/script
@@ -1,4 +1,7 @@
-if test -x $DEBUGFS_EXE; then
+if ! test -x $DEBUGFS_EXE; then
+	echo "$test_name: $test_description: skipped (no debugfs)"
+	return 0
+fi
 
 SKIP_GUNZIP="true"
 TEST_DATA="$test_name.tmp"
@@ -50,7 +53,3 @@ export E2FSCK_TIME
 rm -f $TEST_DATA
 
 unset E2FSCK_TIME TEST_DATA
-
-else #if test -x $DEBUGFS_EXE; then
-	echo "$test_name: $test_description: skipped"
-fi 
diff --git a/tests/f_dup_de/script b/tests/f_dup_de/script
index 60378cd..dcda9d8 100644
--- a/tests/f_dup_de/script
+++ b/tests/f_dup_de/script
@@ -1,4 +1,7 @@
-if test -x $DEBUGFS_EXE; then
+if ! test -x $DEBUGFS_EXE; then
+	echo "$test_name: $test_description: skipped (no debugfs)"
+	return 0
+fi
 
 if test "$HTREE"x = x ; then
 	gunzip < $test_dir/image.gz > $TMPFILE
@@ -10,7 +13,3 @@ if test "$HTREE"x = x ; then
 fi
 . $cmd_dir/run_e2fsck
 rm -f "$TMPFILE".gz
-
-else #if test -x $DEBUGFS_EXE; then
-	echo "$test_name: $test_description: skipped"
-fi 
diff --git a/tests/f_dup_resize/script b/tests/f_dup_resize/script
index 19fa120..52a1aed 100644
--- a/tests/f_dup_resize/script
+++ b/tests/f_dup_resize/script
@@ -1,4 +1,7 @@
-if test -x $DEBUGFS_EXE; then
+if ! test -x $DEBUGFS_EXE; then
+	echo "$test_name: $test_description: skipped (no debugfs)"
+	return 0
+fi
 
 SKIP_GUNZIP="true"
 TEST_DATA="$test_name.tmp"
@@ -24,7 +27,3 @@ export E2FSCK_TIME
 rm -f $TEST_DATA
 
 unset E2FSCK_TIME TEST_DATA
-
-else #if test -x $DEBUGFS_EXE; then
-	echo "$test_name: $test_description: skipped"
-fi 
diff --git a/tests/f_extent_oobounds/script b/tests/f_extent_oobounds/script
index 54674ca..9c6117c 100644
--- a/tests/f_extent_oobounds/script
+++ b/tests/f_extent_oobounds/script
@@ -1,4 +1,7 @@
-if test -x $DEBUGFS_EXE; then
+if ! test -x $DEBUGFS_EXE; then
+	echo "$test_name: $test_description: skipped (no debugfs)"
+	return 0
+fi
 
 SKIP_GUNZIP="true"
 TEST_DATA="$test_name.tmp"
@@ -36,7 +39,3 @@ EOF
 rm -f $TEST_DATA
 
 unset E2FSCK_TIME TEST_DATA
-
-else #if test -x $DEBUGFS_EXE; then
-	echo "$test_name: $test_description: skipped"
-fi
diff --git a/tests/f_imagic_fs/script b/tests/f_imagic_fs/script
index 1060f04..511dcc7 100644
--- a/tests/f_imagic_fs/script
+++ b/tests/f_imagic_fs/script
@@ -1,9 +1,8 @@
-if test -x $DEBUGFS_EXE; then
+if ! test -x $DEBUGFS_EXE; then
+	echo "$test_name: $test_description: skipped (no debugfs)"
+	return 0
+fi
 
 IMAGE=$test_dir/../f_imagic/image.gz
 PREP_CMD='$DEBUGFS -w -R "feature imagic_inodes" $TMPFILE > /dev/null 2>&1'
 . $cmd_dir/run_e2fsck
-
-else #if test -x $DEBUGFS_EXE; then
-	echo "$test_name: $test_description: skipped"
-fi 
diff --git a/tests/f_resize_inode/script b/tests/f_resize_inode/script
index 190871b..0243bda 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 
diff --git a/tests/f_uninit_cat/script b/tests/f_uninit_cat/script
index 8877566..8d56e84 100755
--- a/tests/f_uninit_cat/script
+++ b/tests/f_uninit_cat/script
@@ -1,6 +1,9 @@
 #!/bin/bash
 
-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
 IMAGE=$test_dir/image.gz
 
@@ -18,7 +21,7 @@ echo "Exit status is $?" >> $OUT
 echo "debugfs cat uninit file" >> $OUT
 echo "ex /a" > $TMPFILE.cmd
 echo "cat /a" >> $TMPFILE.cmd
-$DEBUGFS_EXE -w -f $TMPFILE.cmd $TMPFILE >> $OUT.new 2>&1
+$DEBUGFS -w -f $TMPFILE.cmd $TMPFILE >> $OUT.new 2>&1
 echo >> $OUT.new
 sed -f $cmd_dir/filter.sed < $OUT.new >> $OUT
 rm -rf $OUT.new $TMPFILE $TMPFILE.cmd
@@ -32,6 +35,3 @@ else
 	diff -u $EXP $OUT >> $test_name.failed
 fi
 unset EXP OUT FSCK_OPT IMAGE
-else #if test -a -x $DEBUGFS_EXE; then
-        echo "$test_name: $test_description: skipped"
-fi 
diff --git a/tests/f_uninit_last_uninit/script b/tests/f_uninit_last_uninit/script
index 376c978..53105a4 100644
--- a/tests/f_uninit_last_uninit/script
+++ b/tests/f_uninit_last_uninit/script
@@ -1,4 +1,7 @@
-if test -x $DEBUGFS_EXE; then
+if ! test -x $DEBUGFS_EXE; then
+	echo "$test_name: $test_description: skipped (no debugfs)"
+	return 0
+fi
 
 SKIP_GUNZIP="true"
 
@@ -20,7 +23,3 @@ export E2FSCK_TIME
 . $cmd_dir/run_e2fsck
 
 unset E2FSCK_TIME
-
-else #if test -x $DEBUGFS_EXE; then
-	echo "$test_name: $test_description: skipped"
-fi 
diff --git a/tests/j_corrupt_commit_csum/script b/tests/j_corrupt_commit_csum/script
index 9c16975..57fc8fb 100644
--- a/tests/j_corrupt_commit_csum/script
+++ b/tests/j_corrupt_commit_csum/script
@@ -1,4 +1,7 @@
-if test -x $DEBUGFS_EXE; then
+if ! test -x $DEBUGFS_EXE; then
+	echo "$test_name: $test_description: skipped (no debugfs)"
+	return 0
+fi
 
 IMAGE=$test_dir/image.gz
 FSCK_OPT=-fy
@@ -28,7 +31,7 @@ rm -f $OUT.new
 
 echo "cat /a" > $TMPFILE.cmd
 echo >> $TMPFILE.cmd
-$DEBUGFS_EXE -f $TMPFILE.cmd $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT
+$DEBUGFS -f $TMPFILE.cmd $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT
 rm -f $TMPFILE.cmd
 
 rm -f $TMPFILE
@@ -46,7 +49,3 @@ else
 fi
 
 unset IMAGE FSCK_OPT OUT EXP
-
-else #if test -x $DEBUGFS_EXE; then
-	echo "$test_name: $test_description: skipped"
-fi
diff --git a/tests/j_corrupt_commit_tid/script b/tests/j_corrupt_commit_tid/script
index 9c16975..57fc8fb 100644
--- a/tests/j_corrupt_commit_tid/script
+++ b/tests/j_corrupt_commit_tid/script
@@ -1,4 +1,7 @@
-if test -x $DEBUGFS_EXE; then
+if ! test -x $DEBUGFS_EXE; then
+	echo "$test_name: $test_description: skipped (no debugfs)"
+	return 0
+fi
 
 IMAGE=$test_dir/image.gz
 FSCK_OPT=-fy
@@ -28,7 +31,7 @@ rm -f $OUT.new
 
 echo "cat /a" > $TMPFILE.cmd
 echo >> $TMPFILE.cmd
-$DEBUGFS_EXE -f $TMPFILE.cmd $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT
+$DEBUGFS -f $TMPFILE.cmd $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT
 rm -f $TMPFILE.cmd
 
 rm -f $TMPFILE
@@ -46,7 +49,3 @@ else
 fi
 
 unset IMAGE FSCK_OPT OUT EXP
-
-else #if test -x $DEBUGFS_EXE; then
-	echo "$test_name: $test_description: skipped"
-fi
diff --git a/tests/j_corrupt_descr_csum/script b/tests/j_corrupt_descr_csum/script
index 9c16975..57fc8fb 100644
--- a/tests/j_corrupt_descr_csum/script
+++ b/tests/j_corrupt_descr_csum/script
@@ -1,4 +1,7 @@
-if test -x $DEBUGFS_EXE; then
+if ! test -x $DEBUGFS_EXE; then
+	echo "$test_name: $test_description: skipped (no debugfs)"
+	return 0
+fi
 
 IMAGE=$test_dir/image.gz
 FSCK_OPT=-fy
@@ -28,7 +31,7 @@ rm -f $OUT.new
 
 echo "cat /a" > $TMPFILE.cmd
 echo >> $TMPFILE.cmd
-$DEBUGFS_EXE -f $TMPFILE.cmd $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT
+$DEBUGFS -f $TMPFILE.cmd $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT
 rm -f $TMPFILE.cmd
 
 rm -f $TMPFILE
@@ -46,7 +49,3 @@ else
 fi
 
 unset IMAGE FSCK_OPT OUT EXP
-
-else #if test -x $DEBUGFS_EXE; then
-	echo "$test_name: $test_description: skipped"
-fi
diff --git a/tests/j_corrupt_descr_tid/script b/tests/j_corrupt_descr_tid/script
index 9c16975..57fc8fb 100644
--- a/tests/j_corrupt_descr_tid/script
+++ b/tests/j_corrupt_descr_tid/script
@@ -1,4 +1,7 @@
-if test -x $DEBUGFS_EXE; then
+if ! test -x $DEBUGFS_EXE; then
+	echo "$test_name: $test_description: skipped (no debugfs)"
+	return 0
+fi
 
 IMAGE=$test_dir/image.gz
 FSCK_OPT=-fy
@@ -28,7 +31,7 @@ rm -f $OUT.new
 
 echo "cat /a" > $TMPFILE.cmd
 echo >> $TMPFILE.cmd
-$DEBUGFS_EXE -f $TMPFILE.cmd $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT
+$DEBUGFS -f $TMPFILE.cmd $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT
 rm -f $TMPFILE.cmd
 
 rm -f $TMPFILE
@@ -46,7 +49,3 @@ else
 fi
 
 unset IMAGE FSCK_OPT OUT EXP
-
-else #if test -x $DEBUGFS_EXE; then
-	echo "$test_name: $test_description: skipped"
-fi
diff --git a/tests/j_corrupt_journal_block/script b/tests/j_corrupt_journal_block/script
index 2bce973..a881bd1 100644
--- a/tests/j_corrupt_journal_block/script
+++ b/tests/j_corrupt_journal_block/script
@@ -1,4 +1,7 @@
-if test -x $DEBUGFS_EXE; then
+if ! test -x $DEBUGFS_EXE; then
+	echo "$test_name: $test_description: skipped (no debugfs)"
+	return 0
+fi
 
 IMAGE=$test_dir/image.gz
 FSCK_OPT=-fy
@@ -28,7 +31,7 @@ rm -f $OUT.new
 
 echo "cat /a" > $TMPFILE.cmd
 echo >> $TMPFILE.cmd
-$DEBUGFS_EXE -f $TMPFILE.cmd $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT
+$DEBUGFS -f $TMPFILE.cmd $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT
 echo >> $OUT
 rm -f $TMPFILE.cmd
 
@@ -47,7 +50,3 @@ else
 fi
 
 unset IMAGE FSCK_OPT OUT EXP
-
-else #if test -x $DEBUGFS_EXE; then
-	echo "$test_name: $test_description: skipped"
-fi
diff --git a/tests/j_corrupt_revoke_block/script b/tests/j_corrupt_revoke_block/script
index 9c16975..57fc8fb 100644
--- a/tests/j_corrupt_revoke_block/script
+++ b/tests/j_corrupt_revoke_block/script
@@ -1,4 +1,7 @@
-if test -x $DEBUGFS_EXE; then
+if ! test -x $DEBUGFS_EXE; then
+	echo "$test_name: $test_description: skipped (no debugfs)"
+	return 0
+fi
 
 IMAGE=$test_dir/image.gz
 FSCK_OPT=-fy
@@ -28,7 +31,7 @@ rm -f $OUT.new
 
 echo "cat /a" > $TMPFILE.cmd
 echo >> $TMPFILE.cmd
-$DEBUGFS_EXE -f $TMPFILE.cmd $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT
+$DEBUGFS -f $TMPFILE.cmd $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT
 rm -f $TMPFILE.cmd
 
 rm -f $TMPFILE
@@ -46,7 +49,3 @@ else
 fi
 
 unset IMAGE FSCK_OPT OUT EXP
-
-else #if test -x $DEBUGFS_EXE; then
-	echo "$test_name: $test_description: skipped"
-fi
diff --git a/tests/j_corrupt_revoke_csum/script b/tests/j_corrupt_revoke_csum/script
index 9c16975..57fc8fb 100644
--- a/tests/j_corrupt_revoke_csum/script
+++ b/tests/j_corrupt_revoke_csum/script
@@ -1,4 +1,7 @@
-if test -x $DEBUGFS_EXE; then
+if ! test -x $DEBUGFS_EXE; then
+	echo "$test_name: $test_description: skipped (no debugfs)"
+	return 0
+fi
 
 IMAGE=$test_dir/image.gz
 FSCK_OPT=-fy
@@ -28,7 +31,7 @@ rm -f $OUT.new
 
 echo "cat /a" > $TMPFILE.cmd
 echo >> $TMPFILE.cmd
-$DEBUGFS_EXE -f $TMPFILE.cmd $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT
+$DEBUGFS -f $TMPFILE.cmd $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT
 rm -f $TMPFILE.cmd
 
 rm -f $TMPFILE
@@ -46,7 +49,3 @@ else
 fi
 
 unset IMAGE FSCK_OPT OUT EXP
-
-else #if test -x $DEBUGFS_EXE; then
-	echo "$test_name: $test_description: skipped"
-fi
diff --git a/tests/j_corrupt_sb_csum/script b/tests/j_corrupt_sb_csum/script
index 9c16975..57fc8fb 100644
--- a/tests/j_corrupt_sb_csum/script
+++ b/tests/j_corrupt_sb_csum/script
@@ -1,4 +1,7 @@
-if test -x $DEBUGFS_EXE; then
+if ! test -x $DEBUGFS_EXE; then
+	echo "$test_name: $test_description: skipped (no debugfs)"
+	return 0
+fi
 
 IMAGE=$test_dir/image.gz
 FSCK_OPT=-fy
@@ -28,7 +31,7 @@ rm -f $OUT.new
 
 echo "cat /a" > $TMPFILE.cmd
 echo >> $TMPFILE.cmd
-$DEBUGFS_EXE -f $TMPFILE.cmd $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT
+$DEBUGFS -f $TMPFILE.cmd $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT
 rm -f $TMPFILE.cmd
 
 rm -f $TMPFILE
@@ -46,7 +49,3 @@ else
 fi
 
 unset IMAGE FSCK_OPT OUT EXP
-
-else #if test -x $DEBUGFS_EXE; then
-	echo "$test_name: $test_description: skipped"
-fi
diff --git a/tests/j_corrupt_sb_magic/script b/tests/j_corrupt_sb_magic/script
index 9c16975..57fc8fb 100644
--- a/tests/j_corrupt_sb_magic/script
+++ b/tests/j_corrupt_sb_magic/script
@@ -1,4 +1,7 @@
-if test -x $DEBUGFS_EXE; then
+if ! test -x $DEBUGFS_EXE; then
+	echo "$test_name: $test_description: skipped (no debugfs)"
+	return 0
+fi
 
 IMAGE=$test_dir/image.gz
 FSCK_OPT=-fy
@@ -28,7 +31,7 @@ rm -f $OUT.new
 
 echo "cat /a" > $TMPFILE.cmd
 echo >> $TMPFILE.cmd
-$DEBUGFS_EXE -f $TMPFILE.cmd $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT
+$DEBUGFS -f $TMPFILE.cmd $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT
 rm -f $TMPFILE.cmd
 
 rm -f $TMPFILE
@@ -46,7 +49,3 @@ else
 fi
 
 unset IMAGE FSCK_OPT OUT EXP
-
-else #if test -x $DEBUGFS_EXE; then
-	echo "$test_name: $test_description: skipped"
-fi
diff --git a/tests/j_ext_long_revoke_trans/script b/tests/j_ext_long_revoke_trans/script
index fe45c72..21518ed 100644
--- a/tests/j_ext_long_revoke_trans/script
+++ b/tests/j_ext_long_revoke_trans/script
@@ -1,4 +1,7 @@
-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
@@ -39,14 +42,14 @@ echo "jc" >> $TMPFILE.cmd
 echo "jo -f $JNLFILE" >> $TMPFILE.cmd
 echo "jw -r 259-4356 /dev/zero" >> $TMPFILE.cmd
 echo "jc" >> $TMPFILE.cmd
-$DEBUGFS_EXE -w -f $TMPFILE.cmd $TMPFILE 2>> $OUT.new > /dev/null
+$DEBUGFS -w -f $TMPFILE.cmd $TMPFILE 2>> $OUT.new > /dev/null
 sed -f $cmd_dir/filter.sed < $OUT.new >> $OUT
 rm -rf $OUT.new
 
 test -d "$JOURNAL_DUMP_DIR" -a -w "$JOURNAL_DUMP_DIR" && cp "$TMPFILE" "$JOURNAL_DUMP_DIR/$test_name.img"
 test -d "$JOURNAL_DUMP_DIR" -a -w "$JOURNAL_DUMP_DIR" && cp "$JNLFILE" "$JOURNAL_DUMP_DIR/$test_name.img.jnl"
 echo "logdump -c -f $JNLFILE" > $TMPFILE.cmd
-$DEBUGFS_EXE -f $TMPFILE.cmd $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed -e 's/logdump -c -f.*/logdump -c/g' >> $OUT
+$DEBUGFS -f $TMPFILE.cmd $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed -e 's/logdump -c -f.*/logdump -c/g' >> $OUT
 rm -rf $TMPFILE.cmd
 
 echo "debugfs fsck" >> $OUT
@@ -71,7 +74,3 @@ else
 fi
 
 unset IMAGE FSCK_OPT OUT EXP JNLFILE
-
-else #if test -x $DEBUGFS_EXE; then
-	echo "$test_name: $test_description: skipped"
-fi
diff --git a/tests/j_ext_long_trans/script b/tests/j_ext_long_trans/script
index f71e5a4..5f7fa53 100644
--- a/tests/j_ext_long_trans/script
+++ b/tests/j_ext_long_trans/script
@@ -1,4 +1,7 @@
-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
@@ -36,14 +39,14 @@ echo "debugfs write journal" >> $OUT
 echo "jo -f $JNLFILE" > $TMPFILE.cmd
 echo "jw -b 259-4356 /dev/zero" >> $TMPFILE.cmd
 echo "jc" >> $TMPFILE.cmd
-$DEBUGFS_EXE -w -f $TMPFILE.cmd $TMPFILE 2>> $OUT.new > /dev/null
+$DEBUGFS -w -f $TMPFILE.cmd $TMPFILE 2>> $OUT.new > /dev/null
 sed -f $cmd_dir/filter.sed < $OUT.new >> $OUT
 rm -rf $OUT.new
 
 test -d "$JOURNAL_DUMP_DIR" -a -w "$JOURNAL_DUMP_DIR" && cp "$TMPFILE" "$JOURNAL_DUMP_DIR/$test_name.img"
 test -d "$JOURNAL_DUMP_DIR" -a -w "$JOURNAL_DUMP_DIR" && cp "$JNLFILE" "$JOURNAL_DUMP_DIR/$test_name.img.jnl"
 echo "logdump -c -f $JNLFILE" > $TMPFILE.cmd
-$DEBUGFS_EXE -f $TMPFILE.cmd $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed -e 's/logdump -c -f.*/logdump -c/g' >> $OUT
+$DEBUGFS -f $TMPFILE.cmd $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed -e 's/logdump -c -f.*/logdump -c/g' >> $OUT
 rm -rf $TMPFILE.cmd
 
 echo "debugfs fsck" >> $OUT
@@ -68,7 +71,3 @@ else
 fi
 
 unset IMAGE FSCK_OPT OUT EXP JNLFILE
-
-else #if test -x $DEBUGFS_EXE; then
-	echo "$test_name: $test_description: skipped"
-fi
diff --git a/tests/j_long_revoke_trans/script b/tests/j_long_revoke_trans/script
index 4a0c5d1..bc33025 100644
--- a/tests/j_long_revoke_trans/script
+++ b/tests/j_long_revoke_trans/script
@@ -1,4 +1,7 @@
-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
@@ -26,13 +29,13 @@ echo "jc" >> $TMPFILE.cmd
 echo "jo" >> $TMPFILE.cmd
 echo "jw -r 259-4356" >> $TMPFILE.cmd
 echo "jc" >> $TMPFILE.cmd
-$DEBUGFS_EXE -w -f $TMPFILE.cmd $TMPFILE 2>> $OUT.new > /dev/null
+$DEBUGFS -w -f $TMPFILE.cmd $TMPFILE 2>> $OUT.new > /dev/null
 sed -f $cmd_dir/filter.sed < $OUT.new >> $OUT
 rm -rf $OUT.new
 
 test -d "$JOURNAL_DUMP_DIR" -a -w "$JOURNAL_DUMP_DIR" && cp "$TMPFILE" "$JOURNAL_DUMP_DIR/$test_name.img"
 echo "logdump -c" > $TMPFILE.cmd
-$DEBUGFS_EXE -f $TMPFILE.cmd $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT
+$DEBUGFS -f $TMPFILE.cmd $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT
 rm -rf $TMPFILE.cmd
 
 $FSCK -fy -N test_filesys $TMPFILE > $OUT.new 2>&1
@@ -56,7 +59,3 @@ else
 fi
 
 unset IMAGE FSCK_OPT OUT EXP
-
-else #if test -x $DEBUGFS_EXE; then
-	echo "$test_name: $test_description: skipped"
-fi
diff --git a/tests/j_long_revoke_trans_mcsum_32bit/script b/tests/j_long_revoke_trans_mcsum_32bit/script
index fc0d0ad..3e838ac 100644
--- a/tests/j_long_revoke_trans_mcsum_32bit/script
+++ b/tests/j_long_revoke_trans_mcsum_32bit/script
@@ -1,4 +1,7 @@
-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
@@ -28,8 +31,8 @@ echo "jc" >> $TMPFILE.cmd
 echo "jo" >> $TMPFILE.cmd
 echo "jw -r 260-4356" >> $TMPFILE.cmd
 echo "jc" >> $TMPFILE.cmd
-#$DEBUGFS_EXE -w $TMPFILE -f $TMPFILE.cmd >> $OUT 2>&1
-$DEBUGFS_EXE -w -f $TMPFILE.cmd $TMPFILE 2>> $OUT.new > /dev/null
+#$DEBUGFS -w $TMPFILE -f $TMPFILE.cmd >> $OUT 2>&1
+$DEBUGFS -w -f $TMPFILE.cmd $TMPFILE 2>> $OUT.new > /dev/null
 sed -f $cmd_dir/filter.sed < $OUT.new >> $OUT
 rm -rf $OUT.new
 
@@ -37,7 +40,7 @@ $DUMPE2FS $TMPFILE 2>&1 | grep '^Journal features:' >> $OUT
 
 test -d "$JOURNAL_DUMP_DIR" -a -w "$JOURNAL_DUMP_DIR" && cp "$TMPFILE" "$JOURNAL_DUMP_DIR/$test_name.img"
 echo "logdump -c" > $TMPFILE.cmd
-$DEBUGFS_EXE -f $TMPFILE.cmd $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT
+$DEBUGFS -f $TMPFILE.cmd $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT
 rm -rf $TMPFILE.cmd
 
 $FSCK -fy -N test_filesys $TMPFILE > $OUT.new 2>&1
@@ -61,7 +64,3 @@ else
 fi
 
 unset IMAGE FSCK_OPT OUT EXP
-
-else #if test -x $DEBUGFS_EXE; then
-	echo "$test_name: $test_description: skipped"
-fi
diff --git a/tests/j_long_revoke_trans_mcsum_64bit/script b/tests/j_long_revoke_trans_mcsum_64bit/script
index e206f88..eef9f02 100644
--- a/tests/j_long_revoke_trans_mcsum_64bit/script
+++ b/tests/j_long_revoke_trans_mcsum_64bit/script
@@ -1,4 +1,7 @@
-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
@@ -28,8 +31,8 @@ echo "jc" >> $TMPFILE.cmd
 echo "jo" >> $TMPFILE.cmd
 echo "jw -r 262-4358" >> $TMPFILE.cmd
 echo "jc" >> $TMPFILE.cmd
-#$DEBUGFS_EXE -w $TMPFILE -f $TMPFILE.cmd >> $OUT 2>&1
-$DEBUGFS_EXE -w -f $TMPFILE.cmd $TMPFILE 2>> $OUT.new > /dev/null
+#$DEBUGFS -w $TMPFILE -f $TMPFILE.cmd >> $OUT 2>&1
+$DEBUGFS -w -f $TMPFILE.cmd $TMPFILE 2>> $OUT.new > /dev/null
 sed -f $cmd_dir/filter.sed < $OUT.new >> $OUT
 rm -rf $OUT.new
 
@@ -37,7 +40,7 @@ $DUMPE2FS $TMPFILE 2>&1 | grep '^Journal features:' >> $OUT
 
 test -d "$JOURNAL_DUMP_DIR" -a -w "$JOURNAL_DUMP_DIR" && cp "$TMPFILE" "$JOURNAL_DUMP_DIR/$test_name.img"
 echo "logdump -c" > $TMPFILE.cmd
-$DEBUGFS_EXE -f $TMPFILE.cmd $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT
+$DEBUGFS -f $TMPFILE.cmd $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT
 rm -rf $TMPFILE.cmd
 
 $FSCK -fy -N test_filesys $TMPFILE > $OUT.new 2>&1
@@ -61,7 +64,3 @@ else
 fi
 
 unset IMAGE FSCK_OPT OUT EXP
-
-else #if test -x $DEBUGFS_EXE; then
-	echo "$test_name: $test_description: skipped"
-fi
diff --git a/tests/j_long_trans/script b/tests/j_long_trans/script
index 68172c4..425bf99 100644
--- a/tests/j_long_trans/script
+++ b/tests/j_long_trans/script
@@ -1,4 +1,7 @@
-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
@@ -23,13 +26,13 @@ echo "debugfs write journal" >> $OUT
 echo "jo" > $TMPFILE.cmd
 echo "jw -b 259-4356 /dev/zero" >> $TMPFILE.cmd
 echo "jc" >> $TMPFILE.cmd
-$DEBUGFS_EXE -w -f $TMPFILE.cmd $TMPFILE 2>> $OUT.new > /dev/null
+$DEBUGFS -w -f $TMPFILE.cmd $TMPFILE 2>> $OUT.new > /dev/null
 sed -f $cmd_dir/filter.sed < $OUT.new >> $OUT
 rm -rf $OUT.new
 
 test -d "$JOURNAL_DUMP_DIR" -a -w "$JOURNAL_DUMP_DIR" && cp "$TMPFILE" "$JOURNAL_DUMP_DIR/$test_name.img"
 echo "logdump -c" > $TMPFILE.cmd
-$DEBUGFS_EXE -f $TMPFILE.cmd $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT
+$DEBUGFS -f $TMPFILE.cmd $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT
 rm -rf $TMPFILE.cmd
 
 $FSCK -fy -N test_filesys $TMPFILE > $OUT.new 2>&1
@@ -53,7 +56,3 @@ else
 fi
 
 unset IMAGE FSCK_OPT OUT EXP
-
-else #if test -x $DEBUGFS_EXE; then
-	echo "$test_name: $test_description: skipped"
-fi
diff --git a/tests/j_long_trans_mcsum_32bit/script b/tests/j_long_trans_mcsum_32bit/script
index 4722242..f0297a4 100644
--- a/tests/j_long_trans_mcsum_32bit/script
+++ b/tests/j_long_trans_mcsum_32bit/script
@@ -1,4 +1,7 @@
-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
@@ -25,7 +28,7 @@ echo "debugfs write journal" >> $OUT
 echo "jo -c" > $TMPFILE.cmd
 echo "jw -b 260-4356 /dev/zero" >> $TMPFILE.cmd
 echo "jc" >> $TMPFILE.cmd
-$DEBUGFS_EXE -w -f $TMPFILE.cmd $TMPFILE 2>> $OUT.new > /dev/null
+$DEBUGFS -w -f $TMPFILE.cmd $TMPFILE 2>> $OUT.new > /dev/null
 sed -f $cmd_dir/filter.sed < $OUT.new >> $OUT
 rm -rf $OUT.new
 
@@ -33,7 +36,7 @@ $DUMPE2FS $TMPFILE 2>&1 | grep '^Journal features:' >> $OUT
 
 test -d "$JOURNAL_DUMP_DIR" -a -w "$JOURNAL_DUMP_DIR" && cp "$TMPFILE" "$JOURNAL_DUMP_DIR/$test_name.img"
 echo "logdump -c" > $TMPFILE.cmd
-$DEBUGFS_EXE -f $TMPFILE.cmd $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT
+$DEBUGFS -f $TMPFILE.cmd $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT
 rm -rf $TMPFILE.cmd
 
 $FSCK -fy -N test_filesys $TMPFILE > $OUT.new 2>&1
@@ -57,7 +60,3 @@ else
 fi
 
 unset IMAGE FSCK_OPT OUT EXP
-
-else #if test -x $DEBUGFS_EXE; then
-	echo "$test_name: $test_description: skipped"
-fi
diff --git a/tests/j_long_trans_mcsum_64bit/script b/tests/j_long_trans_mcsum_64bit/script
index 65ca1b7..a72f6f1 100644
--- a/tests/j_long_trans_mcsum_64bit/script
+++ b/tests/j_long_trans_mcsum_64bit/script
@@ -1,4 +1,7 @@
-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
@@ -25,7 +28,7 @@ echo "debugfs write journal" >> $OUT
 echo "jo -c" > $TMPFILE.cmd
 echo "jw -b 262-4358 /dev/zero" >> $TMPFILE.cmd
 echo "jc" >> $TMPFILE.cmd
-$DEBUGFS_EXE -w -f $TMPFILE.cmd $TMPFILE 2>> $OUT.new > /dev/null
+$DEBUGFS -w -f $TMPFILE.cmd $TMPFILE 2>> $OUT.new > /dev/null
 sed -f $cmd_dir/filter.sed < $OUT.new >> $OUT
 rm -rf $OUT.new
 
@@ -33,7 +36,7 @@ $DUMPE2FS $TMPFILE 2>&1 | grep '^Journal features:' >> $OUT
 
 test -d "$JOURNAL_DUMP_DIR" -a -w "$JOURNAL_DUMP_DIR" && cp "$TMPFILE" "$JOURNAL_DUMP_DIR/$test_name.img"
 echo "logdump -c" > $TMPFILE.cmd
-$DEBUGFS_EXE -f $TMPFILE.cmd $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT
+$DEBUGFS -f $TMPFILE.cmd $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT
 rm -rf $TMPFILE.cmd
 
 $FSCK -fy -N test_filesys $TMPFILE > $OUT.new 2>&1
@@ -57,7 +60,3 @@ else
 fi
 
 unset IMAGE FSCK_OPT OUT EXP
-
-else #if test -x $DEBUGFS_EXE; then
-	echo "$test_name: $test_description: skipped"
-fi
diff --git a/tests/j_short_revoke_trans/script b/tests/j_short_revoke_trans/script
index 4eec436..9d3ee05 100644
--- a/tests/j_short_revoke_trans/script
+++ b/tests/j_short_revoke_trans/script
@@ -1,4 +1,7 @@
-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
@@ -28,13 +31,13 @@ echo "jc" >> $TMPFILE.cmd
 echo "jo" >> $TMPFILE.cmd
 echo "jw -r $bitmaps" >> $TMPFILE.cmd
 echo "jc" >> $TMPFILE.cmd
-$DEBUGFS_EXE -w -f $TMPFILE.cmd $TMPFILE 2>> $OUT.new > /dev/null
+$DEBUGFS -w -f $TMPFILE.cmd $TMPFILE 2>> $OUT.new > /dev/null
 sed -f $cmd_dir/filter.sed < $OUT.new >> $OUT
 rm -rf $OUT.new
 
 test -d "$JOURNAL_DUMP_DIR" -a -w "$JOURNAL_DUMP_DIR" && cp "$TMPFILE" "$JOURNAL_DUMP_DIR/$test_name.img"
 echo "logdump -c" > $TMPFILE.cmd
-$DEBUGFS_EXE -f $TMPFILE.cmd $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT
+$DEBUGFS -f $TMPFILE.cmd $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT
 rm -rf $TMPFILE.cmd
 
 $FSCK -fy -N test_filesys $TMPFILE > $OUT.new 2>&1
@@ -58,7 +61,3 @@ else
 fi
 
 unset IMAGE FSCK_OPT OUT EXP
-
-else #if test -x $DEBUGFS_EXE; then
-	echo "$test_name: $test_description: skipped"
-fi
diff --git a/tests/j_short_revoke_trans_mcsum_64bit/script b/tests/j_short_revoke_trans_mcsum_64bit/script
index c943efa..c9cc7cd 100644
--- a/tests/j_short_revoke_trans_mcsum_64bit/script
+++ b/tests/j_short_revoke_trans_mcsum_64bit/script
@@ -1,4 +1,7 @@
-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
@@ -30,7 +33,7 @@ echo "jc" >> $TMPFILE.cmd
 echo "jo" >> $TMPFILE.cmd
 echo "jw -r $bitmaps" >> $TMPFILE.cmd
 echo "jc" >> $TMPFILE.cmd
-$DEBUGFS_EXE -w -f $TMPFILE.cmd $TMPFILE 2>> $OUT.new > /dev/null
+$DEBUGFS -w -f $TMPFILE.cmd $TMPFILE 2>> $OUT.new > /dev/null
 sed -f $cmd_dir/filter.sed < $OUT.new >> $OUT
 rm -rf $OUT.new
 
@@ -38,7 +41,7 @@ $DUMPE2FS $TMPFILE 2>&1 | grep '^Journal features:' >> $OUT
 
 test -d "$JOURNAL_DUMP_DIR" -a -w "$JOURNAL_DUMP_DIR" && cp "$TMPFILE" "$JOURNAL_DUMP_DIR/$test_name.img"
 echo "logdump -c" > $TMPFILE.cmd
-$DEBUGFS_EXE -f $TMPFILE.cmd $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT
+$DEBUGFS -f $TMPFILE.cmd $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT
 rm -rf $TMPFILE.cmd
 
 $FSCK -fy -N test_filesys $TMPFILE > $OUT.new 2>&1
@@ -62,7 +65,3 @@ else
 fi
 
 unset IMAGE FSCK_OPT OUT EXP
-
-else #if test -x $DEBUGFS_EXE; then
-	echo "$test_name: $test_description: skipped"
-fi
diff --git a/tests/j_short_trans/script b/tests/j_short_trans/script
index 852e7a5..8108ba8 100644
--- a/tests/j_short_trans/script
+++ b/tests/j_short_trans/script
@@ -1,4 +1,7 @@
-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
@@ -25,13 +28,13 @@ echo "debugfs write journal" >> $OUT
 echo "jo" > $TMPFILE.cmd
 echo "jw -b $bitmaps /dev/zero" >> $TMPFILE.cmd
 echo "jc" >> $TMPFILE.cmd
-$DEBUGFS_EXE -w -f $TMPFILE.cmd $TMPFILE 2>> $OUT.new > /dev/null
+$DEBUGFS -w -f $TMPFILE.cmd $TMPFILE 2>> $OUT.new > /dev/null
 sed -f $cmd_dir/filter.sed < $OUT.new >> $OUT
 rm -rf $OUT.new
 
 test -d "$JOURNAL_DUMP_DIR" -a -w "$JOURNAL_DUMP_DIR" && cp "$TMPFILE" "$JOURNAL_DUMP_DIR/$test_name.img"
 echo "logdump -c" > $TMPFILE.cmd
-$DEBUGFS_EXE -f $TMPFILE.cmd $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT
+$DEBUGFS -f $TMPFILE.cmd $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT
 rm -rf $TMPFILE.cmd
 
 $FSCK -fy -N test_filesys $TMPFILE > $OUT.new 2>&1
@@ -55,7 +58,3 @@ else
 fi
 
 unset IMAGE FSCK_OPT OUT EXP
-
-else #if test -x $DEBUGFS_EXE; then
-	echo "$test_name: $test_description: skipped"
-fi
diff --git a/tests/j_short_trans_64bit/script b/tests/j_short_trans_64bit/script
index 994fa21..70649c2 100644
--- a/tests/j_short_trans_64bit/script
+++ b/tests/j_short_trans_64bit/script
@@ -1,4 +1,7 @@
-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
@@ -27,7 +30,7 @@ echo "debugfs write journal" >> $OUT
 echo "jo" > $TMPFILE.cmd
 echo "jw -b $bitmaps /dev/zero" >> $TMPFILE.cmd
 echo "jc" >> $TMPFILE.cmd
-$DEBUGFS_EXE -w -f $TMPFILE.cmd $TMPFILE 2>> $OUT.new > /dev/null
+$DEBUGFS -w -f $TMPFILE.cmd $TMPFILE 2>> $OUT.new > /dev/null
 sed -f $cmd_dir/filter.sed < $OUT.new >> $OUT
 rm -rf $OUT.new
 
@@ -35,7 +38,7 @@ $DUMPE2FS $TMPFILE 2>&1 | grep '^Journal features:' >> $OUT
 
 test -d "$JOURNAL_DUMP_DIR" -a -w "$JOURNAL_DUMP_DIR" && cp "$TMPFILE" "$JOURNAL_DUMP_DIR/$test_name.img"
 echo "logdump -c" > $TMPFILE.cmd
-$DEBUGFS_EXE -f $TMPFILE.cmd $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT
+$DEBUGFS -f $TMPFILE.cmd $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT
 rm -rf $TMPFILE.cmd
 
 $FSCK -fy -N test_filesys $TMPFILE > $OUT.new 2>&1
@@ -59,7 +62,3 @@ else
 fi
 
 unset IMAGE FSCK_OPT OUT EXP
-
-else #if test -x $DEBUGFS_EXE; then
-	echo "$test_name: $test_description: skipped"
-fi
diff --git a/tests/j_short_trans_mcsum_64bit/script b/tests/j_short_trans_mcsum_64bit/script
index 034b237..ad736eb 100644
--- a/tests/j_short_trans_mcsum_64bit/script
+++ b/tests/j_short_trans_mcsum_64bit/script
@@ -1,4 +1,7 @@
-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
@@ -27,7 +30,7 @@ echo "debugfs write journal" >> $OUT
 echo "jo -c" > $TMPFILE.cmd
 echo "jw -b $bitmaps /dev/zero" >> $TMPFILE.cmd
 echo "jc" >> $TMPFILE.cmd
-$DEBUGFS_EXE -w -f $TMPFILE.cmd $TMPFILE 2>> $OUT.new > /dev/null
+$DEBUGFS -w -f $TMPFILE.cmd $TMPFILE 2>> $OUT.new > /dev/null
 sed -f $cmd_dir/filter.sed < $OUT.new >> $OUT
 rm -rf $OUT.new
 
@@ -35,7 +38,7 @@ $DUMPE2FS $TMPFILE 2>&1 | grep '^Journal features:' >> $OUT
 
 test -d "$JOURNAL_DUMP_DIR" -a -w "$JOURNAL_DUMP_DIR" && cp "$TMPFILE" "$JOURNAL_DUMP_DIR/$test_name.img"
 echo "logdump -c" > $TMPFILE.cmd
-$DEBUGFS_EXE -f $TMPFILE.cmd $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT
+$DEBUGFS -f $TMPFILE.cmd $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT
 rm -rf $TMPFILE.cmd
 
 $FSCK -fy -N test_filesys $TMPFILE > $OUT.new 2>&1
@@ -59,7 +62,3 @@ else
 fi
 
 unset IMAGE FSCK_OPT OUT EXP
-
-else #if test -x $DEBUGFS_EXE; then
-	echo "$test_name: $test_description: skipped"
-fi
diff --git a/tests/j_short_trans_old_csum/script b/tests/j_short_trans_old_csum/script
index 56f8bcb..cb13acb 100644
--- a/tests/j_short_trans_old_csum/script
+++ b/tests/j_short_trans_old_csum/script
@@ -1,4 +1,7 @@
-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
@@ -27,7 +30,7 @@ echo "debugfs write journal" >> $OUT
 echo "jo -c" > $TMPFILE.cmd
 echo "jw -b $bitmaps /dev/zero" >> $TMPFILE.cmd
 echo "jc" >> $TMPFILE.cmd
-$DEBUGFS_EXE -w -f $TMPFILE.cmd $TMPFILE 2>> $OUT.new > /dev/null
+$DEBUGFS -w -f $TMPFILE.cmd $TMPFILE 2>> $OUT.new > /dev/null
 sed -f $cmd_dir/filter.sed < $OUT.new >> $OUT
 rm -rf $OUT.new
 
@@ -35,7 +38,7 @@ $DUMPE2FS $TMPFILE 2>&1 | grep '^Journal features:' >> $OUT
 
 test -d "$JOURNAL_DUMP_DIR" -a -w "$JOURNAL_DUMP_DIR" && cp "$TMPFILE" "$JOURNAL_DUMP_DIR/$test_name.img"
 echo "logdump -c" > $TMPFILE.cmd
-$DEBUGFS_EXE -f $TMPFILE.cmd $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT
+$DEBUGFS -f $TMPFILE.cmd $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT
 rm -rf $TMPFILE.cmd
 
 $FSCK -fy -N test_filesys $TMPFILE > $OUT.new 2>&1
@@ -59,7 +62,3 @@ else
 fi
 
 unset IMAGE FSCK_OPT OUT EXP
-
-else #if test -x $DEBUGFS_EXE; then
-	echo "$test_name: $test_description: skipped"
-fi
diff --git a/tests/j_short_trans_open_recover/script b/tests/j_short_trans_open_recover/script
index 67136fe..fe1d9e8 100644
--- a/tests/j_short_trans_open_recover/script
+++ b/tests/j_short_trans_open_recover/script
@@ -1,4 +1,7 @@
-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
@@ -25,20 +28,20 @@ echo "debugfs write journal" >> $OUT
 echo "jo" > $TMPFILE.cmd
 echo "jw -b $bitmaps /dev/zero" >> $TMPFILE.cmd
 echo "jc" >> $TMPFILE.cmd
-$DEBUGFS_EXE -w -f $TMPFILE.cmd $TMPFILE 2>> $OUT.new > /dev/null
+$DEBUGFS -w -f $TMPFILE.cmd $TMPFILE 2>> $OUT.new > /dev/null
 sed -f $cmd_dir/filter.sed < $OUT.new >> $OUT
 rm -rf $OUT.new
 
 test -d "$JOURNAL_DUMP_DIR" -a -w "$JOURNAL_DUMP_DIR" && cp "$TMPFILE" "$JOURNAL_DUMP_DIR/$test_name.img"
 echo "logdump -c" > $TMPFILE.cmd
-$DEBUGFS_EXE -f $TMPFILE.cmd $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT
+$DEBUGFS -f $TMPFILE.cmd $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT
 rm -rf $TMPFILE.cmd
 
 echo "debugfs can't recover open journal" >> $OUT
 echo "jo" > $TMPFILE.cmd
 echo "jr" >> $TMPFILE.cmd
 echo "jc" >> $TMPFILE.cmd
-$DEBUGFS_EXE -w -f $TMPFILE.cmd $TMPFILE > $OUT.new 2>&1
+$DEBUGFS -w -f $TMPFILE.cmd $TMPFILE > $OUT.new 2>&1
 sed -f $cmd_dir/filter.sed < $OUT.new >> $OUT
 rm -rf $OUT.new
 
@@ -63,7 +66,3 @@ else
 fi
 
 unset IMAGE FSCK_OPT OUT EXP
-
-else #if test -x $DEBUGFS_EXE; then
-	echo "$test_name: $test_description: skipped"
-fi
diff --git a/tests/j_short_trans_recover/script b/tests/j_short_trans_recover/script
index e7b4943..a44111b 100644
--- a/tests/j_short_trans_recover/script
+++ b/tests/j_short_trans_recover/script
@@ -1,4 +1,7 @@
-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
@@ -28,18 +31,18 @@ echo "jc" >> $TMPFILE.cmd
 echo "jo" >> $TMPFILE.cmd
 echo "jw -r 333" >> $TMPFILE.cmd
 echo "jc" >> $TMPFILE.cmd
-$DEBUGFS_EXE -w -f $TMPFILE.cmd $TMPFILE 2>> $OUT.new > /dev/null
+$DEBUGFS -w -f $TMPFILE.cmd $TMPFILE 2>> $OUT.new > /dev/null
 sed -f $cmd_dir/filter.sed < $OUT.new >> $OUT
 rm -rf $OUT.new
 
 test -d "$JOURNAL_DUMP_DIR" -a -w "$JOURNAL_DUMP_DIR" && cp "$TMPFILE" "$JOURNAL_DUMP_DIR/$test_name.img"
 echo "logdump -c" > $TMPFILE.cmd
-$DEBUGFS_EXE -f $TMPFILE.cmd $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT
+$DEBUGFS -f $TMPFILE.cmd $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT
 rm -rf $TMPFILE.cmd
 
 echo "debugfs recover journal" >> $OUT
 echo "jr" > $TMPFILE.cmd
-$DEBUGFS_EXE -w -f $TMPFILE.cmd $TMPFILE 2>> $OUT.new > /dev/null
+$DEBUGFS -w -f $TMPFILE.cmd $TMPFILE 2>> $OUT.new > /dev/null
 sed -f $cmd_dir/filter.sed < $OUT.new >> $OUT
 rm -rf $OUT.new
 
@@ -64,7 +67,3 @@ else
 fi
 
 unset IMAGE FSCK_OPT OUT EXP
-
-else #if test -x $DEBUGFS_EXE; then
-	echo "$test_name: $test_description: skipped"
-fi
diff --git a/tests/j_short_trans_recover_mcsum_64bit/script b/tests/j_short_trans_recover_mcsum_64bit/script
index 2c56e0f..9671b8c 100644
--- a/tests/j_short_trans_recover_mcsum_64bit/script
+++ b/tests/j_short_trans_recover_mcsum_64bit/script
@@ -1,4 +1,7 @@
-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
@@ -30,7 +33,7 @@ echo "jc" >> $TMPFILE.cmd
 echo "jo" >> $TMPFILE.cmd
 echo "jw -r 333" >> $TMPFILE.cmd
 echo "jc" >> $TMPFILE.cmd
-$DEBUGFS_EXE -w -f $TMPFILE.cmd $TMPFILE 2>> $OUT.new > /dev/null
+$DEBUGFS -w -f $TMPFILE.cmd $TMPFILE 2>> $OUT.new > /dev/null
 sed -f $cmd_dir/filter.sed < $OUT.new >> $OUT
 rm -rf $OUT.new
 
@@ -38,12 +41,12 @@ $DUMPE2FS $TMPFILE 2>&1 | grep '^Journal features:' >> $OUT
 
 test -d "$JOURNAL_DUMP_DIR" -a -w "$JOURNAL_DUMP_DIR" && cp "$TMPFILE" "$JOURNAL_DUMP_DIR/$test_name.img"
 echo "logdump -c" > $TMPFILE.cmd
-$DEBUGFS_EXE -f $TMPFILE.cmd $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT
+$DEBUGFS -f $TMPFILE.cmd $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT
 rm -rf $TMPFILE.cmd
 
 echo "debugfs recover journal" >> $OUT
 echo "jr" > $TMPFILE.cmd
-$DEBUGFS_EXE -w -f $TMPFILE.cmd $TMPFILE 2>> $OUT.new > /dev/null
+$DEBUGFS -w -f $TMPFILE.cmd $TMPFILE 2>> $OUT.new > /dev/null
 sed -f $cmd_dir/filter.sed < $OUT.new >> $OUT
 rm -rf $OUT.new
 
@@ -68,7 +71,3 @@ else
 fi
 
 unset IMAGE FSCK_OPT OUT EXP
-
-else #if test -x $DEBUGFS_EXE; then
-	echo "$test_name: $test_description: skipped"
-fi
diff --git a/tests/j_short_uncommitted_trans/script b/tests/j_short_uncommitted_trans/script
index a1fc3b4..ef0548b 100644
--- a/tests/j_short_uncommitted_trans/script
+++ b/tests/j_short_uncommitted_trans/script
@@ -1,4 +1,7 @@
-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
@@ -25,13 +28,13 @@ echo "debugfs write journal" >> $OUT
 echo "jo" > $TMPFILE.cmd
 echo "jw -b $bitmaps -c /dev/zero" >> $TMPFILE.cmd
 echo "jc" >> $TMPFILE.cmd
-$DEBUGFS_EXE -w -f $TMPFILE.cmd $TMPFILE 2>> $OUT.new > /dev/null
+$DEBUGFS -w -f $TMPFILE.cmd $TMPFILE 2>> $OUT.new > /dev/null
 sed -f $cmd_dir/filter.sed < $OUT.new >> $OUT
 rm -rf $OUT.new
 
 test -d "$JOURNAL_DUMP_DIR" -a -w "$JOURNAL_DUMP_DIR" && cp "$TMPFILE" "$JOURNAL_DUMP_DIR/$test_name.img"
 echo "logdump -c" > $TMPFILE.cmd
-$DEBUGFS_EXE -f $TMPFILE.cmd $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT
+$DEBUGFS -f $TMPFILE.cmd $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT
 rm -rf $TMPFILE.cmd
 
 $FSCK -fy -N test_filesys $TMPFILE > $OUT.new 2>&1
@@ -55,7 +58,3 @@ else
 fi
 
 unset IMAGE FSCK_OPT OUT EXP
-
-else #if test -x $DEBUGFS_EXE; then
-	echo "$test_name: $test_description: skipped"
-fi
diff --git a/tests/j_short_uncommitted_trans_mcsum_64bit/script b/tests/j_short_uncommitted_trans_mcsum_64bit/script
index a0b8c7f..68965a9 100644
--- a/tests/j_short_uncommitted_trans_mcsum_64bit/script
+++ b/tests/j_short_uncommitted_trans_mcsum_64bit/script
@@ -1,4 +1,7 @@
-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
@@ -27,7 +30,7 @@ echo "debugfs write journal" >> $OUT
 echo "jo -c" > $TMPFILE.cmd
 echo "jw -b $bitmaps /dev/zero -c" >> $TMPFILE.cmd
 echo "jc" >> $TMPFILE.cmd
-$DEBUGFS_EXE -w -f $TMPFILE.cmd $TMPFILE 2>> $OUT.new > /dev/null
+$DEBUGFS -w -f $TMPFILE.cmd $TMPFILE 2>> $OUT.new > /dev/null
 sed -f $cmd_dir/filter.sed < $OUT.new >> $OUT
 rm -rf $OUT.new
 
@@ -35,7 +38,7 @@ $DUMPE2FS $TMPFILE 2>&1 | grep '^Journal features:' >> $OUT
 
 test -d "$JOURNAL_DUMP_DIR" -a -w "$JOURNAL_DUMP_DIR" && cp "$TMPFILE" "$JOURNAL_DUMP_DIR/$test_name.img"
 echo "logdump -c" > $TMPFILE.cmd
-$DEBUGFS_EXE -f $TMPFILE.cmd $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT
+$DEBUGFS -f $TMPFILE.cmd $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT
 rm -rf $TMPFILE.cmd
 
 $FSCK -fy -N test_filesys $TMPFILE > $OUT.new 2>&1
@@ -59,7 +62,3 @@ else
 fi
 
 unset IMAGE FSCK_OPT OUT EXP
-
-else #if test -x $DEBUGFS_EXE; then
-	echo "$test_name: $test_description: skipped"
-fi
diff --git a/tests/m_devdir/script b/tests/m_devdir/script
index 5f26699..3b1ef10 100644
--- a/tests/m_devdir/script
+++ b/tests/m_devdir/script
@@ -1,6 +1,9 @@
-if test -x $DEBUGFS_EXE; then
-
 test_description="create fs image from /dev"
+if ! test -x $DEBUGFS_EXE; then
+	echo "$test_name: $test_description: skipped (no debugfs)"
+	return 0
+fi
+
 MKFS_DIR=/dev
 OUT=$test_name.log
 
@@ -27,7 +30,3 @@ fi
 
 rm -rf $TMPFILE.cmd $OUT.sed
 unset MKFS_DIR OUT EXP
-
-else #if test -x $DEBUGFS_EXE; then
-	echo "$test_name: $test_description: skipped"
-fi
diff --git a/tests/m_minrootdir/script b/tests/m_minrootdir/script
index 662e76f..3655993 100644
--- a/tests/m_minrootdir/script
+++ b/tests/m_minrootdir/script
@@ -1,6 +1,9 @@
-if test -x $DEBUGFS_EXE -a -x $RESIZE2FS_EXE; then
-
 test_description="create fs image from dir, then minimize it"
+if ! test -x $RESIZE2FS_EXE -o ! -x $DEBUGFS_EXE; then
+	echo "$test_name: $test_description: skipped (no debugfs/resize2fs)"
+	return 0
+fi
+
 MKFS_DIR=$TMPFILE.dir
 OUT=$test_name.log
 EXP=$test_dir/expect
@@ -75,7 +78,3 @@ fi
 
 rm -rf $TMPFILE.cmd $MKFS_DIR $OUT.sed
 unset MKFS_DIR OUT EXP
-
-else #if test -x $DEBUGFS_EXE -a -x RESIZE2FS_EXE; then
-	echo "$test_name: $test_description: skipped"
-fi
diff --git a/tests/m_rootdir/script b/tests/m_rootdir/script
index fbe1b31..86a0b10 100644
--- a/tests/m_rootdir/script
+++ b/tests/m_rootdir/script
@@ -1,6 +1,9 @@
-if test -x $DEBUGFS_EXE; then
-
 test_description="create fs image from dir"
+if ! test -x $DEBUGFS_EXE; then
+	echo "$test_name: $test_description: skipped (no debugfs)"
+	return 0
+fi
+
 MKFS_DIR=$TMPFILE.dir
 OUT=$test_name.log
 EXP=$test_dir/expect
@@ -65,7 +68,3 @@ fi
 
 rm -rf $TMPFILE.cmd $MKFS_DIR $OUT.sed
 unset MKFS_DIR OUT EXP
-
-else #if test -x $DEBUGFS_EXE; then
-	echo "$test_name: $test_description: skipped"
-fi
diff --git a/tests/r_1024_small_bg/script b/tests/r_1024_small_bg/script
index 2038cb9..65276ab 100644
--- a/tests/r_1024_small_bg/script
+++ b/tests/r_1024_small_bg/script
@@ -1,6 +1,9 @@
-if test -x $RESIZE2FS_EXE -a -x $DEBUGFS_EXE; then
-
 test_description="ext2 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 ext2 -O ^resize_inode -b 1024 -g 1024"
 SIZE_1=64M
 SIZE_2=2G
@@ -25,7 +28,3 @@ 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 
-
diff --git a/tests/r_32to64bit/script b/tests/r_32to64bit/script
index de08bfb..6ecdf90 100644
--- a/tests/r_32to64bit/script
+++ b/tests/r_32to64bit/script
@@ -1,4 +1,7 @@
-if test -x $RESIZE2FS_EXE -a -x $DEBUGFS_EXE; then
+if ! test -x $RESIZE2FS_EXE -o ! -x $DEBUGFS_EXE; then
+	echo "$test_name: $test_description: skipped (no debugfs/resize2fs)"
+	return 0
+fi
 
 FSCK_OPT=-fn
 OUT=$test_name.log
@@ -67,8 +70,3 @@ else
 fi
 
 unset IMAGE FSCK_OPT OUT EXP CONF
-
-else #if test -x $RESIZE2FS_EXE -a -x $DEBUGFS_EXE; then
-	echo "$test_name: $test_description: skipped"
-fi
-
diff --git a/tests/r_32to64bit_expand_full/script b/tests/r_32to64bit_expand_full/script
index 7a57084..ee888fe 100644
--- a/tests/r_32to64bit_expand_full/script
+++ b/tests/r_32to64bit_expand_full/script
@@ -1,4 +1,7 @@
-if test -x $RESIZE2FS_EXE -a -x $DEBUGFS_EXE; then
+if ! test -x $RESIZE2FS_EXE -o ! -x $DEBUGFS_EXE; then
+	echo "$test_name: $test_description: skipped (no debugfs/resize2fs)"
+	return 0
+fi
 
 FSCK_OPT=-fn
 OUT=$test_name.log
@@ -76,8 +79,3 @@ fi
 rm $OUT.before $OUT.after
 
 unset IMAGE FSCK_OPT OUT EXP CONF
-
-else #if test -x $RESIZE2FS_EXE -a -x $DEBUGFS_EXE; then
-	echo "$test_name: $test_description: skipped"
-fi
-
diff --git a/tests/r_32to64bit_meta/script b/tests/r_32to64bit_meta/script
index 25872c4..9711af0 100644
--- a/tests/r_32to64bit_meta/script
+++ b/tests/r_32to64bit_meta/script
@@ -1,4 +1,7 @@
-if test -x $RESIZE2FS_EXE -a -x $DEBUGFS_EXE; then
+if ! test -x $RESIZE2FS_EXE -o ! -x $DEBUGFS_EXE; then
+	echo "$test_name: $test_description: skipped (no debugfs/resize2fs)"
+	return 0
+fi
 
 FSCK_OPT=-fn
 OUT=$test_name.log
@@ -67,8 +70,3 @@ else
 fi
 
 unset IMAGE FSCK_OPT OUT EXP CONF
-
-else #if test -x $RESIZE2FS_EXE -a -x $DEBUGFS_EXE; then
-	echo "$test_name: $test_description: skipped"
-fi
-
diff --git a/tests/r_32to64bit_move_itable/script b/tests/r_32to64bit_move_itable/script
index c188acd..6b339af 100644
--- a/tests/r_32to64bit_move_itable/script
+++ b/tests/r_32to64bit_move_itable/script
@@ -1,4 +1,7 @@
-if test -x $RESIZE2FS_EXE -a -x $DEBUGFS_EXE; then
+if ! test -x $RESIZE2FS_EXE -o ! -x $DEBUGFS_EXE; then
+	echo "$test_name: $test_description: skipped (no debugfs/resize2fs)"
+	return 0
+fi
 
 FSCK_OPT=-fn
 OUT=$test_name.log
@@ -67,8 +70,3 @@ else
 fi
 
 unset IMAGE FSCK_OPT OUT EXP CONF
-
-else #if test -x $RESIZE2FS_EXE -a -x $DEBUGFS_EXE; then
-	echo "$test_name: $test_description: skipped"
-fi
-
diff --git a/tests/r_64bit_big_expand/script b/tests/r_64bit_big_expand/script
index 0319f0e..f514d50 100644
--- a/tests/r_64bit_big_expand/script
+++ b/tests/r_64bit_big_expand/script
@@ -1,6 +1,9 @@
-if test -x $RESIZE2FS_EXE -a -x $DEBUGFS_EXE; then
-
 test_description="very large fs growth using ext4 w/64bit"
+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"
 SIZE_1=512M
 SIZE_2=2T
@@ -29,8 +32,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 
-
diff --git a/tests/r_64to32bit/script b/tests/r_64to32bit/script
index 5d959f0..02718bd 100644
--- a/tests/r_64to32bit/script
+++ b/tests/r_64to32bit/script
@@ -1,4 +1,7 @@
-if test -x $RESIZE2FS_EXE -a -x $DEBUGFS_EXE; then
+if ! test -x $RESIZE2FS_EXE -o ! -x $DEBUGFS_EXE; then
+	echo "$test_name: $test_description: skipped (no debugfs/resize2fs)"
+	return 0
+fi
 
 FSCK_OPT=-fn
 OUT=$test_name.log
@@ -69,8 +72,3 @@ fi
 rm $OUT.before $OUT.after
 
 unset IMAGE FSCK_OPT OUT EXP CONF
-
-else #if test -x $RESIZE2FS_EXE -a -x $DEBUGFS_EXE; then
-	echo "$test_name: $test_description: skipped"
-fi
-
diff --git a/tests/r_64to32bit_meta/script b/tests/r_64to32bit_meta/script
index 5a02e26..69b33cc 100644
--- a/tests/r_64to32bit_meta/script
+++ b/tests/r_64to32bit_meta/script
@@ -1,4 +1,7 @@
-if test -x $RESIZE2FS_EXE -a -x $DEBUGFS_EXE; then
+if ! test -x $RESIZE2FS_EXE -o ! -x $DEBUGFS_EXE; then
+	echo "$test_name: $test_description: skipped (no debugfs/resize2fs)"
+	return 0
+fi
 
 FSCK_OPT=-fn
 OUT=$test_name.log
@@ -69,8 +72,3 @@ fi
 rm $OUT.before $OUT.after
 
 unset IMAGE FSCK_OPT OUT EXP CONF
-
-else #if test -x $RESIZE2FS_EXE -a -x $DEBUGFS_EXE; then
-	echo "$test_name: $test_description: skipped"
-fi
-
diff --git a/tests/r_bigalloc_big_expand/script b/tests/r_bigalloc_big_expand/script
index d939aea..0c9986b 100644
--- a/tests/r_bigalloc_big_expand/script
+++ b/tests/r_bigalloc_big_expand/script
@@ -1,6 +1,9 @@
-if test -x $RESIZE2FS_EXE -a -x $DEBUGFS_EXE; then
-
 test_description="ext4 with bigalloc"
+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 bigalloc"
 SIZE_1=512M
 SIZE_2=2T
@@ -30,8 +33,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 
-
diff --git a/tests/r_expand_full/script b/tests/r_expand_full/script
index 672829f..4a751f7 100644
--- a/tests/r_expand_full/script
+++ b/tests/r_expand_full/script
@@ -1,4 +1,7 @@
-if test -x $RESIZE2FS_EXE -a -x $DEBUGFS_EXE; then
+if ! test -x $RESIZE2FS_EXE -o ! -x $DEBUGFS_EXE; then
+	echo "$test_name: $test_description: skipped (no debugfs/resize2fs)"
+	return 0
+fi
 
 FSCK_OPT=-fn
 OUT=$test_name.log
@@ -78,8 +81,3 @@ fi
 rm $OUT.before $OUT.after
 
 unset IMAGE FSCK_OPT OUT EXP CONF
-
-else #if test -x $RESIZE2FS_EXE -a -x $DEBUGFS_EXE; then
-	echo "$test_name: $test_description: skipped"
-fi
-
diff --git a/tests/r_ext4_big_expand/script b/tests/r_ext4_big_expand/script
index 1b8c823..266c903 100644
--- a/tests/r_ext4_big_expand/script
+++ b/tests/r_ext4_big_expand/script
@@ -1,6 +1,9 @@
-if test -x $RESIZE2FS_EXE -a -x $DEBUGFS_EXE; then
-
 test_description="very large fs growth using ext4"
+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"
 SIZE_1=512M
 SIZE_2=2T
@@ -29,8 +32,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 
-
diff --git a/tests/r_ext4_small_bg/script b/tests/r_ext4_small_bg/script
index cdc6e4a..87f5084 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 
-
diff --git a/tests/r_fixup_lastbg/script b/tests/r_fixup_lastbg/script
index 6a5c5af..0451421 100755
--- a/tests/r_fixup_lastbg/script
+++ b/tests/r_fixup_lastbg/script
@@ -1,5 +1,8 @@
-if test -x $RESIZE2FS_EXE -a -x $DEBUGFS_EXE; then
 test_description="fix up last bg when expanding within the last bg"
+if ! test -x $RESIZE2FS_EXE -o ! -x $DEBUGFS_EXE; then
+	echo "$test_name: $test_description: skipped (no debugfs/resize2fs)"
+	return 0
+fi
 
 EXP=$test_dir/expect
 OUT=$test_name.out
@@ -31,7 +34,3 @@ else
 fi
 
 unset EXP LOG OUT E2FSCK
-
-else #if test -x $RESIZE2FS_EXE -a -x $DEBUGFS_EXE; then
-	echo "$test_name: $test_description: skipped"
-fi
diff --git a/tests/r_fixup_lastbg_big/script b/tests/r_fixup_lastbg_big/script
index 97d9fd4..a12fb16 100755
--- a/tests/r_fixup_lastbg_big/script
+++ b/tests/r_fixup_lastbg_big/script
@@ -1,5 +1,8 @@
-if test -x $RESIZE2FS_EXE -a -x $DEBUGFS_EXE; then
 test_description="fix up last bg when expanding beyond the last bg"
+if ! test -x $RESIZE2FS_EXE -o ! -x $DEBUGFS_EXE; then
+	echo "$test_name: $test_description: skipped (no debugfs/resize2fs)"
+	return 0
+fi
 
 EXP=$test_dir/expect
 OUT=$test_name.out
@@ -31,7 +34,3 @@ else
 fi
 
 unset EXP LOG OUT E2FSCK
-
-else #if test -x $RESIZE2FS_EXE -a -x $DEBUGFS_EXE; then
-	echo "$test_name: $test_description: skipped"
-fi
diff --git a/tests/r_inline_xattr/script b/tests/r_inline_xattr/script
index eb2085d..04baac8 100644
--- a/tests/r_inline_xattr/script
+++ b/tests/r_inline_xattr/script
@@ -1,4 +1,7 @@
-if test -x $RESIZE2FS_EXE -a -x $DEBUGFS_EXE; then
+if ! test -x $RESIZE2FS_EXE -o ! -x $DEBUGFS_EXE; then
+	echo "$test_name: $test_description: skipped (no debugfs/resize2fs)"
+	return 0
+fi
 
 IMAGE=$test_dir/image.gz
 FSCK_OPT=-yf
@@ -46,8 +49,3 @@ else
 fi
 
 unset IMAGE FSCK_OPT OUT EXP
-
-else #if test -x $RESIZE2FS_EXE -a -x $DEBUGFS_EXE; then
-	echo "$test_name: $test_description: skipped"
-fi
-
diff --git a/tests/r_meta_bg_shrink/script b/tests/r_meta_bg_shrink/script
index de77777..c47d4ff 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
-
diff --git a/tests/r_min_itable/script b/tests/r_min_itable/script
index beb6cf9..e778736 100644
--- a/tests/r_min_itable/script
+++ b/tests/r_min_itable/script
@@ -1,4 +1,7 @@
-if test -x $RESIZE2FS_EXE -a -x $DEBUGFS_EXE; then
+if ! test -x $RESIZE2FS_EXE -o ! -x $DEBUGFS_EXE; then
+	echo "$test_name: $test_description: skipped (no debugfs/resize2fs)"
+	return 0
+fi
 
 IMAGE=$test_dir/image.gz
 FSCK_OPT=-yf
@@ -38,8 +41,3 @@ else
 fi
 
 unset IMAGE FSCK_OPT OUT EXP
-
-else #if test -x $RESIZE2FS_EXE -a -x $DEBUGFS_EXE; then
-	echo "$test_name: $test_description: skipped"
-fi
-
diff --git a/tests/r_move_itable/script b/tests/r_move_itable/script
index 3f02a79..6109f35 100644
--- a/tests/r_move_itable/script
+++ b/tests/r_move_itable/script
@@ -1,4 +1,7 @@
-if test -x $RESIZE2FS_EXE -a -x $DEBUGFS_EXE; then
+if ! test -x $RESIZE2FS_EXE -o ! -x $DEBUGFS_EXE; then
+	echo "$test_name: $test_description: skipped (no debugfs/resize2fs)"
+	return 0
+fi
 
 FSCK_OPT=-yf
 OUT=$test_name.log
@@ -110,7 +113,3 @@ else
 fi
 
 unset IMAGE FSCK_OPT OUT EXP
-
-else #if test -x $RESIZE2FS_EXE -a -x $DEBUGFS_EXE; then
-	echo "$test_name: $test_description: skipped"
-fi 
diff --git a/tests/r_move_itable_nostride/script b/tests/r_move_itable_nostride/script
index 261ef53..d3b95b1 100644
--- a/tests/r_move_itable_nostride/script
+++ b/tests/r_move_itable_nostride/script
@@ -10,7 +10,10 @@ if [ $(uname -s) = "Darwin" ]; then
 	return 0
 fi
 
-if test -x $RESIZE2FS_EXE -a -x $DEBUGFS_EXE; then
+if ! test -x $RESIZE2FS_EXE -o ! -x $DEBUGFS_EXE; then
+	echo "$test_name: $test_description: skipped (no debugfs/resize2fs)"
+	return 0
+fi
 
 FSCK_OPT=-yf
 OUT=$test_name.log
@@ -63,7 +66,3 @@ else
 fi
 
 unset IMAGE FSCK_OPT OUT EXP
-
-else #if test -x $RESIZE2FS_EXE -a -x $DEBUGFS_EXE; then
-	echo "$test_name: $test_description: skipped"
-fi 
diff --git a/tests/r_move_itable_realloc/script b/tests/r_move_itable_realloc/script
index c42ec04..7005bf8 100644
--- a/tests/r_move_itable_realloc/script
+++ b/tests/r_move_itable_realloc/script
@@ -10,7 +10,10 @@ if [ $(uname -s) = "Darwin" ]; then
 	return 0
 fi
 
-if test -x $RESIZE2FS_EXE -a -x $DEBUGFS_EXE; then
+if ! test -x $RESIZE2FS_EXE -o ! -x $DEBUGFS_EXE; then
+	echo "$test_name: $test_description: skipped (no debugfs/resize2fs)"
+	return 0
+fi
 
 FSCK_OPT=-yf
 OUT=$test_name.log
@@ -63,7 +66,3 @@ else
 fi
 
 unset IMAGE FSCK_OPT OUT EXP
-
-else #if test -x $RESIZE2FS_EXE -a -x $DEBUGFS_EXE; then
-	echo "$test_name: $test_description: skipped"
-fi 
diff --git a/tests/run_mke2fs b/tests/run_mke2fs
index 82eca41..2a784fe 100644
--- a/tests/run_mke2fs
+++ b/tests/run_mke2fs
@@ -20,7 +20,7 @@ AFTER_CMD='$DUMPE2FS $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT1'
 
 else #if test -x $DEBUGFS_EXE; then
 	rm -f $test_name.ok $test_name.failed
-	echo "skipped"
+	echo "skipped (no debugfs)"
 fi 
 
 unset DESCRIPTION FS_SIZE MKE2FS_OPTS MKE2FS_SKIP_PROGRESS \
diff --git a/tests/t_iexpand_full/script b/tests/t_iexpand_full/script
index f8565a7..875c70e 100644
--- a/tests/t_iexpand_full/script
+++ b/tests/t_iexpand_full/script
@@ -1,4 +1,7 @@
-if test -x $RESIZE2FS_EXE -a -x $DEBUGFS_EXE; then
+if ! test -x $RESIZE2FS_EXE -o ! -x $DEBUGFS_EXE; then
+	echo "$test_name: $test_description: skipped (no debugfs/resize2fs)"
+	return 0
+fi
 
 if [ $(uname -s) = "Darwin" ]; then
 	# creates a 3GB filesystem
@@ -78,8 +81,3 @@ fi
 rm $OUT.before $OUT.after
 
 unset IMAGE FSCK_OPT OUT EXP CONF
-
-else #if test -x $RESIZE2FS_EXE -a -x $DEBUGFS_EXE; then
-	echo "$test_name: $test_description: skipped"
-fi
-
diff --git a/tests/t_iexpand_mcsum/script b/tests/t_iexpand_mcsum/script
index 4b584d3..116cad9 100644
--- a/tests/t_iexpand_mcsum/script
+++ b/tests/t_iexpand_mcsum/script
@@ -1,4 +1,8 @@
-if test -x $RESIZE2FS_EXE -a -x $DEBUGFS_EXE; then
+if ! test -x $RESIZE2FS_EXE -o ! -x $DEBUGFS_EXE; then
+	echo "$test_name: $test_description: skipped (no debugfs/resize2fs)"
+	return 0
+fi
+
 if [ $(uname -s) = "Darwin" ]; then
 	# creates a 3GB filesystem
 	echo "$test_name: $DESCRIPTION: skipped for HFS+ (no sparse files)"
@@ -78,8 +82,3 @@ fi
 rm $OUT.before $OUT.after
 
 unset IMAGE FSCK_OPT OUT EXP CONF
-
-else #if test -x $RESIZE2FS_EXE -a -x $DEBUGFS_EXE; then
-	echo "$test_name: $test_description: skipped"
-fi
-
diff --git a/tests/t_replay_and_set/script b/tests/t_replay_and_set/script
index 36411fc..bec9108 100644
--- a/tests/t_replay_and_set/script
+++ b/tests/t_replay_and_set/script
@@ -1,4 +1,7 @@
-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
@@ -25,7 +28,7 @@ echo "debugfs write journal" >> $OUT
 echo "jo" > $TMPFILE.cmd
 echo "jw -b $bitmaps /dev/zero" >> $TMPFILE.cmd
 echo "jc" >> $TMPFILE.cmd
-$DEBUGFS_EXE -w -f $TMPFILE.cmd $TMPFILE 2>> $OUT.new > /dev/null
+$DEBUGFS -w -f $TMPFILE.cmd $TMPFILE 2>> $OUT.new > /dev/null
 sed -f $cmd_dir/filter.sed < $OUT.new >> $OUT
 rm -rf $OUT.new
 
@@ -54,7 +57,3 @@ else
 fi
 
 unset IMAGE FSCK_OPT OUT EXP
-
-else #if test -x $DEBUGFS_EXE; then
-	echo "$test_name: $test_description: skipped"
-fi
diff --git a/tests/u_debugfs_opt/script b/tests/u_debugfs_opt/script
index bb93917..b5a65ec 100644
--- a/tests/u_debugfs_opt/script
+++ b/tests/u_debugfs_opt/script
@@ -1,5 +1,8 @@
 test_description="e2undo with debugfs -z"
-if test -x $E2UNDO_EXE -a -x $DEBUGFS_EXE; then
+if ! test -x $E2UNDO_EXE -o ! -x $DEBUGFS_EXE; then
+	echo "$test_name: $test_description: skipped (no debugfs/e2undo)"
+	return 0
+fi
 
 TDB_FILE=${TMPDIR:-/tmp}/tune2fs-$(basename $TMPFILE).e2undo
 OUT=$test_name.log
@@ -29,4 +32,3 @@ else
 	echo "$test_name: $test_description: failed"
 fi
 rm -f $TDB_FILE $TMPFILE
-fi
