imgutils_staged_boot_files.t covers the publication of boot files. The
remaining checks of the unit test openeuler_genimage_bootfiles.t cover
disable_vendor_repositories, so the file now has that name.
The native EL cases checked that genimage keeps copying the kernel into
place before dracut runs, which the next change removes.
The test runs both detect_dhcpd scripts with a fake tcpdump, and its
capture cases need private mount and network namespaces. It now lives in
xCAT-test/native with the other namespace tests, and the pull-request
workflow runs it in its own step. The capture cases keep their own unshare
call, because they add a default route on the loopback interface.
The unit test ran the Debian init helpers in the host shell, with fake
ucf, update-rc.d, systemctl and mv first in the host PATH. It now runs them
with sandbox_run in xCAT-test/native, with the compatibility root apart from
the /etc of the sandbox, and the Debian package lifecycle step runs it.
The unit test sourced scriptlib in the host Bash, with a fake nmcli first
in the host PATH. It now runs the helper with sandbox_run in
xCAT-test/native, and the pull-request workflow runs it in its own step.
copycds must refuse media of one build over a copy of the other, before
it opens any table, and leave the copy unchanged. Media of the same build,
in either case, a target without a copy and x86_64 media must copy on.
An image with kdump.service must get the dump-memory drop-in, once, next
to any site drop-in, and an image without it must get none. systemd itself
must start kdump.service with crashkernel= or fadump= on the command line,
and skip it with neither.
genimage must dispatch an openeuler24.03sp3 riscv64 image to the native
openEuler builder. packimage must pack it, and still refuse it as a
StateLite image.
An EL10 image must turn off the automatic DHCP profiles. An EL9 image
must keep the NetworkManager defaults, and an image without
NetworkManager must get no NetworkManager configuration.
An EL10 image must get a DHCP keyfile for each requested interface,
also when it has a network-scripts directory. Only root can read the
keyfiles, and the interface of the initial ramdisk gets none. A rebuild
must drop the keyfile of an interface that is no longer requested and
keep other profiles. An EL9 image must keep its ifcfg files.
xcattest builds the chtab command for a [Table_*] row with unquoted words and
runs it through /bin/bash -c. A [Table_vm] othersettings value such as
cpumode:host-passthrough;firmware:efi-secureboot ends the command at the
semicolon: chtab receives only the first setting, and bash runs the second as
a command, so the environment setup fails.
Move the command builder from setup_env_by_configure_file into
xCAT::Test::Conf::chtab_command, with the same output, so a test can read the
words chtab receives. xcattest_conf_chtab_command.t splits the command the way
the shell does. Three of its four checks fail on this commit.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
Replay the Get SDR Repository Info reply of an OpenBMC build that clears the
reservation bit. The read asks for the reservation and uses the ID it gets.
An invalid command refusal still reports "SDR reservation unsupported."
against the node, a busy or privilege refusal reports its completion code,
and a BMC that sets the bit is asked as before.
xCAT-server/lib/xcat/plugins/anaconda.pm conflicted in the module
imports: this branch adds "use xCAT::MediaPerms" and master adds
"use xCAT::SELinux" on the same line. Both imports are kept. The two
modules are used in different subs, and no other hunk conflicted.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
python3-scapy was the only Depends of xcat-test that pulled in
python3. With scapy moved to Recommends, apt-get install
--no-install-recommends xcat-test can leave python3 absent, and every
blackboxtest command fails before it starts, not only the DHCP steps.
Add python3 to Depends. xcat_test_scapy_optional.t checks that python3
is a hard Depends, and fails without this change.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
With nodeauthentication off and no peer name, getpostscript used
_xcat_authname as the client identity and expanded it with noderange.
becomeuser and tokens set _xcat_authname to an account name, so a user
named after a node group received the postscripts of the first node in
that group.
xcatd now records the CN of the validated client certificate as
_xcat_certname, and only while no becomeuser or token replaced it. It
deletes any _xcat_certname the client sent. getpostscript uses that
name only when it names exactly one node, with no group or range
expansion. _xcat_authname is no longer a candidate.
getpostscript_client_identity.t drives the plugin with these requests.
On the previous head the group and node login checks fail, and
dropping the exact match fails the group and range checks.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
xcattest applies a conf's [Table_*] blocks itself, once, before the first case
runs, so whatever table_attr returns is what reaches chtab. Its value class was
([\w\.\-]+), which stops at a colon or a slash and writes the truncated value
with no warning: on a management node provisioning over IPv6,
`net=2001:db8:176::/64` reached chtab as `net=2001`, and xcattest re-applied that
junk row on every run. [Table_site] value= has the same hole, so site.master
cannot be an IPv6 address either, and any table value holding a path or a
comma-separated list loses everything after the first slash or colon.
object_attr, beside it in the same module, already accepts ":,;/" -- which is
why an [Object_node] ip= carries an IPv6 address and a [Table_networks] net=
silently could not. table_attr now uses the same class. Both are faithful to
what they replaced: upstream xcattest still matches tables with ([\w\.\-]+) at
line 817 and objects with ([\w\.\-\+\ \/:]+) at line 854, and moving the pair
into xCAT::Test::Conf is what made the asymmetry visible and testable.
The class holds no whitespace and no '#', so a trailing inline comment is still
excluded -- asserted, because that is the behaviour a wider class could have
broken.
xcattest_conf_table_value_class.t covers one line per kind of value a table
holds. Seven of its 22 assertions fail without the fix, including the three IPv6
forms and the absolute path; xcattest_conf_object_attr.t stays green, which is
the control that colons were never meant to be refused.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
With the install dependencies resolved, xCAT installs on the leap15.6 node and
the install gate still fails:
[install] GATE: xcatd running + reachable with NO xcatconfig
GATE FAIL: xcatd not active
GATE FAIL: lsdef cannot reach xcatd
GATE FAIL: site.xcatdport not seeded
journalctl for xcatd has no entries at all, and loading the library by hand on
the node says why:
Can't locate JSON.pm in @INC ... (@INC contains: /opt/xcat/lib/perl ...)
openSUSE has no perl-generators, so no perl(...) requirement is generated for
any xCAT package and nothing installs the modules the code loads. Measured on
xcat20-mn against the 85 external modules the EL build auto-requires: five are
absent -- Date::Parse, Expect, HTML::Form, JSON and SNMP -- and the other 80
are present.
The test names, per spec, the modules that package's openSUSE branch must ask
for, mirroring what EL's generator emits for it. Nine assertions fail because
no spec names them yet.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
xCAT::Test::OS::current_os returns undef on openSUSE. /etc/os-release carries
ID="opensuse-leap" and the word sles appears nowhere in it, so the os-release
arm falls through to its own return undef, and Leap ships none of
/etc/redhat-release, /etc/lsb-release or /etc/SuSE-release to reach another arm.
xcattest then warns "Use of uninitialized value $currentos" four times per case
and rejects all of them: "Test case reg_linux_diskfull_installation_flat has an
invalid OS option - Linux" and "There is no valid case to run". 328 of the
shipped cases declare os:Linux, so an openSUSE management node runs none of
them. The message blames the case, and the cases are skipped rather than
failed, which reports no result at all.
Measured 2026-10-24 on xcat20-mn, an openSUSE Leap 15.6 management node:
current_os answered UNDEF, /etc/os-release holds ID="opensuse-leap" and
VERSION_ID="15.6", and none of the three fallback files exist.
Five assertions fail on this commit: Leap is recognised, at any Leap version,
the older ID="opensuse" spelling, Tumbleweed, and a Leap node matching an
os:Linux case. The fourteen that already existed pass, including the one that
holds the change down -- a distribution whose os-release names neither sles nor
openSUSE is still not recognised.
The same bug was fixed on 2026-09-18 in f7be54a1b, against the chain of greps
xcattest carried before xCAT::Test::OS existed. That branch was never merged,
3582c6ab1 rewrote the routine as a module without it, and its test lifted the
routine out of xcattest with a regex. This test loads the module instead.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
Both openSUSE test cells fail the install step:
leap15.6: nothing provides 'perl-DB_File' needed by xCAT-server
sles12: nothing provides (/usr/sbin/dhcpd if openEuler-release else
((kea and kea-hooks) if (system-release >= 10) else
/usr/sbin/dhcpd)) needed by xCAT
Both requirements are written for EL and have no answer on openSUSE. No
package named perl-DB_File exists on Leap 15.6 or 42.3. The dhcpd expression
is a rich dependency, and the sles12 management node is openSUSE 42.3 with
rpm 4.11, which has none.
The test states what the openSUSE branch of each spec must ask for, and that
no rich dependency reaches an openSUSE build. It also holds down that EL and
openEuler keep the expressions they have. Four of its nine assertions fail
because no spec has an openSUSE branch for these requirements yet.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
Ninety xCAT modules carry
BEGIN { $::XCATROOT = $ENV{XCATROOT} || '/opt/xcat' } use lib "$::XCATROOT/lib/perl";
so the first xCAT module a test loads can put an installed product in front of
the checkout in @INC. A build host has one: xcat-master carries
/opt/xcat/lib/perl/xCAT/DiscoveryUtils.pm. A run that loaded that copy would
pass while measuring a product built weeks ago, and nothing in the test said
otherwise.
The test now reports the file that answered, refuses one under /opt/xcat, and
asserts the routine exists. A stale copy winning @INC lacks it, so the file
goes red instead of passing on three assertions that never ran against this
change.
Measured both ways: on a host with no xCAT the module resolves to
perl-xCAT/xCAT/DiscoveryUtils.pm, and on xcat-master, which has an installed
copy, it still resolves to the checkout -- so the use lib does win today and
this holds that down rather than fixing a live fault.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
xcatd fills _xcat_clienthost and _xcat_clientfqdn from a reverse lookup of the
client socket, so both are empty when that lookup fails, however good the
client credentials are. A plugin that asks only for the peer host therefore
cannot identify a node whose certificate names it correctly.
xCAT::DiscoveryUtils::request_client_names returns the names a request offers,
most trustworthy first: the peer host, its fully qualified form, then
_xcat_authname, which is the name in the validated client certificate and does
not depend on name resolution. The request's own node attribute is excluded on
purpose -- a client sends it, so it states what the client wants to be rather
than what it proved it is, and postscripts carry the cluster root ssh key.
xCAT-test/unit/getpostscript_client_identity.t drives the routine directly: the
request hash is its only input and a list of names its only output. It fails on
five mutants of the routine, each naming the assertion it breaks -- the
certificate name dropped (2 checks), the empty-name guard dropped (1), the
client-supplied node offered (3), the de-duplication dropped (2), and the
array-ref guard dropped (1).
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
The Genesis image runs allowcred.awk, minixcatd.awk and udpcat.awk under its own
/usr/bin/awk. All three open a TCP stream with the gawk |& coprocess and the /inet/
special file, which mawk rejects at parse time. The Ubuntu dracut module stages
/usr/bin/awk from the build root, and on Ubuntu that alternative is mawk.
genesis_ubuntu_awk.bats drives install() from dracut_105/ubuntu/module-setup.sh with the
dracut helpers replaced by stubs, and reads back what the module installs and where awk
in the image points. genesis_ubuntu_build_root.t asks the build root for a gawk package.
genesis_payload_verification.t gives XCAT::GenesisPayload a payload whose awk names
itself mawk.
All three fail on this commit: 3 of 3 bats assertions, 2 of 18 in the build-root test,
3 of 33 in the payload test.
Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>