[ovs-dev] [PATCH ovn] tests: Fix PKIDIR checks in AT_SKIP.

Ben Pfaff blp at ovn.org
Tue Jun 1 18:39:23 UTC 2021


In Autotest, [xyz] just expands to xyz.  To get [xyz] in output, we
need [[xyz]] in input.

I spotted this based on "expr" reporting an error in testsuite output.

Signed-off-by: Ben Pfaff <blp at ovn.org>
---
 tests/ovn-controller.at |  4 ++--
 tests/ovn-northd.at     |  4 ++--
 tests/ovn.at            | 12 ++++++------
 3 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/tests/ovn-controller.at b/tests/ovn-controller.at
index cff08cb7b801..72c07b3faf54 100644
--- a/tests/ovn-controller.at
+++ b/tests/ovn-controller.at
@@ -554,8 +554,8 @@ AT_SETUP([ovn-controller - ssl files change when using command line options])
 AT_KEYWORDS([ovn])
 AT_SKIP_IF([test "$HAVE_OPENSSL" = no])
 PKIDIR="$(cd $abs_top_builddir/tests && pwd)"
-AT_SKIP_IF([expr "$PKIDIR" : ".*[ 	'\"
-\\]"])
+AT_SKIP_IF([expr "$PKIDIR" : ".*[[ 	'\"
+\\]]"])
 ovn_start
 
 net_add n1
diff --git a/tests/ovn-northd.at b/tests/ovn-northd.at
index 8bd6e48ec495..818ff7a206b0 100644
--- a/tests/ovn-northd.at
+++ b/tests/ovn-northd.at
@@ -3553,8 +3553,8 @@ OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- northd ssl file change])
 AT_SKIP_IF([test "$HAVE_OPENSSL" = no])
 PKIDIR="$(cd $abs_top_builddir/tests && pwd)"
-AT_SKIP_IF([expr "$PKIDIR" : ".*[ 	'\"
-\\]"])
+AT_SKIP_IF([expr "$PKIDIR" : ".*[[ 	'\"
+\\]]"])
 ovn_start --backup-northd=none
 
 as northd
diff --git a/tests/ovn.at b/tests/ovn.at
index a21dbadace1b..f26894ce4891 100644
--- a/tests/ovn.at
+++ b/tests/ovn.at
@@ -9009,8 +9009,8 @@ AT_CLEANUP
 AT_SETUP([ovn -- read-only sb db:pssl access])
 AT_SKIP_IF([test "$HAVE_OPENSSL" = no])
 PKIDIR="$(cd $abs_top_builddir/tests && pwd)"
-AT_SKIP_IF([expr "$PKIDIR" : ".*[ 	'\"
-\\]"])
+AT_SKIP_IF([expr "$PKIDIR" : ".*[[ 	'\"
+\\]]"])
 
 : > .$1.db.~lock~
 ovsdb-tool create ovn-sb.db "$abs_top_srcdir"/ovn-sb.ovsschema
@@ -9065,8 +9065,8 @@ AT_CLEANUP
 AT_SETUP([ovn -- nb connection/ssl commands])
 AT_SKIP_IF([test "$HAVE_OPENSSL" = no])
 PKIDIR="$(cd $abs_top_builddir/tests && pwd)"
-AT_SKIP_IF([expr "$PKIDIR" : ".*[ 	'\"
-\\]"])
+AT_SKIP_IF([expr "$PKIDIR" : ".*[[ 	'\"
+\\]]"])
 
 : > .$1.db.~lock~
 ovsdb-tool create ovn-nb.db "$abs_top_srcdir"/ovn-nb.ovsschema
@@ -9116,8 +9116,8 @@ AT_CLEANUP
 AT_SETUP([ovn -- sb connection/ssl commands])
 AT_SKIP_IF([test "$HAVE_OPENSSL" = no])
 PKIDIR="$(cd $abs_top_builddir/tests && pwd)"
-AT_SKIP_IF([expr "$PKIDIR" : ".*[ 	'\"
-\\]"])
+AT_SKIP_IF([expr "$PKIDIR" : ".*[[ 	'\"
+\\]]"])
 
 : > .$1.db.~lock~
 ovsdb-tool create ovn-sb.db "$abs_top_srcdir"/ovn-sb.ovsschema
-- 
2.31.1



More information about the dev mailing list