2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-09-05 12:37:54 +00:00
Commit Graph

2642 Commits

Author SHA1 Message Date
Vinícius Ferrão 96d682312c test(ipmi): cover ambiguous IPv4 literal rejection 2026-08-31 13:29:08 -03:00
Vinícius Ferrão 8e7d0dd7e4 test(ipmi): cover IPv4 command encoding 2026-08-31 12:35:38 -03:00
Vinícius Ferrão 87103dd1f3 test(xcatd): cover command response state reset 2026-08-29 17:41:03 -03:00
Vinícius Ferrão 5d9d7403b7 test(xcatd): exercise command log response module 2026-08-29 17:15:23 -03:00
Vinícius Ferrão 4c909bd24a test(xcatd): prepare command log module loading 2026-08-29 16:49:55 -03:00
Vinícius Ferrão 41a0a7c613 Merge pull request #7778 from VersatusHPC/fix/rpm-preserve-xcat-conf
fix(rpm): preserve local xcat.conf changes across upgrades
2026-08-29 16:46:09 -03:00
Vinícius Ferrão fc9a94edb6 Merge pull request #7765 from VersatusHPC/refactor/genimage-shared-os-version-parser
refactor(genimage): reuse shared OS version parser
2026-08-29 16:45:41 -03:00
Vinícius Ferrão c878dbf808 Merge pull request #7747 from VersatusHPC/fix/template-default-httpport
fix(template): omit the default HTTP port from installer URLs
2026-08-29 16:45:16 -03:00
Daniel Hilst 50257ff136 Merge pull request #7748 from VersatusHPC/fix/mellanox-mlx5-netdriver
fix(genimage): resolve Mellanox drivers from the target kernel
2026-08-28 18:11:29 -03:00
Daniel Hilst 4625505b8e Merge pull request #7771 from VersatusHPC/refactor/string-utils
refactor(utils): centralize policy string trimming
2026-08-28 17:42:03 -03:00
Daniel Hilst 3c209888df Merge pull request #7770 from VersatusHPC/refactor/test-file-writing
test: reuse File::Slurper for fixture files
2026-08-28 17:40:34 -03:00
Daniel Hilst 1ba53dc7f8 Merge pull request #7754 from VersatusHPC/fix/centos8-minor-version-detection
fix(anaconda): read the CentOS Linux minor version from the release package
2026-08-28 17:38:16 -03:00
Vinícius Ferrão 999f18eacd Merge pull request #7737 from VersatusHPC/fix/cmdlog-response-classifier
fix(xcatd): classify secret responses by the shared secret set
2026-08-28 17:34:56 -03:00
Daniel Hilst a9a2c1f74e Merge pull request #7732 from VersatusHPC/fix/noderange-preauth
fix(xcatd): refuse the noderange ^file operator on unauthenticated requests
2026-08-28 17:32:33 -03:00
Daniel Hilst ff06b9f9ae Merge pull request #7731 from VersatusHPC/fix/xcatver-mismatch
fix(xcatd): only call a same-release build difference a build difference
2026-08-28 17:28:30 -03:00
Vinícius Ferrão dffaa1e0c6 test(postscripts): require package utility loading 2026-08-28 16:22:54 -03:00
Vinícius Ferrão ee18db925a test(genimage): cover Mellanox InfiniBand defaults 2026-08-28 14:32:48 -03:00
Vinícius Ferrão ac293c66cb test(genimage): cover target-kernel Mellanox resolution 2026-08-28 12:48:17 -03:00
Vinícius Ferrão ccf9152bd9 test(rpm): pin xcat.conf upgrade preservation
Cover the packaging rules that keep a locally modified xcat.conf across
an upgrade, for the management-node and service-node specs alike: both
active paths owned as %config(noreplace), the build-time selection of
the Apache 2.4 source into the active payload, %post no longer removing
or overwriting the active file, and the migration living in %pretrans,
returning early on a fresh install, accepting only a regular file, and
removing it only when its contents still match a saved template.

The assertions pin the ordering of those guards instead of searching for
isolated tokens, so moving the migration back to %pre or letting it
delete a customised file fails the test.
2026-08-27 02:34:56 -03:00
Vinícius Ferrão 5cb3e6ab52 test(genimage): cover EL version parsing
Signed-off-by: Vinícius Ferrão <2031761+viniciusferrao@users.noreply.github.com>
2026-08-26 18:30:44 -03:00
Vinícius Ferrão be8e033cbe test: reuse File::Slurper for fixture files 2026-08-26 15:17:52 -03:00
Vinícius Ferrão 88007e77c7 test(template): pin the installer HTTP port suffix
Add a unit test for the routine that makes the port part of a URL. The test
lifts the routine out of the module source, because the module needs a
database to load.

The test shows that the default port gives no text, that another port gives
a colon and the port, and that a port that is not set gives no text. It also
shows that the four places that write a URL read the port through the
routine.
2026-08-26 14:53:34 -03:00
Vinícius Ferrão 5fb762f2b6 test(xcatd): cover the secret set response classification
Extract secret_in_request, secret_in_response and the secret sets from
xcatd.pm, because the classifier and the finalizer consult them. Cover
the authentication key, the privacy key and the snmpc site value reads
as sensitive, the token, prodkey and site table dumps as sensitive, the
nodels expansion of a secret table as sensitive, the lsvm directory
listing as sensitive, and the implicit lsdef attribute listing as
redacted. Keep a plain site value, a benign table,
a benign object listing and a group named like a table as not
sensitive. Assert that the daemon redacts each request segment alone.
2026-08-26 14:53:34 -03:00
Vinícius Ferrão bd55c0bf1e test(anaconda): pin the CentOS Linux minor version from the media
Build a medium for each CentOS Linux 8 release from the package names that
the release gives, and make sure that copycds finds the minor version.

Pin the behaviour when the medium gives no release package, and make sure
that a package with the same centos-release prefix, or a package for a
different major version, does not give a version. Pin that a medium that
names two minor versions keeps the unversioned name. Pin that CentOS Stream,
Rocky Linux, AlmaLinux, Red Hat Enterprise Linux and Oracle Linux keep
their own branches.
2026-08-26 14:23:19 -03:00
Vinícius Ferrão b2ad18137b Merge pull request #7766 from VersatusHPC/refactor/routeop-helper-reuse
refactor(routeop): reuse route classification helpers
2026-08-26 11:11:44 -03:00
Daniel Hilst b4c7936cc6 Merge pull request #7764 from VersatusHPC/refactor/dhcp-shared-os-version-parsing
refactor(dhcp): reuse shared OS version parsing
2026-08-26 11:09:02 -03:00
Daniel Hilst e8b0620345 Merge pull request #7757 from VersatusHPC/refactor/template-shared-ubuntu-version-comparison
refactor(template): use shared Ubuntu version comparison
2026-08-26 11:06:31 -03:00
Vinícius Ferrão 2dc4afd903 Merge pull request #7741 from stanford-rc/genpdu
feat: add `genpdu` pdutype for generic SNMP PDUs (PDU2-MIB)
2026-08-26 00:14:25 -03:00
Kilian Cavalotti 0b4695eef2 Accept MIB labels for genpdu enumerated values
With PDU2-MIB loaded, SNMP.pm returns an enumerated INTEGER as its label
rather than its number: a PX4 answers inletSensorUnits with "amp" rather
than "2". That failed the numeric test, fell back to none(-1) and
dropped the unit suffix from every rvitals reading.

Add pdu2_enum, which accepts the number, the label, or the label(value)
form Net-SNMP produces with quick printing off, and use it for the
sensor units and for outletSwitchingState.

Also stop requiring the switching probe to read on or off. An outlet can
be in any SensorStateEnumeration state, and pdu2_get has already ruled
out an absent instance, so any answer proves the outlet is switchable.

Signed-off-by: Kilian Cavalotti <kilian@stanford.edu>
2026-08-25 17:44:23 -07:00
Daniel Hilst ab7813e3e6 Merge pull request #7746 from VersatusHPC/fix/blade-findme-chassis-filter
fix(blade): let a discovery request reach the findme handler
2026-08-25 20:26:47 -03:00
Vinícius Ferrão 763c90c116 test(discovery): cover shared findme decisions 2026-08-25 19:46:04 -03:00
Vinícius Ferrão 875f7d764d test(discovery): prepare shared findme helper loading 2026-08-25 19:33:08 -03:00
Vinícius Ferrão 6752cc9ce2 test(rspconfig): call the per-BMC helper directly 2026-08-25 18:47:11 -03:00
Vinícius Ferrão 0a8281880d test(blade): call the findme helpers directly 2026-08-25 18:47:10 -03:00
Vinícius Ferrão e10620c02f test(rspconfig): prepare direct helper loading 2026-08-25 18:40:56 -03:00
Vinícius Ferrão 07e591424f test(blade): prepare direct helper loading 2026-08-25 18:40:56 -03:00
Vinícius Ferrão 777fcfe561 test(blade): pin that a discovery request reaches the handler
Add a unit test for the entry decision of the blade preprocessor. The test
lifts the entry out of the plugin source and drives it, because the plugin
needs a management node to load in full.

The test gives the entry the request that a booting node sends, which names
no node, and shows that the entry hands it on and answers no error. It also
shows that a request for another command without a noderange is still
refused.
2026-08-25 18:40:56 -03:00
Vinícius Ferrão 8a64b224a3 test(rspconfig): cover one network value per BMC
Extract per_bmc_argument and the set of settings that take a list from
ipmi.pm, and drive the real routine, because the plugin needs daemon
dependencies that the test host does not have.

Cover a single value serving every BMC, a list read in session order, a
list too short for the BMC being configured, empty entries, and the
defensive inputs. Assert that only ip, netmask and gateway read a list,
that the caller reports a short list rather than sending it, that the
session keeps the value of its own BMC for the follow-up, and that the
thermal profile keeps its own argument.
2026-08-25 18:40:56 -03:00
Vinícius Ferrão cbf5cb3dae test(blade): pin which rows of the mp table are blades
Add a unit test for the routine that selects the blades. The test lifts the
routine out of the plugin source, because the plugin needs a management node
to load.

The test gives the routine the row shapes that the writers of the mp table
make: a management module and its blades from xCAT::PPCdb::add_systemX and
the shipped mp template, a chassis that gives its hardware type, and one row
for each hardware type that lsslp writes. It also shows that the handler
reads the chassis attribute and that it stops before the arp table when the
mp table holds no blades.
2026-08-25 18:40:56 -03:00
Vinícius Ferrão e8902990e2 test: cover shared string trimming 2026-08-25 13:14:20 -03:00
Vinícius Ferrão 8fadd0664e test(genesis): cover reviewed edge cases
Signed-off-by: Vinícius Ferrão <2031761+viniciusferrao@users.noreply.github.com>
2026-08-25 11:27:13 -03:00
Vinícius Ferrão 114faaae85 test(genesis): load plugin from library path
Signed-off-by: Vinícius Ferrão <2031761+viniciusferrao@users.noreply.github.com>
2026-08-25 11:26:47 -03:00
Vinícius Ferrão 9edbbc1817 test(genesis): use explicit fractional sleep
Signed-off-by: Vinícius Ferrão <2031761+viniciusferrao@users.noreply.github.com>
2026-08-25 11:26:47 -03:00
Vinícius Ferrão 200302ca03 test(genesis): cover stale initramfs selection
Signed-off-by: Vinícius Ferrão <2031761+viniciusferrao@users.noreply.github.com>
2026-08-25 11:26:47 -03:00
Vinícius Ferrão ecce32a3d6 test(genesis): cover offline repository gaps 2026-08-25 11:26:46 -03:00
Vinícius Ferrão 14c45107d0 test(genesis): cover final review gaps 2026-08-25 11:26:46 -03:00
Vinícius Ferrão f853d52b98 test(genesis): cover release review gaps 2026-08-25 11:26:45 -03:00
Vinícius Ferrão d43bda0005 test(genesis): cover final consumer gaps 2026-08-25 11:26:45 -03:00
Vinícius Ferrão 3fa8446d08 test(genesis): cover boot consumer gaps 2026-08-25 11:26:45 -03:00
Vinícius Ferrão f319f0fea3 test(genesis): mark intentional helper evaluation 2026-08-25 11:26:45 -03:00