All of lore.kernel.org
 help / color / mirror / Atom feed
From: mornfall@sourceware.org <mornfall@sourceware.org>
To: lvm-devel@redhat.com
Subject: LVM2/test lvm-utils.sh
Date: 10 Jan 2009 12:19:41 -0000	[thread overview]
Message-ID: <20090110121941.19060.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	mornfall at sourceware.org	2009-01-10 12:19:41

Modified files:
	test           : lvm-utils.sh 

Log message:
	Fix some checks in lvm-utils.sh. Note that "$(test ...)" is always empty, since
	"test" never prints anything. Therefore, "return $(test ...)" is equivalent to
	just "return;" which means success in sh (same as return 0). We can however,
	thanks to set -e, use "test foo = bar" as an assertion.
	
	PS: test a == b is invalid syntax. It is either = or -eq: = is textual and -eq
	is numeric comparison.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/lvm-utils.sh.diff?cvsroot=lvm2&r1=1.16&r2=1.17

--- LVM2/test/lvm-utils.sh	2008/12/10 16:15:41	1.16
+++ LVM2/test/lvm-utils.sh	2009/01/10 12:19:41	1.17
@@ -64,7 +64,7 @@
 then
   echo "compare_vg_field_ VG1: $val1 VG2: $val2"
 fi
-  return $(test $val1 == $val2 )
+  test $val1 = $val2
 }
 
 check_vg_field_()
@@ -79,7 +79,7 @@
 then
   echo "check_vg_field_ VG=$vg, field=$field, actual=$actual, expected=$expected"
 fi
-  return $(test $actual == $expected)
+  test $actual = $expected
 }
 
 check_pv_field_()
@@ -94,7 +94,7 @@
 then
   echo "check_pv_field_ PV=$pv, field=$field, actual=$actual, expected=$expected"
 fi
-  return $(test $actual == $expected)
+    test $actual = $expected
 }
 
 check_lv_field_()
@@ -109,7 +109,7 @@
 then
   echo "check_lv_field_ LV=$lv, field=$field, actual=$actual, expected=$expected"
 fi
-  return $(test $actual == $expected)
+  test $actual = $expected
 }
 
 vg_validate_pvlv_counts_()



             reply	other threads:[~2009-01-10 12:19 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-10 12:19 mornfall [this message]
  -- strict thread matches above, loose matches on Subject: below --
2010-03-26 13:21 LVM2/test lvm-utils.sh zkabelac
2010-03-25 12:17 agk
2010-03-25 11:57 agk
2008-08-21 14:33 wysochanski
2008-06-25 16:51 wysochanski
2008-06-06 13:48 meyering
2008-04-23 13:02 wysochanski
2008-03-28 18:02 wysochanski

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=20090110121941.19060.qmail@sourceware.org \
    --to=mornfall@sourceware.org \
    --cc=lvm-devel@redhat.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.