From cdb8187cbcffb47a2d3a47ea5020c627a51a53c1 Mon Sep 17 00:00:00 2001 From: Daniel Hilst <392820+dhilst@users.noreply.github.com> Date: Sat, 7 Nov 2026 20:15:32 -0300 Subject: [PATCH] fix(xcat-test): the SELinux diskless case cannot find an iPXE node boot config selinux_cn_diskless_disabled_by_design looks for the boot configuration of the compute node in three places: the xnba node directory, pxelinux.cfg by node name, and petitboot. A node with netboot=ipxe has its script in /tftpboot/xcat/ipxe/nodes/.uefi instead, which the list does not name, so the case reports BOOTCFG-BAD: the node has no boot configuration BOOTCFG-BAD: no boot configuration carries selinux=0 and fails on every iPXE cell. xcat54-cn of el10-x86_64-devel is netboot=ipxe, so build 78 of xcat-test-el10-x86_64 failed there after its other checks passed: the node reported SELinux disabled and the case still could not confirm the flag reached the boot configuration. Both path lists now name the iPXE script, the UEFI one first, which is the file a UEFI client fetches. nodeset/ipxe_secureboot_shim.sh already reads that path. The paths stay absolute, so the check still fails when no boot configuration carries selinux=0. Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com> --- xCAT-test/autotest/testcase/selinux/cases1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xCAT-test/autotest/testcase/selinux/cases1 b/xCAT-test/autotest/testcase/selinux/cases1 index 5a6f51a32f..524841bac0 100644 --- a/xCAT-test/autotest/testcase/selinux/cases1 +++ b/xCAT-test/autotest/testcase/selinux/cases1 @@ -61,7 +61,7 @@ cmd:nodeset $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-net check:rc==0 check:output=~SELinux is disabled check:output=~cannot label its RAM root -cmd:sh -c 'ok=0; seen=0; for f in /tftpboot/xcat/xnba/nodes/$$CN /tftpboot/pxelinux.cfg/$$CN /tftpboot/petitboot/$$CN; do [ -f "$f" ] || continue; seen=1; if grep -q "selinux=0" "$f"; then ok=1; echo "BOOTCFG-OK: $f"; else echo "BOOTCFG-NOFLAG: $f"; fi; done; [ "$seen" = 1 ] || echo "BOOTCFG-BAD: the node has no boot configuration"; [ "$ok" = 1 ] || echo "BOOTCFG-BAD: no boot configuration carries selinux=0"' +cmd:sh -c 'ok=0; seen=0; for f in /tftpboot/xcat/ipxe/nodes/$$CN.uefi /tftpboot/xcat/ipxe/nodes/$$CN /tftpboot/xcat/xnba/nodes/$$CN /tftpboot/pxelinux.cfg/$$CN /tftpboot/petitboot/$$CN; do [ -f "$f" ] || continue; seen=1; if grep -q "selinux=0" "$f"; then ok=1; echo "BOOTCFG-OK: $f"; else echo "BOOTCFG-NOFLAG: $f"; fi; done; [ "$seen" = 1 ] || echo "BOOTCFG-BAD: the node has no boot configuration"; [ "$ok" = 1 ] || echo "BOOTCFG-BAD: no boot configuration carries selinux=0"' check:output=~BOOTCFG-OK: check:output!~BOOTCFG-BAD: cmd:/opt/xcat/share/xcat/tools/autotest/testcase/commoncmd/retry_install.sh $$CN __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute @@ -200,7 +200,7 @@ check:rc==0 cmd:nodeset $$CN osimage=$$STATELITE check:rc==0 check:output=~SELinux is disabled -cmd:sh -c 'grep -rh "selinux=0" /tftpboot/xcat/xnba/nodes/$$CN /tftpboot/pxelinux.cfg/$$CN /tftpboot/petitboot/$$CN 2>/dev/null | wc -l' +cmd:sh -c 'grep -rh "selinux=0" /tftpboot/xcat/ipxe/nodes/$$CN.uefi /tftpboot/xcat/ipxe/nodes/$$CN /tftpboot/xcat/xnba/nodes/$$CN /tftpboot/pxelinux.cfg/$$CN /tftpboot/petitboot/$$CN 2>/dev/null | wc -l' check:rc==0 check:output!~^0$ cmd:chdef -t node -o $$CN selinux=