native/openeuler-power-inputs.t gates its whole native owner section on
"from mockbuild.util import load_config". mock 6.8 keeps load_config in
mockbuild.config, so the import fails, $can_owner is false and 52 assertions skip
on the only architecture that can run them. native/fixtures/power-mock.py imports
it the same way and cannot start at all.
The fake mock also created --resultdir as the user that started it and wrote no
logs, so it could not see what mock 6.8 does: it reloads its uid manager from
chrootuid, then creates --resultdir and opens state.log, build.log and root.log in
it as that uid.
Both now use mockbuild.config, and the fake mock creates --resultdir and opens
those three logs as chrootuid. Against the unfixed tree the native owner fails:
mock: [Errno 13] Permission denied:
.../native-results/native-leaf/state.log
ERROR: Step failed (rc=1): Build native prerequisite: native-leaf
Failed 14/115 subtests
The directory is root root 755 and chrootuid is 1000, which is the catalog's
declared build_uid for that node.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
Native packaging tests
The openEuler packaging tests build and sign RPMs or require Linux namespaces.
They run separately from prove -r t on a disposable host with the required
native tools:
prove -v native/*.t
Use an ordinary user for RPM builds. openeuler-power-inputs.t exercises the
whole build owner only on POWER with native Mock; its RPM admission checks also
run on x86_64. When running that test as root, set XCAT_TEST_BUILD_USER to an
unprivileged account for the fixture builds.
The fixtures are command doubles at the downloader and Mock boundaries. The POWER Mock adapter uses the installed Python API directly to load generated configurations. It does not execute another Python interpreter.
The Mock configuration test loads the installed Python API from a checked-in fixture and is kept outside the unit run.
Inspect TAP skips: a successful exit does not qualify an unavailable native tool or architecture.