From: Ruediger Meier Date: Mon, 12 May 2014 10:42:07 +0000 (+0200) Subject: tests: use ts_check_losetup in losetup test X-Git-Tag: v2.25-rc1~154^2~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8fd00abd4a74b6e15d90b69007bd78c0658b7b03;p=thirdparty%2Futil-linux.git tests: use ts_check_losetup in losetup test In losetup test we have to handle the special case that ts_check_losetup requires a working losetup binary. Signed-off-by: Ruediger Meier --- diff --git a/tests/ts/losetup/losetup b/tests/ts/losetup/losetup index 234c58f6f2..f27501bc40 100755 --- a/tests/ts/losetup/losetup +++ b/tests/ts/losetup/losetup @@ -24,7 +24,16 @@ ts_init "$*" 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)