From 27fdca22a85a98ce0f899f867516fd81d6280a31 Mon Sep 17 00:00:00 2001 From: Daniel Hilst <392820+dhilst@users.noreply.github.com> Date: Wed, 21 Oct 2026 19:30:21 -0300 Subject: [PATCH] fix(xcat-test): the xcatmn probe case reports an empty output as a failure The case ran xcatprobe xcatmn through grep -i selinux and checked the rc of the pipeline. Nothing in the output named SELinux, so grep exited 1, the case failed with an empty output, and the log carries no checkpoint and no reason. The probe prints every checkpoint, so the diagnostics existed and the filter threw them away. The case now runs the probe with -H, which runs the checks on this node instead of dispatching them, and keeps the whole output. It asserts that the SELinux checkpoint is marked [ OK ] and is not marked [FAIL], which xcatprobe writes for a checkpoint that passes and one that fails. It no longer asserts the rc of the probe: a management node under test can report another checkpoint as a problem, and that is not this case. probe_xcatmn_selinux_case.t fails 3 of its 11 checks without this change, on rome01. Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com> --- xCAT-test/autotest/testcase/probe/xcatmn | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/xCAT-test/autotest/testcase/probe/xcatmn b/xCAT-test/autotest/testcase/probe/xcatmn index 6dae5014df..fc4ac30736 100644 --- a/xCAT-test/autotest/testcase/probe/xcatmn +++ b/xCAT-test/autotest/testcase/probe/xcatmn @@ -1,7 +1,7 @@ start:xcatprobe_xcatmn_selinux -description:To test if xcatprobe xcatmn reports the SELinux mode of the management node, and does not report that mode as a failure. This case must run in xcat mn +description:To test if xcatprobe xcatmn reports the SELinux policy of the management node, and does not report it as a problem. The output is not filtered, so a failure of any checkpoint is in the log. -H runs the checks on this node, instead of dispatching them. This case must run in xcat mn label:mn_only,ci_test -cmd:xcatprobe xcatmn 2>&1 | grep -i selinux -check:rc==0 -check:output!~FAIL +cmd:xcatprobe xcatmn -H 2>&1 +check:output=~Checking SELinux policy for xCAT\.\.\..*\[ OK \] +check:output!~Checking SELinux policy for xCAT\.\.\..*\[FAIL\] end