From 8fd00abd4a74b6e15d90b69007bd78c0658b7b03 Mon Sep 17 00:00:00 2001 From: Ruediger Meier Date: Mon, 12 May 2014 12:42:07 +0200 Subject: 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 --- tests/ts/losetup/losetup | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tests') diff --git a/tests/ts/losetup/losetup b/tests/ts/losetup/losetup index 234c58f6f..f27501bc4 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) -- cgit v1.2.3-55-g7522