From: Karel Zak Date: Wed, 22 Apr 2015 08:03:12 +0000 (+0200) Subject: Merge branch 'tests-refactor-loop-cleanup' of https://github.com/rudimeier/util-linux X-Git-Tag: v2.27-rc1~258 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6f13d7a1b27da596b57dbec57e3f350296bcbc78;p=thirdparty%2Futil-linux.git Merge branch 'tests-refactor-loop-cleanup' of https://github.com/rudimeier/util-linux * 'tests-refactor-loop-cleanup' of https://github.com/rudimeier/util-linux: tests: never use -o pipefail tests: loop tests, don't call ts_die() with DEVICE parameter tests: scsi_debug tests, don't call ts_die() with DEVICE parameter tests: introduce TS_LOOP_DEVS for cleanup tests: introduce ts_cleanup_on_exit() --- 6f13d7a1b27da596b57dbec57e3f350296bcbc78 diff --cc tests/ts/libmount/context index 15693d1c6c,373e1d3d14..9424fef90b --- a/tests/ts/libmount/context +++ b/tests/ts/libmount/context @@@ -69,21 -64,9 +69,21 @@@ ts_log "Do tests... export LIBMOUNT_MTAB=$TS_OUTPUT.mtab > $LIBMOUNT_MTAB +# check local mtab of system mountinfo +function is_mounted { + if [ "$MOUNTINFO_ONLY" = "yes" ]; then + ts_is_mounted "$1" + return $? + fi + grep -q "$1" $LIBMOUNT_MTAB && return 0 + return 1 +} + + udevadm settle - ts_device_has "TYPE" "ext4" $DEVICE || ts_die "Cannot find ext3 on $DEVICE" $DEVICE + ts_device_has "TYPE" "ext4" $DEVICE || ts_die "Cannot find ext3 on $DEVICE" + ts_init_subtest "mount-by-devname" mkdir -p $MOUNTPOINT &> /dev/null ts_valgrind $TESTPROG --mount $DEVICE $MOUNTPOINT >> $TS_OUTPUT 2>&1 diff --cc tests/ts/libmount/context-py index f2190ce8a7,94c0d071b4..0f8398f6ef --- a/tests/ts/libmount/context-py +++ b/tests/ts/libmount/context-py @@@ -71,21 -66,9 +71,21 @@@ ts_log "Do tests... export LIBMOUNT_MTAB=$TS_OUTPUT.mtab > $LIBMOUNT_MTAB +# check local mtab of system mountinfo +function is_mounted { + if [ "$MOUNTINFO_ONLY" = "yes" ]; then + ts_is_mounted "$1" + return $? + fi + grep -q "$1" $LIBMOUNT_MTAB && return 0 + return 1 +} + + udevadm settle - ts_device_has "TYPE" "ext4" $DEVICE || ts_die "Cannot find ext3 on $DEVICE" $DEVICE + ts_device_has "TYPE" "ext4" $DEVICE || ts_die "Cannot find ext3 on $DEVICE" + ts_init_subtest "mount-by-devname" mkdir -p $MOUNTPOINT &> /dev/null $PYTHON $TESTPROG --mount $DEVICE $MOUNTPOINT >> $TS_OUTPUT 2>&1