2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-09-10 19:46:24 +00:00

test(xCAT-test): cover riscv64 Ubuntu media

Pin the kernel and initrd the riscv64 live image carries, that the kernel name
the other live images use is not accepted for it, and that the architecture the
media reports maps to riscv64 in both directions.

Signed-off-by: Vinícius Ferrão <2031761+viniciusferrao@users.noreply.github.com>
This commit is contained in:
Vinícius Ferrão
2026-09-04 11:23:48 -03:00
parent 4e36e1a9f2
commit d09452c0b9
2 changed files with 16 additions and 0 deletions
+4
View File
@@ -38,6 +38,10 @@ is(xCAT::Utils->xcat_arch_from_debian('ppc64el'), 'ppc64el',
'POWER LE media keeps the Debian name xCAT uses for Ubuntu');
is(xCAT::Utils->xcat_arch_from_debian('powerpc'), 'ppc64',
'POWER BE media installs ppc64 nodes');
is(xCAT::Utils->xcat_arch_from_debian('riscv64'), 'riscv64',
'riscv64 media installs riscv64 nodes');
is(xCAT::Utils->debian_arch('riscv64'), 'riscv64',
'Debian and xCAT agree on the riscv64 name');
is(xCAT::Utils->xcat_arch_from_debian('nonesuch'), undef,
'media xCAT has no name for resolves to nothing');
is(xCAT::Utils->xcat_arch_from_debian(''), undef,
@@ -91,6 +91,18 @@ is(
'POWER does not accept the x86 live layout',
);
# --- riscv64 -------------------------------------------------------------
is(
resolved('riscv64', 'riscv64', media('casper/vmlinux', 'casper/initrd')),
'casper/vmlinux|casper/initrd',
'the riscv64 live image keeps its kernel under a different name',
);
is(
resolved('riscv64', 'riscv64', media('casper/vmlinuz', 'casper/initrd')),
undef,
'riscv64 does not accept the kernel name the other live images use',
);
# --- nothing to boot -------------------------------------------------------
is(resolved('x86_64', 'amd64', media('casper/vmlinuz')), undef,
'a kernel without its initrd is not a match');