Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: add test apps to build-boards.yml #1667

Merged
merged 9 commits into from
Mar 20, 2024
Merged

Conversation

hawkw
Copy link
Member

@hawkw hawkw commented Mar 19, 2024

Currently, Hubris' CI doesn't build the tests at all. This means that it's quite easy for the various test apps to bitrot --- for example, the PSC test app doesn't build, because it maps IRQs by bit, rather than by name. Named IRQ support was added back in 2022 (e.g. #424), so this TOML clearly hasn't been touched in...kind of a while, which I think is a pretty convincing argument for building these tests on CI!

@hawkw hawkw requested a review from labbott March 19, 2024 18:13
hawkw added a commit that referenced this pull request Mar 19, 2024
Currently, Hubris' CI doesn't build the tests at all. This means that
it's quite easy for the various test apps to bitrot --- for example, the
PSC test app doesn't build, because [it maps IRQs by bit, rather than by
name][1]. Named IRQ support was added back in 2022 (e.g. #424), so this
TOML clearly hasn't been touched in...kind of a while, which I think is
a pretty convincing argument for building these tests on CI!

[1]: https://github.com/oxidecomputer/hubris/blob/3325c6343a3e51a4d2c63cb3eac46085ba61dac3/test/tests-psc/app.toml#L68-L74
@hawkw
Copy link
Member Author

hawkw commented Mar 19, 2024

Trying to update the bitrotted PSC test config to actually build, but there's a bit of an unfortunate wrinkle: the app config for the PSC tests include a drv-stm32xx-i2c-server (which we need for the FRU ID test), which then depends on drv-stm32xx-sys, which depends on a task slot for jefe...but, because we use test-runner as the supervisor for the test suite, we don't have a jefe!

I think getting these tests to build again will require an actually meaningful amount of work --- perhaps we can add a feature to drv-stm32xx-sys to make it play nice with test-runner as supervisor (and add code to the test runner to allow it to do whatever Jefe stuff that the sys driver depends on)?

hawkw added a commit that referenced this pull request Mar 19, 2024
This ended up being a bit more complex, as the `tests-psc` config
includes a `drv-stm32xx-i2c` task, which depends on `drv-stm32xx-sys`,
which depends on `jefe`. Because the test runner runs as supervisor,
there _is_ no `jefe`. Therefore, I've added a feature to
`drv-stm32xx-sys` to disable its `jefe` task slot, for use in tests.

It would probably be more ideologically correct to make the
`task-jefe-api` an optional dep, nand only talk to Jefe if it's enabled.
But, IIRC, we never enable default features by default, so making Jefe
support opt-in rather than opt-out would require changing _every other
app.toml with a `drv-stm32xx-sys` task_ to enable the Jefe feature. I
dunno...
hawkw added a commit that referenced this pull request Mar 19, 2024
This ended up being a bit more complex, as the `tests-psc` config
includes a `drv-stm32xx-i2c` task, which depends on `drv-stm32xx-sys`,
which depends on `jefe`. Because the test runner runs as supervisor,
there _is_ no `jefe`. Therefore, I've added a feature to
`drv-stm32xx-sys` to disable its `jefe` task slot, for use in tests.

It would probably be more ideologically correct to make the
`task-jefe-api` an optional dep, nand only talk to Jefe if it's enabled.
But, IIRC, we never enable default features by default, so making Jefe
support opt-in rather than opt-out would require changing _every other
app.toml with a `drv-stm32xx-sys` task_ to enable the Jefe feature. I
dunno...
hawkw added a commit that referenced this pull request Mar 19, 2024
Currently, Hubris' CI doesn't build the tests at all. This means that
it's quite easy for the various test apps to bitrot --- for example, the
PSC test app doesn't build, because [it maps IRQs by bit, rather than by
name][1]. Named IRQ support was added back in 2022 (e.g. #424), so this
TOML clearly hasn't been touched in...kind of a while, which I think is
a pretty convincing argument for building these tests on CI!

[1]: https://github.com/oxidecomputer/hubris/blob/3325c6343a3e51a4d2c63cb3eac46085ba61dac3/test/tests-psc/app.toml#L68-L74
hawkw added a commit that referenced this pull request Mar 19, 2024
This ended up being a bit more complex, as the `tests-psc` config
includes a `drv-stm32xx-i2c` task, which depends on `drv-stm32xx-sys`,
which depends on `jefe`. Because the test runner runs as supervisor,
there _is_ no `jefe`. Therefore, I've added a feature to
`drv-stm32xx-sys` to disable its `jefe` task slot, for use in tests.

It would probably be more ideologically correct to make the
`task-jefe-api` an optional dep, nand only talk to Jefe if it's enabled.
But, IIRC, we never enable default features by default, so making Jefe
support opt-in rather than opt-out would require changing _every other
app.toml with a `drv-stm32xx-sys` task_ to enable the Jefe feature. I
dunno...
hawkw added a commit that referenced this pull request Mar 19, 2024
hawkw added a commit that referenced this pull request Mar 19, 2024
Currently, Hubris' CI doesn't build the tests at all. This means that
it's quite easy for the various test apps to bitrot --- for example, the
PSC test app doesn't build, because [it maps IRQs by bit, rather than by
name][1]. Named IRQ support was added back in 2022 (e.g. #424), so this
TOML clearly hasn't been touched in...kind of a while, which I think is
a pretty convincing argument for building these tests on CI!

[1]: https://github.com/oxidecomputer/hubris/blob/3325c6343a3e51a4d2c63cb3eac46085ba61dac3/test/tests-psc/app.toml#L68-L74
hawkw added a commit that referenced this pull request Mar 19, 2024
This ended up being a bit more complex, as the `tests-psc` config
includes a `drv-stm32xx-i2c` task, which depends on `drv-stm32xx-sys`,
which depends on `jefe`. Because the test runner runs as supervisor,
there _is_ no `jefe`. Therefore, I've added a feature to
`drv-stm32xx-sys` to disable its `jefe` task slot, for use in tests.

It would probably be more ideologically correct to make the
`task-jefe-api` an optional dep, nand only talk to Jefe if it's enabled.
But, IIRC, we never enable default features by default, so making Jefe
support opt-in rather than opt-out would require changing _every other
app.toml with a `drv-stm32xx-sys` task_ to enable the Jefe feature. I
dunno...
hawkw added a commit that referenced this pull request Mar 19, 2024
hawkw added a commit that referenced this pull request Mar 19, 2024
Currently, Hubris' CI doesn't build the tests at all. This means that
it's quite easy for the various test apps to bitrot --- for example, the
PSC test app doesn't build, because [it maps IRQs by bit, rather than by
name][1]. Named IRQ support was added back in 2022 (e.g. #424), so this
TOML clearly hasn't been touched in...kind of a while, which I think is
a pretty convincing argument for building these tests on CI!

[1]: https://github.com/oxidecomputer/hubris/blob/3325c6343a3e51a4d2c63cb3eac46085ba61dac3/test/tests-psc/app.toml#L68-L74
hawkw added a commit that referenced this pull request Mar 19, 2024
This ended up being a bit more complex, as the `tests-psc` config
includes a `drv-stm32xx-i2c` task, which depends on `drv-stm32xx-sys`,
which depends on `jefe`. Because the test runner runs as supervisor,
there _is_ no `jefe`. Therefore, I've added a feature to
`drv-stm32xx-sys` to disable its `jefe` task slot, for use in tests.

It would probably be more ideologically correct to make the
`task-jefe-api` an optional dep, nand only talk to Jefe if it's enabled.
But, IIRC, we never enable default features by default, so making Jefe
support opt-in rather than opt-out would require changing _every other
app.toml with a `drv-stm32xx-sys` task_ to enable the Jefe feature. I
dunno...
hawkw added a commit that referenced this pull request Mar 19, 2024
Currently, Hubris' CI doesn't build the tests at all. This means that
it's quite easy for the various test apps to bitrot --- for example, the
PSC test app doesn't build, because [it maps IRQs by bit, rather than by
name][1]. Named IRQ support was added back in 2022 (e.g. #424), so this
TOML clearly hasn't been touched in...kind of a while, which I think is
a pretty convincing argument for building these tests on CI!

[1]: https://github.com/oxidecomputer/hubris/blob/3325c6343a3e51a4d2c63cb3eac46085ba61dac3/test/tests-psc/app.toml#L68-L74
This ended up being a bit more complex, as the `tests-psc` config
includes a `drv-stm32xx-i2c` task, which depends on `drv-stm32xx-sys`,
which depends on `jefe`. Because the test runner runs as supervisor,
there _is_ no `jefe`. Therefore, I've added a feature to
`drv-stm32xx-sys` to disable its `jefe` task slot, for use in tests.

It would probably be more ideologically correct to make the
`task-jefe-api` an optional dep, nand only talk to Jefe if it's enabled.
But, IIRC, we never enable default features by default, so making Jefe
support opt-in rather than opt-out would require changing _every other
app.toml with a `drv-stm32xx-sys` task_ to enable the Jefe feature. I
dunno...
Turns out [Clippy dislikes some of the test suite code][1]. This commit
makes Clippy chill out about it.

[1]: https://github.com/oxidecomputer/hubris/actions/runs/8350750156/job/22857850090
@hawkw hawkw requested a review from cbiffle March 19, 2024 22:56
Copy link
Collaborator

@cbiffle cbiffle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks plausible! Thanks for unrotting these.

Whoops, these build two images. My bad.
@hawkw hawkw merged commit 67dd7e6 into master Mar 20, 2024
103 checks passed
hawkw added a commit that referenced this pull request Mar 20, 2024
Currently, Hubris' CI doesn't build the tests at all. This means that
it's quite easy for the various test apps to bitrot --- for example, the
PSC test app doesn't build, because [it maps IRQs by bit, rather than by
name][1]. Named IRQ support was added back in 2022 (e.g. #424), so this
TOML clearly hasn't been touched in...kind of a while, which I think is
a pretty convincing argument for building these tests on CI!

[1]: https://github.com/oxidecomputer/hubris/blob/3325c6343a3e51a4d2c63cb3eac46085ba61dac3/test/tests-psc/app.toml#L68-L74
hawkw added a commit that referenced this pull request Mar 20, 2024
This ended up being a bit more complex, as the `tests-psc` config
includes a `drv-stm32xx-i2c` task, which depends on `drv-stm32xx-sys`,
which depends on `jefe`. Because the test runner runs as supervisor,
there _is_ no `jefe`. Therefore, I've added a feature to
`drv-stm32xx-sys` to disable its `jefe` task slot, for use in tests.

It would probably be more ideologically correct to make the
`task-jefe-api` an optional dep, nand only talk to Jefe if it's enabled.
But, IIRC, we never enable default features by default, so making Jefe
support opt-in rather than opt-out would require changing _every other
app.toml with a `drv-stm32xx-sys` task_ to enable the Jefe feature. I
dunno...
hawkw added a commit that referenced this pull request Mar 20, 2024
hawkw added a commit that referenced this pull request Mar 20, 2024
Turns out [Clippy dislikes some of the test suite code][1]. This commit
makes Clippy chill out about it.

[1]: https://github.com/oxidecomputer/hubris/actions/runs/8350750156/job/22857850090
hawkw added a commit that referenced this pull request Mar 20, 2024
hawkw added a commit that referenced this pull request Mar 20, 2024
hawkw added a commit that referenced this pull request Mar 20, 2024
Turns out this import was totally unused --- there are no atomics in here.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants