2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-10-21 23:28:19 +00:00
Commit Graph

10 Commits

Author SHA1 Message Date
Daniel Hilst c6fc094c93 fix(xcat-core): test Genesis shell and C code by running it, not from Perl
The Perl tests of the OpenEmbedded Genesis image ran its shell scripts
and C programs through system(), qx, pipes and fork, wrote fake
commands through copied read_file and write_file helpers, and matched
regexes against shell and C source. Many rejections checked only a
non-zero exit, so an earlier, unrelated failure also passed. The
quality gate judged 91% of their 762 checks bad.

The shell and C checks move to bats in xCAT-test/bats. The C programs
are compiled there and run: the plain console, test drivers for the
shared status view and the shell launcher, and genesis-udp-send against
a loopback listener. Each rejection now matches the message of its own
guard. The .t files keep the artifact checks (kas, recipes, kernel
fragments, units, README), read with XCAT::Test::File. Test files left
with no checks are deleted.

Claim map (file -> where its claims went):
- go_xcat_uninstall_installed_only.t -> go_xcat_uninstall_installed_only.bats
- genesis_readme_paths.t, genesis_base_sources_staged.t -> kept in the
  .t (README read by slurp_repo_file, tarball read by Archive::Tar)
- genesis_openembedded_{export,hardware,runtime}.t -> the bats file of
  the same name
- genesis_openembedded_{bmcsetup,metrics,extensions,qeth,actions,
  discovery}.t -> scripts to the bats file of the same name, recipes
  and units kept in the .t
- genesis_openembedded_console.t -> built and run checks, state.c,
  plain_ui.c and shell.c to genesis_openembedded_console.bats; Newt
  source checks kept in the .t
- genesis_openembedded.t -> oe/build to genesis_openembedded_build.bats;
  shell matches to the runtime, hardware and extensions bats; console
  matches to the console bats or the console .t; artifacts kept

Red proof: every moved or new test was run against a mutated copy of
the code it covers and went red, for example: rpm -q not checked,
tar without --mtime, VEX report not exported, support dir after PATH,
digest check off, layer2 forced, wildcard device allowed, arguments
eval'd, tcp probe skipped, SOURCE_PORT 302, AF_INET only, stage timer
compared, launch error ignored, kas run twice, status written in place.
One mutation stayed green: tar without --owner=0 when the test runs as
root.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-09-24 22:00:28 -03:00
Daniel Hilst 2a7364476e fix(xcat-core): xCAT-genesis-builder is named for a builder nothing calls
The directory holds the Genesis image sources and, beside them, a builder that
no pipeline runs. buildrpm, debuild-xcat-genesis-base, install, install.ubuntu,
check, cmdlist_check, findmcprpms, xCAT-genesis-builder.spec and the root
makerpm-genesisbuilder have no caller. So has build-ubunturepo, which
builddebs.pl replaced, and its -r flag has set an unread variable since 2013.
docs/source/references/coral/known_issues/genesis_base.rst tells the reader to
install an rpm no build produces, and go-xcat offers to remove that package.

Delete all of them, and rename the directory xCAT-genesis-base for what it
holds: the dracut modules the EL spec and the Ubuntu builder read, the
OpenEmbedded layers the GitHub job builds, the deb packaging, the image scripts
and 80-net-name-slot.rules.

Every reader of the old path is updated: buildrpms.pl, .gitattributes, the OE
workflow and the OpenEmbedded tests. buildrpms.pl mapped the package
xCAT-genesis-base to the directory xCAT-genesis-builder; the two names are the
same now, so the mapping goes.

xcat_probe_package_payload.t read build-ubunturepo for the probe helper staging.
builddebs.pl stages them with XCAT::BuildUtils::stage_probe_helpers, which
build_utils.t drives directly.

genesis_base_sources_staged.t passes with this change.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-09-12 08:45:49 -03:00
Vinícius Ferrão d2e20fb08c test(genesis): distinguish s390x guest identity 2026-09-06 03:35:19 -03:00
Vinícius Ferrão 6711a5ce9e test(genesis): tighten s390x coverage 2026-09-04 15:31:33 -03:00
Vinícius Ferrão 059438d266 test(genesis): cover s390x identity fallbacks 2026-09-04 14:42:57 -03:00
Vinícius Ferrão d140b941ad test(genesis): cover s390x identity 2026-09-04 12:48:32 -03:00
Vinícius Ferrão 4c50b4da50 test(genesis): cover disappearing devices 2026-08-21 02:12:56 -03:00
Vinícius Ferrão 53c8538e4a test(genesis): cover logging failures 2026-08-21 02:12:22 -03:00
Vinícius Ferrão 63f2326b6e test(genesis): cover BMCs without SOL 2026-08-20 22:43:13 -03:00
Vinícius Ferrão e1c5d1565c test(genesis): cover provisioning runtime 2026-08-20 22:29:56 -03:00