2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-09-10 19:46:24 +00:00
Commit Graph

514 Commits

Author SHA1 Message Date
Vinícius Ferrão 17126c74a9 Merge pull request #7823 from VersatusHPC/feat/bats-shell-tests
test(xcat-core): Introduce BATS & convert shell scripting tests to it
2026-09-09 19:48:49 -03:00
Vinícius Ferrão 166da7c1b6 test(xCAT-test): cover the install architectures debian.pm accepts
The plugin is loaded and install_darch is called for the architectures
xCAT installs Ubuntu on and two it does not. Against the previous plugin the
test fails on the missing function: the mapping was inline in mkinstall.

Signed-off-by: Vinícius Ferrão <2031761+viniciusferrao@users.noreply.github.com>
2026-09-08 22:01:34 -03:00
Vinícius Ferrão 5a541814df test(xCAT-test): pin what a riscv64 management node installs and serves
The grub-common assertion fails against the previous metapackage. The rest pins
what must NOT change: a riscv64 management node still recommends the x86 boot
payload and the Genesis images of the other architectures, because it serves
them to the nodes it provisions.

Signed-off-by: Vinícius Ferrão <2031761+viniciusferrao@users.noreply.github.com>
2026-09-08 22:01:33 -03:00
Vinícius Ferrão f0c7803595 test(xCAT-test): cover the declaration of the loader build tool
Signed-off-by: Vinícius Ferrão <2031761+viniciusferrao@users.noreply.github.com>
2026-09-08 22:01:33 -03:00
Vinícius Ferrão 9f35a4b8cb test(xCAT-test): build the riscv64 loader from real Ubuntu media
The stubbed test proves the decisions copycd makes; this one proves the
artifact. It runs the real grub-mkimage over the grub2 package of copied media
and checks the image against the validation nodeset depends on, so a package
layout change or a grub-mkimage that stops accepting these inputs is caught
where it happens.

It needs media and the grub2 tools, so it skips without
XCAT_TEST_UBUNTU_RISCV64_MEDIA. Run on a management node against the 24.04 and
26.04 riscv64 trees.

Signed-off-by: Vinícius Ferrão <2031761+viniciusferrao@users.noreply.github.com>
2026-09-08 22:01:32 -03:00
Vinícius Ferrão 56910729ce test(xCAT-test): drive the mirror choice with the osarch value genimage reads
The mirror assertions passed a Debian architecture straight in and so never
exercised the conversion genimage performs first. They now start from the xCAT
osarch value, which is what let the 32-bit x86 token reach the wrong archive.

Signed-off-by: Vinícius Ferrão <2031761+viniciusferrao@users.noreply.github.com>
2026-09-08 22:01:32 -03:00
Vinícius Ferrão 828d0d2fdf test(xCAT-test): capture a riscv64 build depending on the x86 Genesis scripts
Four assertions fail against the previous debian/control: the dependency has no
architecture restriction, and dpkg's own parser still reports it for riscv64.
The last assertion pins that the restriction drops nothing else.

Signed-off-by: Vinícius Ferrão <2031761+viniciusferrao@users.noreply.github.com>
2026-09-08 22:01:31 -03:00
Vinícius Ferrão f9baf6e05b test(xCAT-test): follow the riscv64 netboot values naming Ubuntu
The assertion pinned the EL-only text and failed once the documented values
named Ubuntu as well.

Signed-off-by: Vinícius Ferrão <2031761+viniciusferrao@users.noreply.github.com>
2026-09-08 22:01:31 -03:00
Vinícius Ferrão 33eba52b96 test(xCAT-test): cover the packages go-xcat installs on riscv64
Signed-off-by: Vinícius Ferrão <2031761+viniciusferrao@users.noreply.github.com>
2026-09-08 22:01:28 -03:00
Vinícius Ferrão 44f125b63d test(xCAT-test): cover the install mirror the template renders
Calls the selection the template performs. Covers the ports archive for
ppc64el and both spellings of ppc64, the main archive for every x86
spelling, an unknown architecture keeping the previous default, and
site.ubuntu_apt_mirror overriding both without an empty value blanking the
mirror.

Signed-off-by: Vinícius Ferrão <2031761+viniciusferrao@users.noreply.github.com>
2026-09-08 22:01:27 -03:00
Vinícius Ferrão 5c4b83b853 test(xCAT-test): cover the grub2 kernel command line quoting
Calls the escaping the plugin performs. Covers the Ubuntu installer seed
keeping the arguments after it, every separator grub2 recognizes, a command
line without one staying byte for byte the same, escaped and quoted values
surviving unchanged, a separator beside a quoted span in the same word, and
a variable reference being left alone so BOOTIF still expands.

Signed-off-by: Vinícius Ferrão <2031761+viniciusferrao@users.noreply.github.com>
2026-09-08 22:01:27 -03:00
Vinícius Ferrão 7fed9001e8 test(xCAT-test): cover the riscv64 Ubuntu network drivers
Reads the list imgutils returns. Covers the drivers a node needs to reach
its root filesystem, the overlay module, the architectures that already
worked keeping theirs, and an unknown architecture still getting an empty
list.

Signed-off-by: Vinícius Ferrão <2031761+viniciusferrao@users.noreply.github.com>
2026-09-08 22:01:26 -03:00
Vinícius Ferrão 9812d14928 test(xCAT-test): cover the netboot mirror genimage defaults to
Evaluates the selection genimage performs, so the test tracks the script.
Covers the ports archive for ppc64el and riscv64, the main archive for
amd64 and i386, and site.ubuntu_apt_mirror overriding both without an
empty value blanking the mirror.

Signed-off-by: Vinícius Ferrão <2031761+viniciusferrao@users.noreply.github.com>
2026-09-08 17:02:04 -03:00
Vinícius Ferrão b0bf36d27a test(xCAT-test): cover the riscv64 Ubuntu management node packaging
Extends the builder tests with the per-package architecture lists and the
architectures a release declares, and adds the generated mklocalrepo.sh
mapping a riscv64 host to its own repository. Also checks that xcat and
xcatsn declare riscv64 without losing amd64 or ppc64el.

Signed-off-by: Vinícius Ferrão <2031761+viniciusferrao@users.noreply.github.com>
2026-09-08 17:02:03 -03:00
Vinícius Ferrão 459ec2a8c3 test(xCAT-test): cover the loader copycd builds from Ubuntu media
Drives the build with dpkg-deb and grub-mkimage shadowed by stubs, so the
assertions read the arguments that decide whether the image can boot over
the network: the firmware format, the prefix nodeset writes into, the
module directory, and the network modules. Also covers the warning a node
without a loader gets, an interrupted build leaving nothing behind, a real
riscv64 loader being kept, text, a truncated image, another architecture's
loader, images with nothing to execute and an image built for another boot
path all being replaced, and a rejected loader being gone when the media
cannot replace it.

Signed-off-by: Vinícius Ferrão <2031761+viniciusferrao@users.noreply.github.com>
2026-09-08 17:02:03 -03:00
Vinícius Ferrão fc73cd91f1 test(xCAT-test): cover the riscv64 Ubuntu package lists
Pin that both releases carry a riscv64 list, that it holds what the x86_64 list
holds, and that it keeps the kernel and the NFS client a diskless node needs.

Signed-off-by: Vinícius Ferrão <2031761+viniciusferrao@users.noreply.github.com>
2026-09-08 17:02:03 -03:00
Vinícius Ferrão 7a2499fbfb test(xCAT-test): cover the resolver libraries the netboot image takes
Build a root filesystem for each architecture and run genimage's selection over
it, so the riscv64 libraries are taken from their own directory and the other
architectures keep the files they take today.

Signed-off-by: Vinícius Ferrão <2031761+viniciusferrao@users.noreply.github.com>
2026-09-08 17:02:03 -03:00
Vinícius Ferrão d09452c0b9 test(xCAT-test): cover riscv64 Ubuntu media
Pin the kernel and initrd the riscv64 live image carries, that the kernel name
the other live images use is not accepted for it, and that the architecture the
media reports maps to riscv64 in both directions.

Signed-off-by: Vinícius Ferrão <2031761+viniciusferrao@users.noreply.github.com>
2026-09-08 17:02:02 -03:00
Daniel Hilst cd4d903879 Merge pull request #7820 from VersatusHPC/fix/ubuntu-install-pkglists
Make ospkgs and detect_dhcpd work on current Ubuntu releases
2026-09-08 14:13:17 -03:00
Daniel Hilst 58c030a8f3 test(xcat-core): Move BATS tests beside unit tests
Shell unit tests were introduced under xCAT-test/autotest/bats, but the existing source-tree unit suite already lives directly under xCAT-test/unit. Keeping the BATS suite under xCAT-test/bats makes the unit-test layout consistent and keeps autotest reserved for xcattest-driven functional cases.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-09-08 13:03:34 -03:00
Daniel Hilst 3e302e7f19 test(xcat-core): Introduce BATS & convert shell scripting tests to it
The go-xcat shell behavior tests were written as Perl harnesses, which made the shell assertions harder to read and kept shell-specific setup outside a native shell test framework.

Add BATS to the GitHub Actions dependency set, run BATS tests from the same preserved source tree as the Perl unit suite, and move the go-xcat repository checks into xCAT-test/autotest/bats.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-09-08 12:57:16 -03:00
Daniel Hilst 796103c300 Merge pull request #7822 from VersatusHPC/fix/go-xcat-el10-repos
fix(go-xcat): check the EPEL and CRB repositories on EL10 as well
2026-09-08 12:02:19 -03:00
Vinícius Ferrão 107f7b14ec test(xCAT-test): drive detect_dhcpd with tcpdump on PATH
Both scripts run for real with PATH holding one directory that carries a
tcpdump stand-in, which records the path and arguments it was started with.
The plain run stops at the interface step, before any socket or capture. The
capture runs inside a private network and mount namespace, where the loopback
interface is the only one, its default route keeps the DHCP discover on the
host, a tmpfs over /tmp holds the dump file, and /usr/sbin/tcpdump is hidden
so the previous guard fails there on every host. Hosts that cannot create the
namespace skip that part.
2026-09-08 11:43:00 -03:00
Vinícius Ferrão 8e4fc335fc test(xCAT-test): pin the shared Ubuntu package lists
The lists are resolved through get_pkglist_file_name, the resolver that picks
one for an osimage, and read through get_pkglist_tex, the parser that
produces OSPKGS. 59 of 94 assertions fail against the previous lists: the dead
names, the missing 26.04 lists, unixodbc, qemu-utils and libvirt packages,
and every kvm osimage resolving to the shared list with the old emulator.
2026-09-08 11:43:00 -03:00
Daniel Hilst 8a77a645af Merge pull request #7816 from VersatusHPC/fix/sudoer-postscript-password
fix(sudoer): take the password from the passwd table
2026-09-08 10:29:50 -03:00
Vinícius Ferrão 394be3d5b2 test(xCAT-test): cover the EPEL and CRB check on EL9 and EL10
The check functions and the installer functions that call them are taken
from the shipped script and run against a dnf stand-in that records its
probes. 27 of 40 assertions fail against the previous
script: EL10 and CentOS Stream were not checked, the probe went through dnf
list, a failed query read as a missing repository, and the CRB message
carried a repository file with signature checks disabled.
2026-09-07 13:40:22 -03:00
Vinícius Ferrão 3ad1ef888a test(genesis): cover absent s390x guest UUID 2026-09-06 04:02:40 -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 18b36f02ba test(genesis): cover repository KAS paths 2026-09-06 03:33:24 -03:00
Vinícius Ferrão 947ac1c565 test(genesis): cover local KAS paths 2026-09-06 02:11:20 -03:00
Vinícius Ferrão 9a69060448 test(genesis): cover empty s390x guest UUID 2026-09-06 02:03:11 -03:00
Vinícius Ferrão 974d1250c4 test(genesis): cover qeth safeguards 2026-09-06 02:03:03 -03:00
Vinícius Ferrão 9f9f535c6a test(genesis): load boot policy from source 2026-09-06 01:35:28 -03:00
Vinícius Ferrão e1b6797249 test(genesis): cover s390x qeth activation 2026-09-06 00:26:17 -03:00
Vinícius Ferrão 0ad83ce257 test(genesis): cover s390x config failures 2026-09-04 17:41:08 -03:00
Vinícius Ferrão 9e65f9c45d test(genesis): cover s390x integration boundaries 2026-09-04 17:15:24 -03:00
Vinícius Ferrão ccac4f57eb test(genesis): cover architecture reporting 2026-09-04 16:54:13 -03:00
Vinícius Ferrão 6aba71b44c test(genesis): cover s390x config name 2026-09-04 16:37:39 -03:00
Vinícius Ferrão 7183fd8414 test(genesis): cover s390x boot behavior 2026-09-04 16:20:38 -03:00
Vinícius Ferrão 6711a5ce9e test(genesis): tighten s390x coverage 2026-09-04 15:31:33 -03:00
Vinícius Ferrão cfbbdb283b test(genesis): validate s390x build metadata 2026-09-04 14:43:35 -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 2bb76b523e test(genesis): cover s390x boot handoff 2026-09-04 14:42:42 -03:00
Vinícius Ferrão 5a89bb5bd0 test(docs): cover the s390x Genesis target 2026-09-04 12:48:32 -03:00
Vinícius Ferrão 36ca4a369f test(genesis): cover s390x network boot 2026-09-04 12:48:32 -03:00
Vinícius Ferrão d140b941ad test(genesis): cover s390x identity 2026-09-04 12:48:32 -03:00
Vinícius Ferrão e08804d0e8 test(genesis): cover s390x OpenEmbedded target 2026-09-04 12:48:31 -03:00
Daniel Hilst fd580b901f Merge pull request #7817 from VersatusHPC/refactor/debian-arch-map
refactor(debian): map media architectures through a shared table
2026-09-04 11:07:16 -03:00
Vinícius Ferrão 1b91f91654 test(sudoer): cover the passwd table password source 2026-09-03 20:39:09 -03:00
Vinícius Ferrão 7b189175c8 test(credentials): cover password hashes for non-root system users 2026-09-03 20:39:08 -03:00