mirror of
git://sourceware.org/git/lvm2.git
synced 2025-03-24 14:50:34 +03:00
In aux, exit 200 no longer works as skip -- replace with real skip call.
This commit is contained in:
parent
f4d63e9e58
commit
16af1b083b
@ -10,6 +10,11 @@
|
||||
|
||||
. lib/utils
|
||||
|
||||
skip() {
|
||||
touch SKIP_THIS_TEST
|
||||
exit 1
|
||||
}
|
||||
|
||||
prepare_clvmd() {
|
||||
if test -z "$LVM_TEST_LOCKING" || test "$LVM_TEST_LOCKING" -ne 3 ; then
|
||||
return 0 # not needed
|
||||
@ -17,22 +22,21 @@ prepare_clvmd() {
|
||||
|
||||
if pgrep clvmd ; then
|
||||
echo "Cannot use fake cluster locking with real clvmd ($(pgrep clvmd)) running."
|
||||
touch SKIP_THIS_TEST
|
||||
exit 1
|
||||
skip
|
||||
fi
|
||||
|
||||
# skip if we don't have our own clvmd...
|
||||
(which clvmd | grep $abs_builddir) || exit 200
|
||||
(which clvmd | grep $abs_builddir) || skip
|
||||
|
||||
# skip if we singlenode is not compiled in
|
||||
(clvmd --help 2>&1 | grep "Available cluster managers" | grep singlenode) || exit 200
|
||||
(clvmd --help 2>&1 | grep "Available cluster managers" | grep singlenode) || skip
|
||||
|
||||
clvmd -Isinglenode -d 1 &
|
||||
LOCAL_CLVMD="$!"
|
||||
|
||||
# check that it is really running now
|
||||
sleep .1
|
||||
ps $LOCAL_CLVMD || exit 200
|
||||
ps $LOCAL_CLVMD || skip
|
||||
}
|
||||
|
||||
prepare_dmeventd() {
|
||||
@ -175,16 +179,16 @@ prepare_scsi_debug_dev()
|
||||
test -n "$DM_DEV_DIR"
|
||||
|
||||
# Skip test if awk isn't available (required for get_sd_devs_)
|
||||
which awk || exit 200
|
||||
which awk || skip
|
||||
|
||||
# Skip test if scsi_debug module is unavailable or is already in use
|
||||
modprobe --dry-run scsi_debug || exit 200
|
||||
lsmod | grep -q scsi_debug && exit 200
|
||||
modprobe --dry-run scsi_debug || skip
|
||||
lsmod | grep -q scsi_debug && skip
|
||||
|
||||
# Create the scsi_debug device and determine the new scsi device's name
|
||||
# NOTE: it will _never_ make sense to pass num_tgts param;
|
||||
# last param wins.. so num_tgts=1 is imposed
|
||||
modprobe scsi_debug dev_size_mb=$DEV_SIZE $SCSI_DEBUG_PARAMS num_tgts=1 || exit 200
|
||||
modprobe scsi_debug dev_size_mb=$DEV_SIZE $SCSI_DEBUG_PARAMS num_tgts=1 || skip
|
||||
sleep 2 # allow for async Linux SCSI device registration
|
||||
|
||||
local DEBUG_DEV=/dev/$(grep -H scsi_debug /sys/block/*/device/model | cut -f4 -d /)
|
||||
@ -353,15 +357,12 @@ EOF
|
||||
apitest() {
|
||||
t=$1
|
||||
shift
|
||||
test -x $abs_top_builddir/test/api/$t.t || {
|
||||
touch SKIP_THIS_TEST
|
||||
exit 200
|
||||
}
|
||||
test -x $abs_top_builddir/test/api/$t.t || skip
|
||||
$abs_top_builddir/test/api/$t.t "$@"
|
||||
}
|
||||
|
||||
api() {
|
||||
test -x $abs_top_builddir/test/api/wrapper || exit 200
|
||||
test -x $abs_top_builddir/test/api/wrapper || skip
|
||||
$abs_top_builddir/test/api/wrapper "$@"
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user