[libvirt] [tck PATCH 2/3] scripts: strip quotes from URI before checking it

Daniel P. Berrangé berrange at redhat.com
Mon May 21 13:01:41 UTC 2018


The config file may have the URI listed with or without quotes, and the
nwfilter tests didn't strip quotes before checking against the
whitelisted URI.

Signed-off-by: Daniel P. Berrangé <berrange at redhat.com>
---
 scripts/nwfilter/nwfilter2vmtest.sh     | 2 +-
 scripts/nwfilter/nwfilter_concurrent.sh | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/nwfilter/nwfilter2vmtest.sh b/scripts/nwfilter/nwfilter2vmtest.sh
index 90a5255..ae28b73 100644
--- a/scripts/nwfilter/nwfilter2vmtest.sh
+++ b/scripts/nwfilter/nwfilter2vmtest.sh
@@ -16,7 +16,7 @@ VIRSH=virsh
 $ {
   x
   p
-}' < "$LIBVIRT_TCK_CONFIG")
+}' < "$LIBVIRT_TCK_CONFIG" | sed -e 's/"//g')
 : "${uri:=qemu:///system}"
 
 LIBVIRT_URI=${uri}
diff --git a/scripts/nwfilter/nwfilter_concurrent.sh b/scripts/nwfilter/nwfilter_concurrent.sh
index 4c9b878..c42dd78 100644
--- a/scripts/nwfilter/nwfilter_concurrent.sh
+++ b/scripts/nwfilter/nwfilter_concurrent.sh
@@ -12,7 +12,7 @@ uri=$(sed -n '/^uri[     ]*=[     ]*/ {
 $ {
   x
   p
-}' < "$LIBVIRT_TCK_CONFIG")
+}' < "$LIBVIRT_TCK_CONFIG" | sed -e 's/"//g')
 : "${uri:=qemu:///system}"
 
 LIBVIRT_URI=${uri}
-- 
2.17.0




More information about the libvir-list mailing list