This has always worked but had no coverage. Adding testing now so that
later I can refactor the save/restore code safely.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
This looks fine but instead of adding a new test cant we add MTE control register tests to already available MTE tests?
This looks fine but instead of adding a new test cant we add MTE control register tests to already available MTE tests?
We have these existing tests:
mte_core_file - clearly it can't go here, core files are read only.
mte_memory_region - memory regions have nothing to do with registers.
mte_tag_access - Could go here.
mte_tag_faults - Could go here.
You can call it def test_mte_ctrl_is_restored and that explains it if it fails among a set of somewhat unrelated tests, but it makes it harder to see at a glance if we've tested that register specifically. Doing it in it's own test file is clear what it's doing and it's next to the other register tests and the forthcoming SME tests.
I know I've gone either way on adding new test cases or tacking onto older ones in the past but in this case that's the way I'm leaning.
Remove HWCAP check from program file. The runner will check cppuinfo
and even if that was fooled, the prctl would fail at runtime if you
didn't have MTE.