]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
tests: don't skip case "output undefined"
authorRuediger Meier <ruediger.meier@ga-group.nl>
Sat, 5 Mar 2016 17:51:59 +0000 (18:51 +0100)
committerRuediger Meier <ruediger.meier@ga-group.nl>
Mon, 7 Mar 2016 22:34:24 +0000 (23:34 +0100)
Treat missing expected files as empty and let the test fail if
there is non-empty output.

Expected output may be missing in these cases:
 1. forgot to commit the file after changing/adding a (sub)test
 2. a bug in a test where we do tricks with TS_EXPECTED
 3. and most notable if ts_die() is called before a subtest is
    initialized, e.g. in ts_scsi_debug_init()

I always wondered why we don't treat this as FAILED. Now we do
so, ts_finalize and ts_gen_diff looks much cleaner now.

The change discovers that tests with subtest were ignoring the
"non-sub" expected files which had to be fixed. BTW we removed
any zero sized files.

Moreover now we respect diff's return value. In past all test
succeeded when diff was not able to write to diffdir, e.g. when
running tests as normal user after they run as root.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
25 files changed:
tests/expected/build-sys/config [deleted file]
tests/expected/colcrt/functional [deleted file]
tests/expected/colcrt/regressions [deleted file]
tests/expected/eject/umount [deleted file]
tests/expected/libmount/context-utab
tests/expected/libmount/context-utab-py
tests/expected/libmount/tabdiff [deleted file]
tests/expected/logger/errors [deleted file]
tests/expected/logger/formats [deleted file]
tests/expected/logger/options [deleted file]
tests/expected/losetup/losetup [deleted file]
tests/expected/minix/mkfs [deleted file]
tests/expected/misc/getopt2 [deleted file]
tests/expected/misc/getopt3 [deleted file]
tests/expected/mount/fstab-btrfs [deleted file]
tests/expected/mount/umount-alltargets
tests/expected/script/options [deleted file]
tests/expected/sfdisk/dos [deleted file]
tests/expected/sfdisk/gpt [deleted file]
tests/expected/sfdisk/resize [deleted file]
tests/functions.sh
tests/ts/libmount/context-utab
tests/ts/libmount/context-utab-py
tests/ts/losetup/losetup
tests/ts/misc/getopt2

diff --git a/tests/expected/build-sys/config b/tests/expected/build-sys/config
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/tests/expected/colcrt/functional b/tests/expected/colcrt/functional
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/tests/expected/colcrt/regressions b/tests/expected/colcrt/regressions
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/tests/expected/eject/umount b/tests/expected/eject/umount
deleted file mode 100644 (file)
index e69de29..0000000
index cde2e3fbb6de016d47a690c6e87c56636a7144f3..2149373b8fdf73e5e42e55d058aea70da259e74c 100644 (file)
@@ -1,9 +1,8 @@
-Init device
 Create partitions
 Create filesystem
 Do tests...
 Create filesystem [btrfs]
 All mount options (btrfs subvolume + utab) ---
-rw,relatime,ssd,uhelper=foo
+rw,relatime,ssd,space_cache,uhelper=foo
 ---
 ...done.
index cde2e3fbb6de016d47a690c6e87c56636a7144f3..2149373b8fdf73e5e42e55d058aea70da259e74c 100644 (file)
@@ -1,9 +1,8 @@
-Init device
 Create partitions
 Create filesystem
 Do tests...
 Create filesystem [btrfs]
 All mount options (btrfs subvolume + utab) ---
-rw,relatime,ssd,uhelper=foo
+rw,relatime,ssd,space_cache,uhelper=foo
 ---
 ...done.
diff --git a/tests/expected/libmount/tabdiff b/tests/expected/libmount/tabdiff
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/tests/expected/logger/errors b/tests/expected/logger/errors
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/tests/expected/logger/formats b/tests/expected/logger/formats
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/tests/expected/logger/options b/tests/expected/logger/options
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/tests/expected/losetup/losetup b/tests/expected/losetup/losetup
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/tests/expected/minix/mkfs b/tests/expected/minix/mkfs
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/tests/expected/misc/getopt2 b/tests/expected/misc/getopt2
deleted file mode 100644 (file)
index 59ec59b..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-exit value: 0
-exit value: 0
-exit value: 0
-exit value: 1
-exit value: 0
-exit value: 0
-exit value: 0
-exit value: 0
-exit value: 1
-exit value: 0
-exit value: 0
-exit value: 0
-exit value: 0
-exit value: 0
-exit value: 1
-exit value: 1
-exit value: 0
-exit value: 0
-exit value: 1
diff --git a/tests/expected/misc/getopt3 b/tests/expected/misc/getopt3
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/tests/expected/mount/fstab-btrfs b/tests/expected/mount/fstab-btrfs
deleted file mode 100644 (file)
index 3582111..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Success
index 53514d1c060bd7933582ac555cfcf348b574bfc8..a0e467920bfdb91f9477a64b82f2f0d32263a5df 100644 (file)
@@ -1,4 +1,3 @@
-Init device
 Create partitions
 Create filesystem A
 Create filesystem B
diff --git a/tests/expected/script/options b/tests/expected/script/options
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/tests/expected/sfdisk/dos b/tests/expected/sfdisk/dos
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/tests/expected/sfdisk/gpt b/tests/expected/sfdisk/gpt
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/tests/expected/sfdisk/resize b/tests/expected/sfdisk/resize
deleted file mode 100644 (file)
index e69de29..0000000
index 9e5d24325ceea66f653cadb1399ae687588fbda0..5d54efd96d5939fa5b98010a7bce8ba62d7c66b2 100644 (file)
@@ -378,22 +378,21 @@ function ts_valgrind {
 function ts_gen_diff {
        local res=0
 
-       if [ -s "$TS_OUTPUT" ]; then
+       [ -f "$TS_OUTPUT" ] || return 1
+       [ -f "$TS_EXPECTED" ] || TS_EXPECTED=/dev/null
 
-               # remove libtool lt- prefixes
-               sed --in-place 's/^lt\-\(.*\: \)/\1/g' $TS_OUTPUT
+       # remove libtool lt- prefixes
+       sed --in-place 's/^lt\-\(.*\: \)/\1/g' $TS_OUTPUT
 
-               [ -d "$TS_DIFFDIR" ] || mkdir -p "$TS_DIFFDIR"
-               diff -u $TS_EXPECTED $TS_OUTPUT > $TS_DIFF
+       [ -d "$TS_DIFFDIR" ] || mkdir -p "$TS_DIFFDIR"
+       diff -u $TS_EXPECTED $TS_OUTPUT > $TS_DIFF
 
-               if [ -s $TS_DIFF ]; then
-                       res=1
-               else
-                       rm -f $TS_DIFF;
-               fi
-       else
+       if [ $? -ne 0 ] || [ -s $TS_DIFF ]; then
                res=1
+       else
+               rm -f $TS_DIFF;
        fi
+
        return $res
 }
 
@@ -409,16 +408,12 @@ function tt_gen_mem_report {
 function ts_finalize_subtest {
        local res=0
 
-       if [ -s "$TS_EXPECTED" ]; then
-               ts_gen_diff
-               if [ $? -eq 1 ]; then
-                       ts_failed_subtest "$1"
-                       res=1
-               else
-                       ts_ok_subtest "$(tt_gen_mem_report "$1")"
-               fi
+       ts_gen_diff
+       if [ $? -eq 1 ]; then
+               ts_failed_subtest "$1"
+               res=1
        else
-               ts_skip_subtest "output undefined"
+               ts_ok_subtest "$(tt_gen_mem_report "$1")"
        fi
 
        [ $res -ne 0 ] && TS_NSUBFAILED=$(( $TS_NSUBFAILED + 1 ))
@@ -433,22 +428,15 @@ function ts_finalize {
        ts_cleanup_on_exit
 
        if [ $TS_NSUBTESTS -ne 0 ]; then
-               if [ $TS_NSUBFAILED -ne 0 ]; then
+               if ! ts_gen_diff || [ $TS_NSUBFAILED -ne 0 ]; then
                        ts_failed "$TS_NSUBFAILED from $TS_NSUBTESTS sub-tests"
                else
                        ts_ok "all $TS_NSUBTESTS sub-tests PASSED"
                fi
        fi
 
-       if [ -s $TS_EXPECTED ]; then
-               ts_gen_diff
-               if [ $? -eq 1 ]; then
-                       ts_failed "$1"
-               fi
-               ts_ok "$1"
-       fi
-
-       ts_skip "output undefined"
+       ts_gen_diff || ts_failed "$1"
+       ts_ok "$1"
 }
 
 function ts_die {
index 8b93fe990121c060f9bfb269e02ee1076ba674a2..38bc1701c766e795cf56d53cb0e6cc8eb51149f9 100755 (executable)
@@ -15,6 +15,7 @@ ts_check_test_command "$TS_CMD_UUIDGEN"
 
 ts_skip_nonroot
 ts_check_prog "mkfs.ext4"
+ts_check_prog "mkfs.btrfs"
 
 TESTPROG="$TS_HELPER_LIBMOUNT_CONTEXT"
 LABEL=libmount-test
@@ -93,35 +94,33 @@ grep -q $DEVICE $LIBMOUNT_UTAB && \
 ts_finalize_subtest
 
 
-if [ -x "/sbin/mkfs.btrfs" ]; then
-       $TS_CMD_WIPEFS -a  $DEVICE &> /dev/null
-       ts_log "Create filesystem [btrfs]"
-       mkfs.btrfs -L "$LABEL" $DEVICE &> /dev/null
-       udevadm settle
+$TS_CMD_WIPEFS -a  $DEVICE &> /dev/null
+ts_log "Create filesystem [btrfs]"
+mkfs.btrfs -L "$LABEL" $DEVICE &> /dev/null
+udevadm settle
 
-       mount -t btrfs $DEVICE $MOUNTPOINT &> /dev/null
-       btrfs subvolume create $MOUNTPOINT/sub &> /dev/null
-       umount $MOUNTPOINT &> /dev/null
+mount -t btrfs $DEVICE $MOUNTPOINT &> /dev/null
+btrfs subvolume create $MOUNTPOINT/sub &> /dev/null
+umount $MOUNTPOINT &> /dev/null
 
-       udevadm settle
+udevadm settle
 
-       ts_init_subtest "mount-uhelper-subvol"
-       mkdir -p $MOUNTPOINT &>  /dev/null
-       ts_valgrind $TESTPROG --mount -o uhelper=foo,rw,subvol=sub $DEVICE  $MOUNTPOINT >> $TS_OUTPUT 2>&1
-       grep -q $DEVICE $LIBMOUNT_UTAB || \
-               echo "cannot find $DEVICE in $LIBMOUNT_UTAB" >> $TS_OUTPUT 2>&1
-       ts_finalize_subtest
+ts_init_subtest "mount-uhelper-subvol"
+mkdir -p $MOUNTPOINT &>  /dev/null
+ts_valgrind $TESTPROG --mount -o uhelper=foo,rw,subvol=sub $DEVICE  $MOUNTPOINT >> $TS_OUTPUT 2>&1
+grep -q $DEVICE $LIBMOUNT_UTAB || \
+       echo "cannot find $DEVICE in $LIBMOUNT_UTAB" >> $TS_OUTPUT 2>&1
+ts_finalize_subtest
 
-       ts_log "All mount options (btrfs subvolume + utab) ---"
-       $TS_CMD_FINDMNT --mtab $MOUNTPOINT -o OPTIONS -n >> $TS_OUTPUT 2>&1
-       ts_log "---"
+ts_log "All mount options (btrfs subvolume + utab) ---"
+$TS_CMD_FINDMNT --mtab $MOUNTPOINT -o OPTIONS -n >> $TS_OUTPUT 2>&1
+ts_log "---"
 
-       ts_init_subtest "umount-subvol"
-       ts_valgrind $TESTPROG --umount $MOUNTPOINT >> $TS_OUTPUT 2>&1
-       grep -q $DEVICE $LIBMOUNT_UTAB && \
-               echo "umount (mountpoint) failed: found $DEVICE in $LIBMOUNT_UTAB" >> $TS_OUTPUT 2>&1
-       ts_finalize_subtest
-fi
+ts_init_subtest "umount-subvol"
+ts_valgrind $TESTPROG --umount $MOUNTPOINT >> $TS_OUTPUT 2>&1
+grep -q $DEVICE $LIBMOUNT_UTAB && \
+       echo "umount (mountpoint) failed: found $DEVICE in $LIBMOUNT_UTAB" >> $TS_OUTPUT 2>&1
+ts_finalize_subtest
 
 ts_log "...done."
 rmmod scsi_debug
index 5337d10b25ee1d496be32e9ba7753c9497c38b52..fdde63a7aaa5ecc84b4a67aa6d05257303d5e641 100755 (executable)
@@ -14,6 +14,7 @@ ts_check_test_command "$TS_CMD_UUIDGEN"
 
 ts_skip_nonroot
 ts_check_prog "mkfs.ext4"
+ts_check_prog "mkfs.btrfs"
 
 ts_init_py libmount
 
@@ -93,35 +94,34 @@ grep -q $DEVICE $LIBMOUNT_UTAB && \
        echo "umount (mountpoint) failed: found $DEVICE in $LIBMOUNT_UTAB" >> $TS_OUTPUT 2>&1
 ts_finalize_subtest
 
-if [ -x "/sbin/mkfs.btrfs" ]; then
-       $TS_CMD_WIPEFS -a  $DEVICE &> /dev/null
-       ts_log "Create filesystem [btrfs]"
-       mkfs.btrfs -L "$LABEL" $DEVICE &> /dev/null
-       udevadm settle
-
-       mount -t btrfs $DEVICE $MOUNTPOINT &> /dev/null
-       btrfs subvolume create $MOUNTPOINT/sub &> /dev/null
-       umount $MOUNTPOINT &> /dev/null
-
-       udevadm settle
-
-       ts_init_subtest "mount-uhelper-subvol"
-       mkdir -p $MOUNTPOINT &>  /dev/null
-       $PYTHON $TESTPROG --mount -o uhelper=foo,rw,subvol=sub $DEVICE  $MOUNTPOINT >> $TS_OUTPUT 2>&1
-       grep -q $DEVICE $LIBMOUNT_UTAB || \
-               echo "cannot find $DEVICE in $LIBMOUNT_UTAB" >> $TS_OUTPUT 2>&1
-       ts_finalize_subtest
-
-       ts_log "All mount options (btrfs subvolume + utab) ---"
-       $TS_CMD_FINDMNT --mtab $MOUNTPOINT -o OPTIONS -n >> $TS_OUTPUT 2>&1
-       ts_log "---"
-
-       ts_init_subtest "umount-subvol"
-       $PYTHON $TESTPROG --umount $MOUNTPOINT >> $TS_OUTPUT 2>&1
-       grep -q $DEVICE $LIBMOUNT_UTAB && \
-               echo "umount (mountpoint) failed: found $DEVICE in $LIBMOUNT_UTAB" >> $TS_OUTPUT 2>&1
-       ts_finalize_subtest
-fi
+
+$TS_CMD_WIPEFS -a  $DEVICE &> /dev/null
+ts_log "Create filesystem [btrfs]"
+mkfs.btrfs -L "$LABEL" $DEVICE &> /dev/null
+udevadm settle
+
+mount -t btrfs $DEVICE $MOUNTPOINT &> /dev/null
+btrfs subvolume create $MOUNTPOINT/sub &> /dev/null
+umount $MOUNTPOINT &> /dev/null
+
+udevadm settle
+
+ts_init_subtest "mount-uhelper-subvol"
+mkdir -p $MOUNTPOINT &>  /dev/null
+$PYTHON $TESTPROG --mount -o uhelper=foo,rw,subvol=sub $DEVICE  $MOUNTPOINT >> $TS_OUTPUT 2>&1
+grep -q $DEVICE $LIBMOUNT_UTAB || \
+       echo "cannot find $DEVICE in $LIBMOUNT_UTAB" >> $TS_OUTPUT 2>&1
+ts_finalize_subtest
+
+ts_log "All mount options (btrfs subvolume + utab) ---"
+$TS_CMD_FINDMNT --mtab $MOUNTPOINT -o OPTIONS -n >> $TS_OUTPUT 2>&1
+ts_log "---"
+
+ts_init_subtest "umount-subvol"
+$PYTHON $TESTPROG --umount $MOUNTPOINT >> $TS_OUTPUT 2>&1
+grep -q $DEVICE $LIBMOUNT_UTAB && \
+       echo "umount (mountpoint) failed: found $DEVICE in $LIBMOUNT_UTAB" >> $TS_OUTPUT 2>&1
+ts_finalize_subtest
 
 ts_log "...done."
 rmmod scsi_debug
index a50d2eb4c35159f4ec253f990328b7242aeeceb9..1fec0dd06dce3b4159136cd1c0aadd9604b5388c 100755 (executable)
@@ -30,7 +30,6 @@ ts_check_test_command "$TS_CMD_LSBLK"
 $TS_CMD_LOSETUP --version >/dev/null 2>$TS_OUTPUT || ts_failed
 $TS_CMD_LOSETUP --unknownopt >>$TS_OUTPUT 2>/dev/null && ts_failed
 test -s $TS_OUTPUT && ts_failed
-rm -f $TS_OUTPUT
 
 ts_skip_nonroot
 ts_check_losetup
index 677131f439950f9f115e3bc8f3e919248f90a274..779d15b78ad93e31a77c1ef40873d5fcb80f3419 100755 (executable)
@@ -27,120 +27,101 @@ $TS_CMD_GETOPT -a -o abcde -l abcde -- -a -ab -abc -ac >> $TS_OUTPUT 2>&1
 echo "exit value: $?" >> $TS_OUTPUT
 ts_finalize_subtest
 
-echo "exit value: $?" >> $TS_OUTPUT
 ts_init_subtest alternative_option_long
 $TS_CMD_GETOPT --alternative -o a -l one,two:,three::,four:: -- -a -one -two=MANDATORY -three=OPTIONAL >> $TS_OUTPUT 2>&1
 echo "exit value: $?" >> $TS_OUTPUT
 ts_finalize_subtest
 
-echo "exit value: $?" >> $TS_OUTPUT
 ts_init_subtest alternative_option_short
 $TS_CMD_GETOPT -a -o a -l one,two:,three::,four:: -- -a -one -two=MANDATORY -three=OPTIONAL >> $TS_OUTPUT 2>&1
 echo "exit value: $?" >> $TS_OUTPUT
 ts_finalize_subtest
 
-echo "exit value: $?" >> $TS_OUTPUT
 ts_init_subtest invalid_getopt_option
 $TS_CMD_GETOPT -b >> $TS_OUTPUT 2>&1
 echo "exit value: $?" >> $TS_OUTPUT
 sed -i '1,1s/.*\///' $TS_OUTPUT
 ts_finalize_subtest
 
-echo "exit value: $?" >> $TS_OUTPUT
 ts_init_subtest invocation_model_one
 $TS_CMD_GETOPT abc:d::e::f::g: ARG0 -b ARG1 -d -eOPTIONAL1 -f NOT_OPTIONAL ARG2 -a -c -ISREQUIRED ARG3 -g "BECOMES THREE ARGUMENTS" >> $TS_OUTPUT 2>&1
 echo "exit value: $?" >> $TS_OUTPUT
 ts_finalize_subtest
 
-echo "exit value: $?" >> $TS_OUTPUT
 ts_init_subtest invocation_model_three_as_one
 $TS_CMD_GETOPT -o abc:d::e::f::g: -- ARG0 -b ARG1 -d -eOPTIONAL1 -f NOT_OPTIONAL ARG2 -a -c -ISREQUIRED ARG3 -g "BECOMES THREE ARGUMENTS" >> $TS_OUTPUT 2>&1
 echo "exit value: $?" >> $TS_OUTPUT
 ts_finalize_subtest
 
-echo "exit value: $?" >> $TS_OUTPUT
 ts_init_subtest invocation_model_two_as_one
 $TS_CMD_GETOPT -- abc:d::e::f::g: ARG0 -b ARG1 -d -eOPTIONAL1 -f NOT_OPTIONAL ARG2 -a -c -ISREQUIRED ARG3 -g "BECOMES THREE ARGUMENTS" >> $TS_OUTPUT 2>&1
 echo "exit value: $?" >> $TS_OUTPUT
 ts_finalize_subtest
 
-echo "exit value: $?" >> $TS_OUTPUT
 ts_init_subtest invocation_without_parameters
 $TS_CMD_GETOPT >> $TS_OUTPUT 2>&1
 echo "exit value: $?" >> $TS_OUTPUT
 ts_finalize_subtest
 
-echo "exit value: $?" >> $TS_OUTPUT
 ts_init_subtest long_option_ambiguous_1
 $TS_CMD_GETOPT -o a -l long1,long2 -- --long >> $TS_OUTPUT 2>&1
 echo "exit value: $?" >> $TS_OUTPUT
 sed -i -e '1,1s/.*\///' -e "1s/ambiguous$/ambiguous; possibilities: '--long1' '--long2'/" $TS_OUTPUT
 ts_finalize_subtest
 
-echo "exit value: $?" >> $TS_OUTPUT
 ts_init_subtest longopts
 $TS_CMD_GETOPT -o a -l long1,secondlong:,thirdlong::,abbriviation: -- --long1 EXTRA1 --thirdlong=ARGUMENT --secondlong=ARG --abbr ABBRARG -a >> $TS_OUTPUT 2>&1
 echo "exit value: $?" >> $TS_OUTPUT
 ts_finalize_subtest
 
-echo "exit value: $?" >> $TS_OUTPUT
 ts_init_subtest name_option_long
 $TS_CMD_GETOPT -n THIS_PROGRAM -o a -l long -- -b --long --whatever -a >> $TS_OUTPUT 2>&1
 echo "exit value: $?" >> $TS_OUTPUT
 ts_finalize_subtest
 
-echo "exit value: $?" >> $TS_OUTPUT
 ts_init_subtest name_option_short
 $TS_CMD_GETOPT --name THIS_PROGRAM -o a -l long -- -b --long --whatever -a >> $TS_OUTPUT 2>&1
 echo "exit value: $?" >> $TS_OUTPUT
 ts_finalize_subtest
 
-echo "exit value: $?" >> $TS_OUTPUT
 ts_init_subtest quiet_option_long
 $TS_CMD_GETOPT --quiet -o a,b: -l long1,long2 -- -c --unknown --long -b >> $TS_OUTPUT 2>&1
 echo "exit value: $?" >> $TS_OUTPUT
 ts_finalize_subtest
 
-echo "exit value: $?" >> $TS_OUTPUT
 ts_init_subtest quiet_option_short
 $TS_CMD_GETOPT -q -o a,b: -l long1,long2 -- -c --unknown --long -b >> $TS_OUTPUT 2>&1
 echo "exit value: $?" >> $TS_OUTPUT
 ts_finalize_subtest
 
-echo "exit value: $?" >> $TS_OUTPUT
 ts_init_subtest quiet_output_option_long
 $TS_CMD_GETOPT --quiet-output -o a,b: -l long1,long2 -- -c --unknown --long -b >> $TS_OUTPUT 2>&1
 echo "exit value: $?" >> $TS_OUTPUT
 sed -i -e '1,4s/.*\///' -e "3s/ambiguous$/ambiguous; possibilities: '--long1' '--long2'/" $TS_OUTPUT
 ts_finalize_subtest
 
-echo "exit value: $?" >> $TS_OUTPUT
 ts_init_subtest quiet_output_option_short
 $TS_CMD_GETOPT -Q -o a,b: -l long1,long2 -- -c --unknown --long -b >> $TS_OUTPUT 2>&1
 echo "exit value: $?" >> $TS_OUTPUT
 sed -i -e '1,4s/.*\///' -e "3s/ambiguous$/ambiguous; possibilities: '--long1' '--long2'/" $TS_OUTPUT
 ts_finalize_subtest
 
-echo "exit value: $?" >> $TS_OUTPUT
 ts_init_subtest same_long_short_options
 $TS_CMD_GETOPT -o a -l a -- -a --a >> $TS_OUTPUT 2>&1
 echo "exit value: $?" >> $TS_OUTPUT
 ts_finalize_subtest
 
-echo "exit value: $?" >> $TS_OUTPUT
 ts_init_subtest test_for_enhanced_getopt
 $TS_CMD_GETOPT -T >> $TS_OUTPUT 2>&1
 echo "exit value: $?" >> $TS_OUTPUT
 ts_finalize_subtest
 
-echo "exit value: $?" >> $TS_OUTPUT
 ts_init_subtest unknown_options
 $TS_CMD_GETOPT -o a -l long -- -b --long --whatever -a >> $TS_OUTPUT 2>&1
 echo "exit value: $?" >> $TS_OUTPUT
 sed -i '1,2s/.*\///' $TS_OUTPUT
 ts_finalize_subtest
 
-echo "exit value: $?" >> $TS_OUTPUT
 ts_init_subtest unquoted_option_bash
 $TS_CMD_GETOPT -s bash -u -o a: -l long1: -- -a '$?!* ' --long \"\\\' 'More
  than