From 28e447bb2ea5bb72cf2f21f231463024a09a8682 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vin=C3=ADcius=20Ferr=C3=A3o?= <2031761+viniciusferrao@users.noreply.github.com> Date: Mon, 2 Nov 2026 15:07:10 -0300 Subject: [PATCH] test(anaconda): publish an upper-case riscv64 media boot loader openEuler media carry EFI/BOOT/grubriscv64.EFI. copycds must publish it as grub2.riscv64. --- xCAT-test/unit/copycd_grub2_loader.t | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/xCAT-test/unit/copycd_grub2_loader.t b/xCAT-test/unit/copycd_grub2_loader.t index f663beacc8..3e479ca27f 100644 --- a/xCAT-test/unit/copycd_grub2_loader.t +++ b/xCAT-test/unit/copycd_grub2_loader.t @@ -94,4 +94,15 @@ is( scalar xCAT_plugin::anaconda::_install_media_grub2_loader( $bare_media, 'ris is( messages( \@responses ), '', 'media without a grub2 image report nothing' ); ok( !-d File::Spec->catdir( $tftpdir, 'boot' ), 'media without a grub2 image create no directories' ); +# openEuler spells the image grubriscv64.EFI; UEFI names are case-insensitive +$tftpdir = File::Spec->catdir( $root, 'tftpboot-openeuler' ); +make_path($tftpdir); +my $oe_media = media( $root, 'openeuler24.03sp3-riscv64', 'grubriscv64.EFI' ); +@responses = (); +$loader = File::Spec->catfile( $tftpdir, 'boot', 'grub2', 'grub2.riscv64' ); +is( scalar xCAT_plugin::anaconda::_install_media_grub2_loader( $oe_media, 'riscv64', sub { push @responses, @_; } ), + $loader, 'an upper-case image name is published as the riscv64 boot loader' ); +is( -f $loader ? read_text($loader) : undef, "boot loader from the media\n", + 'the published image is the one from the openEuler media' ); + done_testing();