Page MenuHomeFreeBSD

tests/sys: Fix the build on non-arm64
Needs ReviewPublic

Authored by andrew on Thu, Apr 9, 2:11 PM.
Tags
None
Referenced Files
F151953286: D56333.id175186.diff
Sat, Apr 11, 6:00 PM
F151953255: D56333.diff
Sat, Apr 11, 5:59 PM
Unknown Object (File)
Fri, Apr 10, 11:03 AM
Unknown Object (File)
Fri, Apr 10, 1:24 AM
Subscribers

Details

Reviewers
kp
markj
Summary

Rework how the per-architecture sys tests are handled to work when an
architecture has none.

Include bsd.test.mk from the base Makefile and then include the
per-architecture Makefile from there. This means we always create a
Kyuafile, even if it's empty.

Sponsored by: Arm Ltd

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 72104
Build 68987: arc lint + arc unit

Event Timeline

andrew requested review of this revision.Thu, Apr 9, 2:11 PM

Do we want to leave it as aarch64/Makefile.inc? It seems a bit strange to .include a Makefile.

Do we want to leave it as aarch64/Makefile.inc? It seems a bit strange to .include a Makefile.

+1

tests/sys/arch/Makefile
8

Why is this rule needed?

tests/sys/arch/Makefile
8

To regenerate the Kyuafile if the included file is updated. It's created in suite.test.mk where there is already a dependency on Makefile

I'm not familiar enough with the build system to have opinions on how it got fixed.

It still doesn't seem to work for me though (on amd64):

kyua: E: Load of 'Kyuafile' failed: Failed to load Lua file 'Kyuafile': Kyuafile:48: Load of 'sys/Kyuafile' failed: Failed to load Lua file 'sys/Kyuafile': sys/Kyuafile:9: Load of 'sys/arch/Kyuafile' failed: File 'sys/arch/Kyuafile' not found.

I'm not sure how that can happen as by including bsd.test.mk a Kyuafile should be created, e.g.

$ cat /usr/obj/.../amd64.amd64/tests/sys/arch/Kyuafile
-- Automatically generated by bsd.test.mk.

syntax(2)

test_suite("FreeBSD")
`

I'm not sure how that can happen as by including bsd.test.mk a Kyuafile should be created, e.g.

$ cat /usr/obj/.../amd64.amd64/tests/sys/arch/Kyuafile
-- Automatically generated by bsd.test.mk.

syntax(2)

test_suite("FreeBSD")
`

This creates a kyua file, but it doesn't get installed. I don't know why. I'd prefer to just follow the scheme I suggested in the original review, which avoids dynamically populating directories based on MACHINE_CPUARCH. That's the same pattern we use elsewhere. In the meantime this commit should be reverted as it it's not possible to run tests right now.

In the meantime this commit should be reverted as it it's not possible to run tests right now.

It looks like this was fixed independently by commit 8672683ec80a6767b1aa12dedeed94d20ec57911.

Set TESTSDIR to install the Kyuafile in the correct place

In the meantime this commit should be reverted as it it's not possible to run tests right now.

It looks like this was fixed independently by commit 8672683ec80a6767b1aa12dedeed94d20ec57911.

That change will create 2 Kyuafiles & install them both in /usr/tests/sys/arch/. Depending on the order the wrong file may be installed.