mirror of
https://github.com/xcat2/xcat-core.git
synced 2026-10-02 08:51:44 +00:00
3582c6ab19
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>