In losetup test we have to handle the special case that ts_check_losetup
requires a working losetup binary.
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
ts_check_test_command "$TS_CMD_LOSETUP"
+# Before checking for loop support we would need to test if losetup -f works at
+# all. At least we do a simple executable test for now.
+$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
+
DEVICE=$(ts_scsi_debug_init dev_size_mb=11)
REFILE=$(ts_image_init 10)