Add support for running the tests from uACPI.#285
Add support for running the tests from uACPI.#285martin-hughes wants to merge 1 commit intorust-osdev:mainfrom
Conversation
There are some examples copied directly from the uACPI codebase into the integration tests. I believe the attribution at the top of the file should be sufficient to meet the terms of the MIT licence, since we're not including a "substantial" part of their codebase.
|
I haven't made any attempt to integrate the uACPI tests into the CI pipeline - it feels unnecessary until the tests all pass. |
| Note that, at present, several of the uACPI tests run indefinitely. You may want to skip these! The easiest way to do so | ||
| is probably just to delete them... The relevant tests are: | ||
|
|
||
| * `global-lock.asl` |
There was a problem hiding this comment.
I haven't looked at the arguments we're passed by uACPI's test runner. Is there any way to have a list of these and skip them from uacpi_test_adapter?
Edit: alternatively this may just be an opportunity to fix those issues. Stuff like timeouts on loops is well past overdue.
| // TODO: This *is* a memory leak - but a tolerable one for now. The FACS would be 'static in a | ||
| // real machine, and we effectively need that here since the crate will never try to release it. | ||
| // | ||
| // It'd be possible to tidy this up creating a newtype containing both the Interpeter and FACS |
There was a problem hiding this comment.
I don't think this will ever be a real problem. We could possibly even just make a FACS in a static UnsafeCell and take a pointer to it for each test, since writes to it won't do anything?
| return ExitCode::SUCCESS; | ||
| } | ||
|
|
||
| let Some(tester_path) = env::var_os("AML_TESTER_PATH") else { |
There was a problem hiding this comment.
Happy for it to be left like this, but it may be easy enough to extract the path to aml_tester from here since they'll end up in the same target directory?
|
Thanks for working on this! Our performance on these tests is... worse than I'd envisaged. I've started looking at some of the failures today. |
Does what it says on the tin!
There are two parts:
uacpi_examples.rs. Most of these tests currently fail so are marked#[ignore]I've added the
uacpi_test_adapterbinary - this is quite straightforward, it "adapts" the uACPI runner command line arguments intoaml_testerarguments. TBH, "Adapts" is a strong word - it drops and fakes success for some tests that we don't have. I added it as a standalone for the reason given in its documentation - it keeps extraneous argument pollution affecting fromaml_tester, and keepsaml_testerfully separate from theuacpitests.Running it is fairly straightforward, see the docs for details. Note that