[libvirt] [PATCH tck 2/5] nwfilter/050-apply-verify-host.t: Fix typo, cleanup filter

Mike Latimer mlatimer at suse.com
Mon Jan 26 22:06:50 UTC 2015


If nwfilter/050-apply-verify-host.t fails to start a test VM, a typo
causes the word 'Domain' to be executed as a command after undefining
the VM:

  ./nwfilter2vmtest.sh: line 425: Domain: command not found

Also, if either one of the test VM fails to be created, the test
filter should be deleted before exiting the test.


---
 scripts/nwfilter/nwfilter2vmtest.sh | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/scripts/nwfilter/nwfilter2vmtest.sh b/scripts/nwfilter/nwfilter2vmtest.sh
index ca2abbb..4fae831 100644
--- a/scripts/nwfilter/nwfilter2vmtest.sh
+++ b/scripts/nwfilter/nwfilter2vmtest.sh
@@ -429,7 +429,7 @@ EOF
       echo "Press enter."
       read enter
     fi
-    $(${VIRSH} undefine ${vmname})
+    ${VIRSH} undefine ${vmname}
     return 1
   fi
 
@@ -649,6 +649,7 @@ main() {
   createVM "${vm1}" "tck-testcase" "10.2.2.2" "52:54:0:0:0:1" "${flags}"
   if [ $? -ne 0 ]; then
   	echo "Could not create VM ${vm1}. Exiting."
+  	deleteTestFilter "${flags}"
   	exit 1
   fi
 
@@ -657,6 +658,7 @@ main() {
   if [ $? -ne 0 ]; then
   	echo "Could not create VM ${vm2}. Exiting."
   	destroyVM "${vm1}" "${flags}"
+  	deleteTestFilter "${flags}"
   	exit 1
   fi
 
-- 
1.8.4.5




More information about the libvir-list mailing list