[PATCH v2 6/6] powerpc/64: Add tests for out-of-line static calls

Benjamin Gray bgray at linux.ibm.com
Tue Sep 27 13:31:55 AEST 2022


On Mon, 2022-09-26 at 14:55 +0000, Christophe Leroy wrote:
> > +config PPC_STATIC_CALL_KUNIT_TEST
> > +       tristate "KUnit tests for PPC64 ELF ABI V2 static calls"
> > +       default KUNIT_ALL_TESTS
> > +       depends on HAVE_STATIC_CALL && PPC64_ELF_ABI_V2 && KUNIT &&
> > m
> 
> Is there a reason why it is dedicated to PPC64 ? In that case, can
> you 
> make it explicit with the name of the config option, and with the
> name 
> of the file below ?

The tests were written to make sure the TOC stays correct, so in theory
PPC64_ELF_ABI_V2 (and potentially PPC64_ELF_ABI_V1) is the only ABI
that should need them. I was thinking other tests should probably go in
static_call_selftest.c

Thinking now though, I suppose runtime modules are out-of-range for
branches on 32-bit as well? I can see it being useful for just testing
the indirect branch fallback in that case, without trying to make some
generic test suite that needs to work on other arches. The TOC specific
checks can be conditionally enabled per ABI.



More information about the Linuxppc-dev mailing list