public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
* LVM2/test lvm-utils.sh
@ 2008-08-21 14:33 wysochanski
  0 siblings, 0 replies; 9+ messages in thread
From: wysochanski @ 2008-08-21 14:33 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	wysochanski@sourceware.org	2008-08-21 14:33:48

Modified files:
	test           : lvm-utils.sh 

Log message:
	Fix symbolic link creation in test infrastructure.
	
	Original code would create "*.so" symbolic links if there were no actual
	files ending in "so".  The second iteration would then cause an error
	in the test logs.

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

--- LVM2/test/lvm-utils.sh	2008/08/05 11:39:54	1.14
+++ LVM2/test/lvm-utils.sh	2008/08/21 14:33:48	1.15
@@ -152,8 +152,16 @@
   for i in 0 1 2 3 4 5 6 7; do
     mknod $G_root_/dev/loop$i b 7 $i
   done
-  ln -s $abs_top_builddir/dmeventd/mirror/*.so $G_root_/lib
-  ln -s $abs_top_builddir/dmeventd/snapshot/*.so $G_root_/lib
+  for i in $abs_top_builddir/dmeventd/mirror/*.so $abs_top_builddir/dmeventd/snapshot/*.so
+  do
+    # NOTE: This check is necessary because the loop above will give us the value
+    # "$abs_top_builddir/dmeventd/mirror/*.so" if no files ending in 'so' exist.
+    # This is the best way I could quickly determine to skip over this bogus value.
+    if [ -f $i ]; then
+      echo Setting up symlink from $i to $G_root_/lib
+      ln -s $i $G_root_/lib
+    fi
+  done
   cat > $G_root_/etc/lvm.conf <<-EOF
   devices {
     dir = "$G_dev_"


^ permalink raw reply	[flat|nested] 9+ messages in thread

* LVM2/test lvm-utils.sh
@ 2010-03-26 13:21 zkabelac
  0 siblings, 0 replies; 9+ messages in thread
From: zkabelac @ 2010-03-26 13:21 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	zkabelac@sourceware.org	2010-03-26 13:21:28

Modified files:
	test           : lvm-utils.sh 

Log message:
	Updates .so links for plugins

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

--- LVM2/test/lvm-utils.sh	2010/03/25 12:17:10	1.22
+++ LVM2/test/lvm-utils.sh	2010/03/26 13:21:28	1.23
@@ -196,10 +196,10 @@
   for i in 0 1 2 3 4 5 6 7; do
     mknod $G_root_/dev/loop$i b 7 $i
   done
-  for i in $abs_top_builddir/dmeventd/mirror/*.so $abs_top_builddir/dmeventd/snapshot/*.so
+  for i in $abs_top_builddir/daemons/dmeventd/plugins/*/*.so
   do
     # NOTE: This check is necessary because the loop above will give us the value
-    # "$abs_top_builddir/dmeventd/mirror/*.so" if no files ending in 'so' exist.
+    # "$abs_top_builddir/daemons/dmeventd/plugins/*/*.so" if no files ending in 'so' exist.
     # This is the best way I could quickly determine to skip over this bogus value.
     if [ -f $i ]; then
       echo Setting up symlink from $i to $G_root_/lib


^ permalink raw reply	[flat|nested] 9+ messages in thread

* LVM2/test lvm-utils.sh
@ 2010-03-25 12:17 agk
  0 siblings, 0 replies; 9+ messages in thread
From: agk @ 2010-03-25 12:17 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	agk@sourceware.org	2010-03-25 12:17:10

Modified files:
	test           : lvm-utils.sh 

Log message:
	more diagnostics

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

--- LVM2/test/lvm-utils.sh	2010/03/25 11:57:16	1.21
+++ LVM2/test/lvm-utils.sh	2010/03/25 12:17:10	1.22
@@ -161,7 +161,7 @@
 	local num_lvs=$3
 	local num_snaps=$4
 
-	lvs -a -odevices $local_vg
+	lvs -a -o+devices $local_vg
 
 	check_vg_field_ $local_vg pv_count $num_pvs &&
 	check_vg_field_ $local_vg lv_count $num_lvs &&


^ permalink raw reply	[flat|nested] 9+ messages in thread

* LVM2/test lvm-utils.sh
@ 2010-03-25 11:57 agk
  0 siblings, 0 replies; 9+ messages in thread
From: agk @ 2010-03-25 11:57 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	agk@sourceware.org	2010-03-25 11:57:16

Modified files:
	test           : lvm-utils.sh 

Log message:
	add debug mesg

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

--- LVM2/test/lvm-utils.sh	2010/02/16 17:48:46	1.20
+++ LVM2/test/lvm-utils.sh	2010/03/25 11:57:16	1.21
@@ -161,6 +161,8 @@
 	local num_lvs=$3
 	local num_snaps=$4
 
+	lvs -a -odevices $local_vg
+
 	check_vg_field_ $local_vg pv_count $num_pvs &&
 	check_vg_field_ $local_vg lv_count $num_lvs &&
 	check_vg_field_ $local_vg snap_count $num_snaps


^ permalink raw reply	[flat|nested] 9+ messages in thread

* LVM2/test lvm-utils.sh
@ 2009-01-10 12:19 mornfall
  0 siblings, 0 replies; 9+ messages in thread
From: mornfall @ 2009-01-10 12:19 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	mornfall@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_()


^ permalink raw reply	[flat|nested] 9+ messages in thread

* LVM2/test lvm-utils.sh
@ 2008-06-25 16:51 wysochanski
  0 siblings, 0 replies; 9+ messages in thread
From: wysochanski @ 2008-06-25 16:51 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	wysochanski@sourceware.org	2008-06-25 16:51:26

Modified files:
	test           : lvm-utils.sh 

Log message:
	Test script cleanup.

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

--- LVM2/test/lvm-utils.sh	2008/06/06 13:48:57	1.12
+++ LVM2/test/lvm-utils.sh	2008/06/25 16:51:26	1.13
@@ -52,38 +52,64 @@
 
 compare_vg_field_()
 {
+    local vg1=$1;
+    local vg2=$2;
+    local field=$3;
+    local val1;
+    local val2;
+
+    val1=$(vgs --noheadings -o $field $vg1)
+    val2=$(vgs --noheadings -o $field $vg2)
 if test "$verbose" = "t"
 then
-  echo "compare_vg_field_ VG1: `vgs --noheadings -o $3 $1` VG2: `vgs --noheadings -o $3 $2`"
+  echo "compare_vg_field_ VG1: $val1 VG2: $val2"
 fi
-  return $(test $(vgs --noheadings -o $3 $1) == $(vgs --noheadings -o $3 $2) )
+  return $(test $val1 == $val2 )
 }
 
 check_vg_field_()
 {
+    local vg=$1;
+    local field=$2;
+    local expected=$3;
+    local actual;
+
+    actual=$(vgs --noheadings -o $field $vg)
 if test "$verbose" = "t"
 then
-  echo "check_vg_field_ VG=$1, field=$2, actual=`vgs --noheadings -o $2 $1`, expected=$3"
+  echo "check_vg_field_ VG=$vg, field=$field, actual=$actual, expected=$expected"
 fi
-  return $(test $(vgs --noheadings -o $2 $1) == $3)
+  return $(test $actual == $expected)
 }
 
 check_pv_field_()
 {
+    local pv=$1;
+    local field=$2;
+    local expected=$3;
+    local actual;
+
+    actual=$(pvs --noheadings -o $field $pv)
 if test "$verbose" = "t"
 then
-  echo "check_pv_field_ PV=$1, field=$2, actual=`pvs --noheadings -o $2 $1`, expected=$3"
+  echo "check_pv_field_ PV=$pv, field=$field, actual=$actual, expected=$expected"
 fi
-  return $(test $(pvs --noheadings -o $2 $1) == $3)
+  return $(test $actual == $expected)
 }
 
 check_lv_field_()
 {
+    local lv=$1;
+    local field=$2;
+    local expected=$3;
+    local actual;
+
+    actual=$(lvs --noheadings -o $field $lv)
 if test "$verbose" = "t"
 then
-  echo "check_lv_field_ LV=$1, field=$2, actual=`lvs --noheadings -o $2 $1`, expected=$3"
+  echo "check_lv_field_ LV=$lv, field=$field, actual=$actual, expected=$expected"
 fi
-  return $(test $(lvs --noheadings -o $2 $1) == $3)
+  return $(test $actual == $expected)
 }
 
 vg_validate_pvlv_counts_()


^ permalink raw reply	[flat|nested] 9+ messages in thread

* LVM2/test lvm-utils.sh
@ 2008-06-06 13:48 meyering
  0 siblings, 0 replies; 9+ messages in thread
From: meyering @ 2008-06-06 13:48 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	meyering@sourceware.org	2008-06-06 13:48:58

Modified files:
	test           : lvm-utils.sh 

Log message:
	* lvm-utils.sh (init_root_dir_): Correct a diagnostic.
	
	Author: Jim Meyering <meyering@redhat.com>

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

--- LVM2/test/lvm-utils.sh	2008/04/23 13:02:03	1.11
+++ LVM2/test/lvm-utils.sh	2008/06/06 13:48:57	1.12
@@ -1,7 +1,7 @@
 # Put lvm-related utilities here.
 # This file is sourced from test-lib.sh.
 
-# Copyright (C) 2007 Red Hat, Inc. All rights reserved.
+# Copyright (C) 2007, 2008 Red Hat, Inc. All rights reserved.
 #
 # This copyrighted material is made available to anyone wishing to use,
 # modify, copy, or redistribute it subject to the terms and conditions
@@ -112,7 +112,7 @@
 {
   test -n "$test_dir_rand_" \
     || error "Internal error: called init_root_dir_ before" \
-      " defining $test_dir_rand_"
+      "defining \$test_dir_rand_"
 
   # Define these two globals.
   G_root_=$test_dir_rand_/root


^ permalink raw reply	[flat|nested] 9+ messages in thread

* LVM2/test lvm-utils.sh
@ 2008-04-23 13:02 wysochanski
  0 siblings, 0 replies; 9+ messages in thread
From: wysochanski @ 2008-04-23 13:02 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	wysochanski@sourceware.org	2008-04-23 13:02:03

Modified files:
	test           : lvm-utils.sh 

Log message:
	Update test function _check_{vg|lv|pv}_field to aid in test debug.
	
	Author: Dave Wysochanski <dwysocha@redhat.com>

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

--- LVM2/test/lvm-utils.sh	2008/04/11 14:06:16	1.10
+++ LVM2/test/lvm-utils.sh	2008/04/23 13:02:03	1.11
@@ -63,7 +63,7 @@
 {
 if test "$verbose" = "t"
 then
-  echo "check_vg_field_ VG: $1 actual: `vgs --noheadings -o $2 $1` expected $3"
+  echo "check_vg_field_ VG=$1, field=$2, actual=`vgs --noheadings -o $2 $1`, expected=$3"
 fi
   return $(test $(vgs --noheadings -o $2 $1) == $3)
 }
@@ -72,7 +72,7 @@
 {
 if test "$verbose" = "t"
 then
-  echo "check_pv_field_ PV: $1 actual: `pvs --noheadings -o $2 $1` expected $3"
+  echo "check_pv_field_ PV=$1, field=$2, actual=`pvs --noheadings -o $2 $1`, expected=$3"
 fi
   return $(test $(pvs --noheadings -o $2 $1) == $3)
 }
@@ -81,7 +81,7 @@
 {
 if test "$verbose" = "t"
 then
-  echo "check_lv_field_ LV: $1 actual: `lvs --noheadings -o $2 $1` expected $3"
+  echo "check_lv_field_ LV=$1, field=$2, actual=`lvs --noheadings -o $2 $1`, expected=$3"
 fi
   return $(test $(lvs --noheadings -o $2 $1) == $3)
 }


^ permalink raw reply	[flat|nested] 9+ messages in thread

* LVM2/test lvm-utils.sh
@ 2008-03-28 18:02 wysochanski
  0 siblings, 0 replies; 9+ messages in thread
From: wysochanski @ 2008-03-28 18:02 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	wysochanski@sourceware.org	2008-03-28 18:02:23

Modified files:
	test           : lvm-utils.sh 

Log message:
	Enhance test debugging by updating verbose mode of check_*_field_ functions.
	
	Author: Dave Wysochanski <dwysocha@redhat.com>

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

--- LVM2/test/lvm-utils.sh	2008/03/23 15:40:35	1.8
+++ LVM2/test/lvm-utils.sh	2008/03/28 18:02:22	1.9
@@ -63,7 +63,7 @@
 {
 if test "$verbose" = "t"
 then
-  echo "check_vg_field_ actual: `vgs --noheadings -o $2 $1` expected $3"
+  echo "check_vg_field_ VG: $1 actual: `vgs --noheadings -o $2 $1` expected $3"
 fi
   return $(test $(vgs --noheadings -o $2 $1) == $3)
 }
@@ -72,7 +72,7 @@
 {
 if test "$verbose" = "t"
 then
-  echo "check_pv_field_ actual: `pvs --noheadings -o $2 $1` expected $3"
+  echo "check_pv_field_ PV: $1 actual: `pvs --noheadings -o $2 $1` expected $3"
 fi
   return $(test $(pvs --noheadings -o $2 $1) == $3)
 }
@@ -81,7 +81,7 @@
 {
 if test "$verbose" = "t"
 then
-  echo "check_lv_field_ actual: `lvs --noheadings -o $2 $1` expected $3"
+  echo "check_lv_field_ LV: $1 actual: `lvs --noheadings -o $2 $1` expected $3"
 fi
   return $(test $(lvs --noheadings -o $2 $1) == $3)
 }


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2010-03-26 13:21 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-08-21 14:33 LVM2/test lvm-utils.sh wysochanski
  -- strict thread matches above, loose matches on Subject: below --
2010-03-26 13:21 zkabelac
2010-03-25 12:17 agk
2010-03-25 11:57 agk
2009-01-10 12:19 mornfall
2008-06-25 16:51 wysochanski
2008-06-06 13:48 meyering
2008-04-23 13:02 wysochanski
2008-03-28 18:02 wysochanski

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).