2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-11-19 17:02:15 +00:00
Commit Graph

26 Commits

Author SHA1 Message Date
Daniel Hilst 9804168ca9 Merge upstream master into feat/ipv6
Integration test of the 51 commits that landed on upstream master after this
branch was built. Four conflicts, all from edits to the same lines:

perl-XCAT/xCAT/BootUtils.pm: both sides add a new sub at the end of the file.
Master adds expand_node_template, this branch adds grub2_kernel_commands and
grub2_image_provides. All three are kept.

xCAT/xCAT.spec and xCATsn/xCATsn.spec: master wraps the chrony and dhcpd
requirements in a suse_version test, and its %endif lands on the line this
branch uses for radvd. The requirement stays outside the test, because an
openSUSE management node writes radvd.conf too.

xCAT-server/xCAT-server.spec: master's openSUSE requirement list is a superset
of this branch's, so master's is taken whole.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-31 08:55:22 -03:00
Daniel Hilst 3fbf0b2a85 fix(xcat-test): a conf value is cut at its first semicolon
The value class of the conf parser held ':' and '/' and not ';', so
"othersettings=cpumode:host-passthrough;firmware:efi-secureboot" was read as
"cpumode:host-passthrough" and the rest was dropped with no warning. chtab
wrote the row with the first setting alone, and the node was defined without
the firmware it needs to boot over IPv6. The [Object_*] branch had the same
class and the same effect on vmothersetting.

The chtab command was also built by interpolation, with the row selector
unquoted, so a row name or a key carrying shell syntax would have ended the
command. chdef left its type and object name unquoted for the same reason.

parse_conf_assignment is now the one place the class is written, for both
section kinds. table_row_command builds the chtab command with every argument
quoted, the row selector among them, and object_definition_command quotes its
type and name.

xcattest_object_quoting.t asserts the argument list each command delivers, not
only its text, so a quoting change that splits an argument is caught. Removing
';' from the class fails the one check that names a semicolon value and leaves
the other fifteen passing.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-30 13:17:39 -03:00
Daniel Hilst 837509f8cd fix(xcattest): a semicolon in a conf value truncates the chdef it builds
setup_env_by_configure_file built "chdef -t $type -o $name $attr=$value" and
runcmd passes that to bash. A value containing shell syntax was read as syntax.

vmothersetting separates its settings with a semicolon, so
"vmothersetting=cpumode:host-passthrough;firmware:efi-insecure" ended the chdef
at the semicolon. The node kept cpumode alone, mkvm defined the compute node
with no firmware, and it came up as a BIOS guest. A BIOS guest cannot network
boot over IPv6 and cannot load an EFI grub2, so the node took its DHCPv6 address
and never fetched a loader.

object_definition_command() and shell_quote() build the command with every value
quoted, and the chtab path for [Table_*] quotes its values the same way.

xCAT-test/unit/xcattest_object_quoting.t fails when the quoting is removed.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-28 12:13:02 -03:00
Daniel Hilst f47541e19b fix(xcat-core): an openSUSE management node is not recognised, so no case runs
current_os reads /etc/os-release and returns undef for openSUSE. The word sles
appears nowhere in Leap's os-release -- ID is opensuse-leap on 15.x and
opensuse on 42.3 -- and Leap ships none of /etc/redhat-release,
/etc/lsb-release or /etc/SuSE-release, so no other arm is reached. xcattest
rejects every case on the resulting undef, and 328 of the shipped cases declare
os:Linux.

openSUSE now answers with the SLE family whose package set it shares, which is
the answer decided on 2026-09-18 for the same bug: sles.pm claims leap15 and
xcat.org publishes the Leap dependencies under sles15. It also lets the 18
cases written os:sles select a Leap node, which a name of its own would not.
current_os has one consumer -- the os: comparison at xcattest:1052 -- so the
answer affects nothing else.

The match is on the whole file rather than on ID alone, because Leap 42.3
spells its ID opensuse and Tumbleweed opensuse-tumbleweed. It is placed after
the sles test, so a real SLES node is unaffected.

xcattest_os_selection.t passes, 19 of 19. Reverting this file alone fails its
five openSUSE assertions and nothing else.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-26 10:22:32 -03:00
Daniel Hilst b74a0f27aa Merge upstream/master into refactor/r26-fips-policy
Two files needed a resolution. Both are unions of independent additions.

XCAT::Test::Lifecycle::build_deb takes master's new $source argument and its
-xpf extraction, and keeps the control-$arch selection this branch adds for
xCAT-genesis-scripts. $source defaults to the repository root, so the branch
behaviour does not change.

.github/workflows/xcat_test.yml keeps master's profile_package_payload.t on
both lifecycle prove lines and master's Perl module list, and keeps this
branch's FIPS steps, bzip2 and openssl.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-21 10:32:47 -03:00
Vinícius Ferrão fa233e6d36 test(packaging): cover Debian profile permissions from writable sources
Preserve source modes when staging Debian package builds and accept a
private source fixture. Build group-writable profiles under umasks 0022
and 0002, then check the extracted data, postscripts and directories.

Verify that staging and packaging leave source permissions unchanged,
including a world-writable data file. Reuse the payload checks for normal,
reduced and permission-regression builds.
2026-10-19 19:33:33 -03:00
Vinícius Ferrão 6a8755ac13 test(fips): verify generated policy and package payloads 2026-10-17 02:57:05 -03:00
Vinícius Ferrão 509a60def2 test(provisioning): isolate install disk selection checks 2026-10-16 19:06:25 -03:00
Daniel Hilst 82a658ff23 Merge pull request #7917 from VersatusHPC/test/r26-package-artifacts
test(packaging): exercise package and repository behavior
2026-10-14 11:44:03 -03:00
Vinícius Ferrão aebc350e1a test(probe): exercise the built RPM payload 2026-10-13 11:38:10 -03:00
Vinícius Ferrão 14d0ac27da test(genimage): check driver selection after driver updates 2026-10-13 11:38:09 -03:00
Daniel Hilst be9c063981 Merge pull request #7913 from VersatusHPC/test/r26-ubuntu-image-behavior
test(ubuntu): exercise media imports and genimage behavior
2026-10-13 11:21:29 -03:00
Daniel Hilst abf0f2228f Merge pull request #7935 from VersatusHPC/refactor/r26-package-lifecycle
refactor(packaging): share package lifecycle helpers
2026-10-13 10:00:14 -03:00
Vinícius Ferrão 320a1a1299 test(ubuntu): inspect resolver files in generated initrds
Run the unchanged initrd builder with fixture binaries and inspect both generated archives. Replace source extraction with checks for selected libraries and their contents.
2026-10-12 13:58:45 -03:00
Vinícius Ferrão a4e14299ee test(ubuntu): exercise genimage mirror selection
Read site settings from an isolated database and inspect the sources.list written into the image. Stop at an injected package-metadata failure without downloading packages.
2026-10-12 13:58:45 -03:00
Vinícius Ferrão 5013f85774 test(ubuntu): check debootstrap architecture arguments
Run genimage and inspect the arguments passed to debootstrap instead of evaluating an extracted assignment. Keep the existing ppc64le pass-through explicit.
2026-10-12 13:58:45 -03:00
Vinícius Ferrão 114efc35e1 test(ubuntu): exercise live-media imports and warnings
Replace source-text assertions with real media imports in an isolated filesystem and database. Run the native fixture before the package build in CI.
2026-10-12 13:58:32 -03:00
Vinícius Ferrão eb2df9cb70 test(packaging): stage shared shell scriptlet sources
Signed-off-by: Vinícius Ferrão <2031761+viniciusferrao@users.noreply.github.com>
2026-10-12 12:31:56 -03:00
Daniel Hilst 2b1fb5a090 Merge pull request #7927 from VersatusHPC/test/r26-process-helper
test(process): share command execution across unit tests
2026-10-12 10:31:36 -03:00
Vinícius Ferrão f11b740b56 test(packaging): stage shared Lua scriptlet sources
Signed-off-by: Vinícius Ferrão <2031761+viniciusferrao@users.noreply.github.com>
2026-10-11 11:32:21 -03:00
Vinícius Ferrão 7fdb437ea3 docs(test): describe the shared command runner 2026-10-09 22:43:07 -03:00
Vinícius Ferrão df1fe8c7c9 test(process): share command output and exit status capture 2026-10-09 22:43:06 -03:00
Vinícius Ferrão 3abd11220a test(packaging): exercise RPM service lifecycle 2026-10-09 03:22:46 -03:00
Vinícius Ferrão e83ddfe0d9 test(packaging): exercise Debian service lifecycle 2026-10-09 03:22:46 -03:00
Daniel Hilst 3582c6ab19 fix(xcat-core): xcattest runs no test case on an openEuler management node
xcattest reports "Test case <name> has an invalid OS option - Linux" and then
"There is no valid case to run", so every case is skipped on openEuler.
Recorded on an openEuler 24.03 LTS SP4 management node with xCAT 2.20.0: both
flat provisioning cases were rejected and the run measured nothing.

Two causes, both in the os: comparison in xCAT-test/xcattest. get_current_os
takes the /etc/os-release branch, finds no sles, and falls off the end of that
branch, so it returns the exit status of the failed grep, 256, which names no
distribution. And a case marked os:Linux expands to exactly rhels, sles and
ubuntu, so openEuler would be rejected even by a correct get_current_os.

Both halves move into xCAT::Test::OS. xcattest finds it beside itself and the
package installs it at <prefix>/lib/perl. current_os takes a path prefix, so a
test describes a system by writing release files into a scratch tree. openEuler
is named in both halves and nothing else changes.

xCAT-test/unit/xcattest_os_selection.t covers it. Removing openeuler from
linux_aliases fails two checks, and removing the openEuler branch from
current_os fails three. A further case gives a root both /etc/redhat-release
and an openEuler /etc/os-release and asserts rhels10, so the precedence is
named: openEuler ships neither that file nor /etc/lsb-release.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-09-30 19:59:41 -03:00
Vinícius Ferrão 2f2cabf86e test: centralize repository file reads 2026-08-24 21:50:51 -03:00