Remove broken pipe warning logs from ovsdb-server.log for ovn tests
[cascardo/ovs.git] / tests / ovn-nbctl.at
index d55732f..efad8a2 100644 (file)
@@ -16,7 +16,15 @@ m4_define([OVN_NBCTL_TEST_START],
 
 # OVN_NBCTL_TEST_STOP
 m4_define([OVN_NBCTL_TEST_STOP],
-  [AT_CHECK([check_logs $1])
+  [# removes all 'Broken pipe' warning logs from ovsdb-server.log.  this is in
+   # that *ctl command (e.g. ovn-nbctl) exits right after committing the change
+   # to database.  however, in reaction, some daemon (e.g. ovn-controller-vtep)
+   # may immediately update the database.  this later update may cause database
+   # sending update back to *ctl command if *ctl has not proceeded to exit yet.
+   # and if *ctl command exits before database calling send, the send from
+   # database will fail with 'Broken pipe' error.
+   AT_CHECK([check_logs "$1
+/Broken pipe/d"])
    AT_CHECK([ovs-appctl -t ovsdb-server exit])])
 
 
@@ -69,22 +77,22 @@ AT_CLEANUP
 
 dnl ---------------------------------------------------------------------
 
-AT_SETUP([ovn-nbctl - macs])
+AT_SETUP([ovn-nbctl - addresses])
 OVN_NBCTL_TEST_START
 
 AT_CHECK([ovn-nbctl lswitch-add ls0])
 AT_CHECK([ovn-nbctl lport-add ls0 lp0])
-AT_CHECK([ovn-nbctl lport-get-macs lp0], [0], [dnl
+AT_CHECK([ovn-nbctl lport-get-addresses lp0], [0], [dnl
 ])
 
-AT_CHECK([ovn-nbctl lport-set-macs lp0 00:11:22:33:44:55 unknown])
-AT_CHECK([ovn-nbctl lport-get-macs lp0], [0], [dnl
+AT_CHECK([ovn-nbctl lport-set-addresses lp0 00:11:22:33:44:55 unknown])
+AT_CHECK([ovn-nbctl lport-get-addresses lp0], [0], [dnl
 00:11:22:33:44:55
 unknown
 ])
 
-AT_CHECK([ovn-nbctl lport-set-macs lp0])
-AT_CHECK([ovn-nbctl lport-get-macs lp0], [0], [dnl
+AT_CHECK([ovn-nbctl lport-set-addresses lp0])
+AT_CHECK([ovn-nbctl lport-get-addresses lp0], [0], [dnl
 ])
 
 OVN_NBCTL_TEST_STOP
@@ -97,7 +105,7 @@ OVN_NBCTL_TEST_START
 
 AT_CHECK([ovn-nbctl lswitch-add ls0])
 AT_CHECK([ovn-nbctl lport-add ls0 lp0])
-AT_CHECK([ovn-nbctl lport-get-macs lp0], [0], [dnl
+AT_CHECK([ovn-nbctl lport-get-addresses lp0], [0], [dnl
 ])
 
 AT_CHECK([ovn-nbctl lport-set-port-security lp0 aa:bb:cc:dd:ee:ff 00:11:22:33:44:55])