Skip to content

pytest: general image validation fixes - #473

Closed
kanavin wants to merge 2 commits into
Linutronix:masterfrom
kanavin:fix-slow-pytests
Closed

pytest: general image validation fixes#473
kanavin wants to merge 2 commits into
Linutronix:masterfrom
kanavin:fix-slow-pytests

Conversation

@kanavin

@kanavin kanavin commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Please see specific commits in this PR. They enable adding particular base-extended tests, and commits for those will follow in a separate PR.

With this PR, running 'elbe check-build img' on pre-built simple-validation-image
is executing and passing both qemu login test and offline validation script:

$ ./elbe check-build img ./elbe-build-20260727-155040/
...
[INFO]Succesfully validate 2 images out of 2
[INFO]Passed 1 tests ouf of 1

It's also possible to execute an integrated pytest that builds the image
and doesn't require a manual pre-build, but it is much slower due to
also building the sdk and cdrom:

$ pytest -s -k "simple-validation-image.xml-img" --runslow --elbe-use-initvm=existing

Comment thread tests/simple-validation-image-test.py Outdated
Comment thread elbepack/packers.py
kanavin added 2 commits July 29, 2026 17:40
…ons with the original archive file

This works if the script is run directly, but fails when it is embedded
into build_dir/source.xml, and then written out from there into a temp dir
and executed by 'elbe check-build'. At that point the link to the original
directory with the xml and archive is long-lost.

We cannot hardcode the permissions to the file either, as they vary
between build hosts (see 79cd5df)
so let's simply drop the permissions check and only check that file
exists and is a regular file.

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
…can be logged into

The login check, in turn, requires setting a root password on the image,
and adjusting the script to check for its presence.

With this commit, running 'elbe check-build img' on pre-built simple-validation-image
is finally passing both qemu login test and offline validation script:

$ ./elbe check-build img ./elbe-build-20260727-155040/
...
[INFO]Succesfully validate 2 images out of 2
[INFO]Passed 1 tests ouf of 1

It's also possible to execute an integrated pytest that builds the image
and doesn't require a manual pre-build, but it is much slower due to
also building the sdk and cdrom:

$ pytest -s -k "simple-validation-image.xml-img" --runslow --elbe-use-initvm=existing

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
@kanavin
kanavin force-pushed the fix-slow-pytests branch from 2a4a6f7 to e19728b Compare July 29, 2026 15:42
@t-8ch

t-8ch commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Applied, thanks!

@t-8ch t-8ch closed this Jul 30, 2026
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