public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
From: mornfall@sourceware.org
To: lvm-devel@redhat.com, lvm2-cvs@sourceware.org
Subject: LVM2/test/lib aux.sh
Date: Fri, 07 Jan 2011 13:03:00 -0000	[thread overview]
Message-ID: <20110107130305.23157.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	mornfall@sourceware.org	2011-01-07 13:03:04

Modified files:
	test/lib       : aux.sh 

Log message:
	In aux, exit 200 no longer works as skip -- replace with real skip call.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/lib/aux.sh.diff?cvsroot=lvm2&r1=1.2&r2=1.3

--- LVM2/test/lib/aux.sh	2011/01/05 00:25:07	1.2
+++ LVM2/test/lib/aux.sh	2011/01/07 13:03:04	1.3
@@ -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 @@
 
 	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 @@
     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 @@
 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 "$@"
 }
 


             reply	other threads:[~2011-01-07 13:03 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-07 13:03 mornfall [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-03-23  9:41 zkabelac
2012-03-16 19:08 zkabelac
2012-03-16 13:44 zkabelac
2012-03-16 12:57 zkabelac
2012-03-16 12:56 zkabelac
2012-03-06  2:54 agk
2012-01-26 18:25 zkabelac
2011-12-12  0:01 mornfall
2011-11-10 12:44 zkabelac
2011-10-23 15:43 zkabelac
2011-10-23 15:40 zkabelac
2011-09-24 21:15 zkabelac
2011-07-08 10:05 zkabelac
2011-06-30  9:17 agk
2011-06-30  9:08 zkabelac
2011-06-30  8:50 mbroz
2011-06-30  1:17 agk
2011-06-29 18:14 agk
2011-06-29 17:37 agk
2011-06-29 17:33 agk
2011-06-29 12:37 agk
2011-06-29 12:33 agk
2011-06-28  0:38 agk
2011-06-28  0:11 agk
2011-03-04 14:19 mbroz
2011-03-01 23:44 mbroz
2011-03-01 22:28 mbroz
2011-01-28 16:10 zkabelac
2011-01-13 14:57 zkabelac
2011-01-12 16:07 mornfall
2011-01-07 13:04 mornfall
2011-01-05  0:25 mornfall

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110107130305.23157.qmail@sourceware.org \
    --to=mornfall@sourceware.org \
    --cc=lvm-devel@redhat.com \
    --cc=lvm2-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).