Subject: Re: [PATCH net-next v2] selftests: net: ksft: print more of the stack for checks

From: Jakub Kicinski <[email-masked]>
Date: Wed, 31 Jul 2024 07:48:14 -0700

On Wed, 31 Jul 2024 13:07:26 +0200 Petr Machata wrote:
> > +            started |= frame.function == 'ksft_run'  
> 
> Hmm, using bitwise operations on booleans is somewhat unusual in Python
> I think, especially if here the short-circuiting of "or" wouldn't be a
> problem. But it doesn't degrade to integers so I guess it's well-defined.

Right, I thought the automatic conversions to booleans are sometimes
considered in poor taste in Python, but wasn't aware that bitwise ops
may be frowned upon. IIUC the alternative would be:

	if frame.function == 'ksft_run':
		started = True

or

	started = started or frame.function == 'ksft_run'

or another way?