I pushed this change to main and all branches from 22.03 up to 23.03.

On 2/10/23 02:58, Ales Musil wrote:
On Fri, Dec 2, 2022 at 2:53 PM Xavier Simonart <xsimo...@redhat.com> wrote:

When running unit tests on a s390x VM with a x86 host,
many tests fail due to the very slow speed of the system.

Signed-off-by: Xavier Simonart <xsimo...@redhat.com>
---
  tests/atlocal.in           |  3 +++
  tests/network-functions.at | 18 ++++++++++++------
  tests/ovn.at               |  7 ++++++-
  3 files changed, 21 insertions(+), 7 deletions(-)

diff --git a/tests/atlocal.in b/tests/atlocal.in
index 0b9a31276..02e9ce9bb 100644
--- a/tests/atlocal.in
+++ b/tests/atlocal.in
@@ -166,6 +166,9 @@ fi
  # Set HAVE_TCPDUMP
  find_command tcpdump

+# Set HAVE_XXD
+find_command xxd
+
  # Set HAVE_LFTP
  find_command lftp

diff --git a/tests/network-functions.at b/tests/network-functions.at
index c583bc31e..a2481c55c 100644
--- a/tests/network-functions.at
+++ b/tests/network-functions.at
@@ -128,12 +128,18 @@ OVS_START_SHELL_HELPERS
  # hex_to_binary HEXDIGITS
  #
  # Converts the pairs of HEXDIGITS into bytes and prints them on stdout.
-hex_to_binary() {
-    printf $(while test -n "$1"; do
-                 printf '\\%03o' 0x$(expr "$1" : '\(..\)')
-                 set -- "${1##??}"
-             done)
-}
+if test x$HAVE_XXD = xno; then
+    hex_to_binary() {
+        printf $(while test -n "$1"; do
+                     printf '\\%03o' 0x$(expr "$1" : '\(..\)')
+                     set -- "${1##??}"
+                 done)
+    }
+else
+    hex_to_binary() {
+        echo $1 | xxd -r -p
+    }
+fi

  # tcpdump_hex TITLE PACKET
  #
diff --git a/tests/ovn.at b/tests/ovn.at
index dcc74649e..11f4cf2e6 100644
--- a/tests/ovn.at
+++ b/tests/ovn.at
@@ -4420,7 +4420,12 @@ for i in 1 2 3; do
  done

  # Gracefully terminate daemons
-OVN_CLEANUP([hv1],[hv2],[vtep])
+
+OVN_CLEANUP_SBOX([hv1])
+OVN_CLEANUP_SBOX([hv2])
+OVS_WAIT_UNTIL([test `as vtep ovs-vsctl list-ports vtep_bfd | wc -l` -eq
0])
+OVN_CLEANUP([vtep])
+
  OVN_CLEANUP_VSWITCH([hv3])

  AT_CLEANUP
--
2.31.1

_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Looks good to me, thanks.

Acked-by: Ales Musil <amu...@redhat.com>


_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to