[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f94dc055-6c3b-4fae-868a-723f9dc63db5@redhat.com>
Date: Fri, 2 May 2025 15:05:48 +0200
From: Paolo Abeni <pabeni@...hat.com>
To: Edward Cree <ecree.xilinx@...il.com>, Jakub Kicinski <kuba@...nel.org>,
davem@...emloft.net
Cc: netdev@...r.kernel.org, edumazet@...gle.com, andrew+netdev@...n.ch,
horms@...nel.org, petrm@...dia.com, willemb@...gle.com, sdf@...ichev.me,
linux-kselftest@...r.kernel.org
Subject: Re: [PATCH net-next v2] selftests: net: exit cleanly on SIGTERM /
timeout
On 4/30/25 8:03 PM, Edward Cree wrote:
> On 29/04/2025 18:08, Jakub Kicinski wrote:
>> +class KsftTerminate(KeyboardInterrupt):
>> + pass
> ...
>> @@ -229,11 +249,12 @@ KSFT_DISRUPTIVE = True
>> cnt_key = 'xfail'
>> except BaseException as e:
>> stop |= isinstance(e, KeyboardInterrupt)
>> + stop |= isinstance(e, KsftTerminate)
>
> The first isinstance() will return True for a KsftTerminate as it's a
> subclass of KeyboardInterrupt, and thus the second line isn't needed.
@Jakub: I'm using the selftests code to refresh my rather rusty python
skills, I think it would be good to address the above and keep the
codebase clean.
Thanks,
Paolo
Powered by blists - more mailing lists