[PATCH v3] kselftest/arm64: Exit streaming mode after collecting signal context

Mark Brown broonie at kernel.org
Thu Jul 27 09:30:58 PDT 2023


On Thu, Jul 27, 2023 at 04:50:10PM +0100, Will Deacon wrote:

> Looking more closely at this, I see that the bpf and kvm selftests are
> able to include <linux/compiler.h> directly, so I don't see why we need
> to open-code this here. I also spotted that we've *already* written our
> own version of this as the 'curse()' macro in selftests/arm64/bti/compiler.h!

> So I think we should either use linux/compiler.h or make our curse macro
> usable to all the arm64 selftests.

Ah, actually it's not including the linux/compiler.h you might be
thinking of - it's including an entirely unrelated linux/compiler.h
which can be found in tools/include and contains a much smaller set of
things.  We can port the macro over and try to do the dance to pull in
the tools/include headers, hopefully that's not too fragile with the
various combinations of build options and the additional complexity of 
the arm64 tests having an additional layer of directories.

I'd be happier doing this as a fix and then touching the build system in
-next (I've got the build system changes now).  It should be fine but
the build system has changed over time and is prone to fragility - I
can see people wanting to pull the fix back to whatever kernel distros
are using and running into trouble with a more invasive change.

I was going to mention that kselftest had to define it's own
ARRAY_SIZE()...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20230727/fd82d418/attachment.sig>


More information about the linux-arm-kernel mailing list