diff mbox series

[ovs-dev] ovn-macros: Make sure stopped daemons continue before the test ends.

Message ID 20231207131154.3549208-1-dceara@redhat.com
State Accepted
Headers show
Series [ovs-dev] ovn-macros: Make sure stopped daemons continue before the test ends. | expand

Checks

Context Check Description
ovsrobot/apply-robot success apply and check: success
ovsrobot/github-robot-_Build_and_Test success github build: passed
ovsrobot/github-robot-_ovn-kubernetes success github build: passed

Commit Message

Dumitru Ceara Dec. 7, 2023, 1:11 p.m. UTC
In case there's a test failure while daemons are stopped ensure that we
send a SIGCONT on exit so that they properly clean up.

30952c248d4f ("binding: fixed ovn-installed not properly removed (recomputes)")
Fixes: 0794a6edf40b ("qos: fix potential double deletion of ovs idl row")
Fixes: feb918434172 ("northd: Skip transient IDL records.")
Suggested-by: Ilya Maximets <i.maximets@ovn.org>
Signed-off-by: Dumitru Ceara <dceara@redhat.com>
---
 tests/ovn-macros.at | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Xavier Simonart Dec. 7, 2023, 1:40 p.m. UTC | #1
Hi Dumitru

Thanks for the patch.

On Thu, Dec 7, 2023 at 2:12 PM Dumitru Ceara <dceara@redhat.com> wrote:

> In case there's a test failure while daemons are stopped ensure that we
> send a SIGCONT on exit so that they properly clean up.
>
> 30952c248d4f ("binding: fixed ovn-installed not properly removed
> (recomputes)")
>
Missing "Fixes: "

> Fixes: 0794a6edf40b ("qos: fix potential double deletion of ovs idl row")
> Fixes: feb918434172 ("northd: Skip transient IDL records.")
> Suggested-by: Ilya Maximets <i.maximets@ovn.org>
> Signed-off-by: Dumitru Ceara <dceara@redhat.com>
> ---
>  tests/ovn-macros.at | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/tests/ovn-macros.at b/tests/ovn-macros.at
> index 94bdaff2c4..dd5df40b35 100644
> --- a/tests/ovn-macros.at
> +++ b/tests/ovn-macros.at
> @@ -894,6 +894,7 @@ start_scapy_server() {
>  sleep_northd() {
>    echo Northd going to sleep
>    AT_CHECK([kill -STOP $(cat northd/ovn-northd.pid)])
> +  on_exit "kill -CONT $(cat northd/ovn-northd.pid)"
>  }
>
>  wake_up_northd() {
> @@ -904,6 +905,7 @@ wake_up_northd() {
>  sleep_sb() {
>    echo SB going to sleep
>    AT_CHECK([kill -STOP $(cat ovn-sb/ovsdb-server.pid)])
> +  on_exit "kill -CONT $(cat ovn-sb/ovsdb-server.pid)"
>  }
>  wake_up_sb() {
>    echo SB waking up
> @@ -927,6 +929,7 @@ sleep_ovs() {
>    hv=$1
>    echo ovs $hv going to sleep
>    AT_CHECK([kill -STOP $(cat $hv/ovs-vswitchd.pid)])
> +  on_exit "kill -CONT $(cat $hv/ovs-vswitchd.pid)"
>  }
>
>  wake_up_ovs() {
> @@ -938,6 +941,7 @@ wake_up_ovs() {
>  sleep_ovsdb() {
>    echo OVSDB $1 going to sleep
>    AT_CHECK([kill -STOP $(cat $1/ovsdb-server.pid)])
> +  on_exit "kill -CONT $(cat $1/ovsdb-server.pid)"
>  }
>  wake_up_ovsdb() {
>    echo OVSDB $1 waking up
> --
> 2.39.3
>
> Except for the missing "Fixes" in the commit message, it looks good to me.
Acked-by: Xavier Simonart <xsimonar@redhat.com>

Thanks
Xavier
Dumitru Ceara Dec. 8, 2023, 11:22 a.m. UTC | #2
On 12/7/23 14:40, Xavier Simonart wrote:
> Hi Dumitru
> 
> Thanks for the patch.
> 
> On Thu, Dec 7, 2023 at 2:12 PM Dumitru Ceara <dceara@redhat.com> wrote:
> 
>> In case there's a test failure while daemons are stopped ensure that we
>> send a SIGCONT on exit so that they properly clean up.
>>
>> 30952c248d4f ("binding: fixed ovn-installed not properly removed
>> (recomputes)")
>>
> Missing "Fixes: "
> 
>> Fixes: 0794a6edf40b ("qos: fix potential double deletion of ovs idl row")
>> Fixes: feb918434172 ("northd: Skip transient IDL records.")
>> Suggested-by: Ilya Maximets <i.maximets@ovn.org>
>> Signed-off-by: Dumitru Ceara <dceara@redhat.com>
>> ---
>>  tests/ovn-macros.at | 4 ++++
>>  1 file changed, 4 insertions(+)
>>
>> diff --git a/tests/ovn-macros.at b/tests/ovn-macros.at
>> index 94bdaff2c4..dd5df40b35 100644
>> --- a/tests/ovn-macros.at
>> +++ b/tests/ovn-macros.at
>> @@ -894,6 +894,7 @@ start_scapy_server() {
>>  sleep_northd() {
>>    echo Northd going to sleep
>>    AT_CHECK([kill -STOP $(cat northd/ovn-northd.pid)])
>> +  on_exit "kill -CONT $(cat northd/ovn-northd.pid)"
>>  }
>>
>>  wake_up_northd() {
>> @@ -904,6 +905,7 @@ wake_up_northd() {
>>  sleep_sb() {
>>    echo SB going to sleep
>>    AT_CHECK([kill -STOP $(cat ovn-sb/ovsdb-server.pid)])
>> +  on_exit "kill -CONT $(cat ovn-sb/ovsdb-server.pid)"
>>  }
>>  wake_up_sb() {
>>    echo SB waking up
>> @@ -927,6 +929,7 @@ sleep_ovs() {
>>    hv=$1
>>    echo ovs $hv going to sleep
>>    AT_CHECK([kill -STOP $(cat $hv/ovs-vswitchd.pid)])
>> +  on_exit "kill -CONT $(cat $hv/ovs-vswitchd.pid)"
>>  }
>>
>>  wake_up_ovs() {
>> @@ -938,6 +941,7 @@ wake_up_ovs() {
>>  sleep_ovsdb() {
>>    echo OVSDB $1 going to sleep
>>    AT_CHECK([kill -STOP $(cat $1/ovsdb-server.pid)])
>> +  on_exit "kill -CONT $(cat $1/ovsdb-server.pid)"
>>  }
>>  wake_up_ovsdb() {
>>    echo OVSDB $1 waking up
>> --
>> 2.39.3
>>
>> Except for the missing "Fixes" in the commit message, it looks good to me.
> Acked-by: Xavier Simonart <xsimonar@redhat.com>
> 

Thanks for the review, Xavier!  I added the missing "Fixes" and pushed
this to main and stable branches down to 22.09.

Regards,
Dumitru
diff mbox series

Patch

diff --git a/tests/ovn-macros.at b/tests/ovn-macros.at
index 94bdaff2c4..dd5df40b35 100644
--- a/tests/ovn-macros.at
+++ b/tests/ovn-macros.at
@@ -894,6 +894,7 @@  start_scapy_server() {
 sleep_northd() {
   echo Northd going to sleep
   AT_CHECK([kill -STOP $(cat northd/ovn-northd.pid)])
+  on_exit "kill -CONT $(cat northd/ovn-northd.pid)"
 }
 
 wake_up_northd() {
@@ -904,6 +905,7 @@  wake_up_northd() {
 sleep_sb() {
   echo SB going to sleep
   AT_CHECK([kill -STOP $(cat ovn-sb/ovsdb-server.pid)])
+  on_exit "kill -CONT $(cat ovn-sb/ovsdb-server.pid)"
 }
 wake_up_sb() {
   echo SB waking up
@@ -927,6 +929,7 @@  sleep_ovs() {
   hv=$1
   echo ovs $hv going to sleep
   AT_CHECK([kill -STOP $(cat $hv/ovs-vswitchd.pid)])
+  on_exit "kill -CONT $(cat $hv/ovs-vswitchd.pid)"
 }
 
 wake_up_ovs() {
@@ -938,6 +941,7 @@  wake_up_ovs() {
 sleep_ovsdb() {
   echo OVSDB $1 going to sleep
   AT_CHECK([kill -STOP $(cat $1/ovsdb-server.pid)])
+  on_exit "kill -CONT $(cat $1/ovsdb-server.pid)"
 }
 wake_up_ovsdb() {
   echo OVSDB $1 waking up