netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Aaron Conole <aconole@redhat.com>
To: Adrian Moreno <amorenoz@redhat.com>
Cc: netdev@vger.kernel.org,  dev@openvswitch.org,
	 Ilya Maximets <i.maximets@ovn.org>,
	 Eric Dumazet <edumazet@google.com>,
	linux-kselftest@vger.kernel.org,
	 Jakub Kicinski <kuba@kernel.org>,
	Paolo Abeni <pabeni@redhat.com>,  Shuah Khan <shuah@kernel.org>,
	 "David S. Miller" <davem@davemloft.net>
Subject: Re: [ovs-dev] [RFC 3/7] selftests: openvswitch: use non-graceful kills when needed
Date: Wed, 21 Feb 2024 16:11:42 -0500	[thread overview]
Message-ID: <f7ty1bd8qup.fsf@redhat.com> (raw)
In-Reply-To: <4bba621b-3680-4c70-b10c-39787c7c0ce1@redhat.com> (Adrian Moreno's message of "Wed, 21 Feb 2024 18:32:27 +0100")

Adrian Moreno <amorenoz@redhat.com> writes:

> On 2/16/24 16:28, Aaron Conole wrote:
>> Normally a spawned process under OVS is given a SIGTERM when the test
>> ends as part of cleanup.  However, in case the process is still lingering
>> for some reason, we also send a SIGKILL to force it down faster.
>> Signed-off-by: Aaron Conole <aconole@redhat.com>
>> ---
>>   tools/testing/selftests/net/openvswitch/openvswitch.sh | 6 ++++--
>>   1 file changed, 4 insertions(+), 2 deletions(-)
>> diff --git a/tools/testing/selftests/net/openvswitch/openvswitch.sh
>> b/tools/testing/selftests/net/openvswitch/openvswitch.sh
>> index a5dbde482ba4..678a72ad47c1 100755
>> --- a/tools/testing/selftests/net/openvswitch/openvswitch.sh
>> +++ b/tools/testing/selftests/net/openvswitch/openvswitch.sh
>> @@ -91,7 +91,8 @@ ovs_add_if () {
>>   		python3 $ovs_base/ovs-dpctl.py add-if \
>>   		    -u "$2" "$3" >$ovs_dir/$3.out 2>$ovs_dir/$3.err &
>>   		pid=$!
>> -		on_exit "ovs_sbx $1 kill -TERM $pid 2>/dev/null"
>> +		on_exit "ovs_sbx $1 kill --timeout 1000 TERM \
>> +                                        --timeout 1000 KILL $pid 2>/dev/null"
>>   	fi
>>   }
>>   
>
> AFAIK, this will immediately send TERM, then wait 1s, send TERM again,
> wait 1s then send KILL. Is that what you intended? To avoid the double
> TERM you could:

Okay, I'll adjust it.

> --
> Adrián Moreno
>
>> @@ -108,7 +109,8 @@ ovs_netns_spawn_daemon() {
>>   	info "spawning cmd: $*"
>>   	ip netns exec $netns $*  >> $ovs_dir/stdout  2>> $ovs_dir/stderr &
>>   	pid=$!
>> -	ovs_sbx "$sbx" on_exit "kill -TERM $pid 2>/dev/null"
>> +	ovs_sbx "$sbx" on_exit "kill --timeout 1000 TERM \
>> +                                    --timeout 1000 KILL $pid 2>/dev/null"
>>   }
>>     ovs_add_netns_and_veths () {


  reply	other threads:[~2024-02-21 21:11 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-16 15:28 [RFC 0/7] selftests: openvswitch: cleanups for running as selftests Aaron Conole
2024-02-16 15:28 ` [RFC 1/7] selftests: openvswitch: add test case error directories to clean list Aaron Conole
2024-02-16 15:28 ` [RFC 2/7] selftests: openvswitch: be more verbose with selftest debugging Aaron Conole
2024-02-16 15:28 ` [RFC 3/7] selftests: openvswitch: use non-graceful kills when needed Aaron Conole
2024-02-21 17:32   ` [ovs-dev] " Adrian Moreno
2024-02-21 21:11     ` Aaron Conole [this message]
2024-02-16 15:28 ` [RFC 4/7] selftests: openvswitch: delete previously allocated netns Aaron Conole
2024-02-16 16:31   ` Paolo Abeni
2024-02-16 18:50     ` Aaron Conole
2024-02-16 15:28 ` [RFC 5/7] selftests: openvswitch: make arping test a bit 'slower' Aaron Conole
2024-02-16 15:28 ` [RFC 6/7] selftests: openvswitch: insert module when running the tests Aaron Conole
2024-02-16 15:28 ` [RFC 7/7] selftests: openvswitch: add config and timeout settings Aaron Conole
2024-02-19 20:28 ` [RFC 0/7] selftests: openvswitch: cleanups for running as selftests Jakub Kicinski
2024-02-20 18:02   ` Aaron Conole

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f7ty1bd8qup.fsf@redhat.com \
    --to=aconole@redhat.com \
    --cc=amorenoz@redhat.com \
    --cc=davem@davemloft.net \
    --cc=dev@openvswitch.org \
    --cc=edumazet@google.com \
    --cc=i.maximets@ovn.org \
    --cc=kuba@kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=shuah@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).