On Tue, Jun 10, 2025 at 07:05:59PM +0200, Thomas Weißschuh wrote:
On 2025-06-09 17:42:47+0100, Mark Brown wrote:
KUnit deals with this by doing it's kernel build in a .kunit directory, it'd probably be good to do something similar for nolibc.
I assume you are using "make" directly. For a more complete kunit.py-like solution we have run-tests.sh, which does indeed use a dedicated build directory.
Given that the tests were in tools/testing/selftests I initially tried to run them via the selftests build infra which didn't work since they're not glued into that at all and I ran into this as part of debugging. It didn't actually occur to me to look anywhere other than the Makefile, that's how you normally invoke selftests.
Given that AFAICT the tests don't use any kselftest infrastructure or otherwise overlap with it I think it'd be better to move them to tools/testing/nolibc, that'd make it clearer that they're their own thing and avoid surprises.