summaryrefslogtreecommitdiffstats
path: root/tests/ts/losetup
Commit message (Collapse)AuthorAgeFilesLines
* tests: fix grep expressions for devicesRuediger Meier2018-03-191-1/+1
| | | | | | | | | | ts_is_mounted "/dev/loop1" returned true if /dev/loop17 was mounted. A very annoying source of sporadic failures since many years. This issue became more visible since running the checks in parallel, which increases the probability to get bigger loop device numbers. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* tests: don't call tests with races in --parallelKarel Zak2017-12-071-22/+32
| | | | | | Some of the tests have a race by design (=wanted). Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: Introduce libmount/loopStanislav Brabec2017-01-161-1/+1
| | | | | | Add libmount/loop test that tests various loop mount options. Signed-off-by: Stanislav Brabec <sbrabec@suse.cz>
* tests: always quote $LODEVRuediger Meier2016-11-071-23/+23
| | | | | | | Since there is no error handling in this test $LODEV may be empty. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* tests: replace sleep by udevadmRuediger Meier2016-11-071-11/+10Star
| | | | | Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl> CC: Stanislav Brabec <sbrabec@suse.cz>
* tests: udevadm settle before losetup -dRuediger Meier2016-11-071-0/+10
| | | | | | | Fails on Debian 7 (wheezy), Kernel 3.2. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl> CC: Stanislav Brabec <sbrabec@suse.cz>
* tests: consolidate rmmod scsi_debugRuediger Meier2016-10-211-4/+0Star
| | | | | | | | | - auto cleanup on test exit - Add smart timeout: Newer openSUSE systems on OBS failed to rmmod almost always. udevadm settle does not seem to have any affect. - now tests will fail if rmmod fails Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* tests: fix losetup tests for --nooverlapKarel Zak2016-08-171-18/+18
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: Add losetup-loop test suiteStanislav Brabec2016-08-171-0/+228
| | | | | | | Add losetup loop test suite that tests proper behavior of conflicting and re-used loop devices. Signed-off-by: Stanislav Brabec <sbrabec@suse.cz>
* tests: udevadm settle before losetup -dRuediger Meier2016-03-091-0/+4
| | | | | | | | | | | On Debian 7 (wheezy)/linux-3.2 we need "udevadm settle" between losetup and losetup -d in case that the backing file is a block device (scsi_debug). This issue is visible since: 7e604f3c tests: don't skip case "output undefined" Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* tests: don't skip case "output undefined"Ruediger Meier2016-03-071-1/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* tests: add some check_test_command requirementsRuediger Meier2016-02-122-0/+2
| | | | Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* tests: split off losetup scsi_debug partRuediger Meier2014-05-273-61/+90
| | | | | | | It's a pity that we would skip the whole test if scsi_debug is not available. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* tests: ts_scsi_debug_init must not run in a subshellRuediger Meier2014-05-131-2/+3
| | | | | | | | | | | ts_skip and ts_die won't work from subshell. Now we simply use TS_DEVICE which is globally set in that function. I've made sure that we never change TS_DEVICE variable after we've got it. So we could use it again for cleanup on exit in ts_{finalize,die,skip} functions. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* tests: use ts_check_losetup in losetup testRuediger Meier2014-05-131-0/+9
| | | | | | | 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>
* tests: check commands needed for running a test existSami Kerola2014-03-071-0/+3
| | | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: avoid executing dirname(1) commandSami Kerola2014-02-171-1/+1
| | | | | | Bash parameter expansion does the same thing. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* tests: add losetup testsKarel Zak2013-05-131-0/+131
Signed-off-by: Karel Zak <kzak@redhat.com>