2
0
mirror of https://github.com/xcat2/xcat-dep.git synced 2026-11-19 00:42:18 +00:00
Files
xcat-dep/native
Daniel Hilst 133d501354 test(goconserver): the native fixture cannot write the host mock cache
mockbuild.pl recreates the bootstrap cache that mock --scrub=bootstrap removes,
and it built the path from a literal /var/cache/mock. goconserver-openeuler.t
runs the builder under unshare --user --map-root-user, which maps root but leaves
the host cache unwritable, so the builder died in make_path and 12 of 160
assertions failed with "mkdir /var/cache/mock/<cfg>-bootstrap: Permission denied".

The path moved into MockBuildUtils::mock_bootstrap_cache_dirs, which takes the
cache root from XCAT_MOCK_CACHE_ROOT and falls back to /var/cache/mock, so the
production default does not change. run_case points it at a directory of each
case's own, and the builder now writes nothing outside the test's temporary tree.

Each of the six configurations asserts all three directories are present after the
scrub. Removing the recreate loop from mockbuild.pl fails exactly those six and
nothing else, so the assertions measure the fix rather than the fixture.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-11-08 18:16:10 -03:00
..

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

uftp-fixes.t builds the UFTP programs from the archive and patches in uftp/ with AddressSanitizer. It needs a C compiler, make, patch and the OpenSSL headers.

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.