From 28e59642ca872e987baa5fa74bf3576ff5cf9ec8 Mon Sep 17 00:00:00 2001 From: Daniel Hilst <392820+dhilst@users.noreply.github.com> Date: Mon, 14 Sep 2026 08:23:53 -0300 Subject: [PATCH] style(xcat-core): the boot-file test comments retell the bug report Three comments in debian_install_boot_files.t explain more than the code hides. One narrates the media table the assertions already list. One repeats the nodeset error message and the releases that produce it. One describes what mkinstall used to refuse before the change. A comment states why, once, where the reader cannot re-derive it. Each of the three now carries only the fact the assertions do not show. Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com> --- xCAT-test/unit/debian_install_boot_files.t | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/xCAT-test/unit/debian_install_boot_files.t b/xCAT-test/unit/debian_install_boot_files.t index 3bcbcfd31..d866c36b2 100644 --- a/xCAT-test/unit/debian_install_boot_files.t +++ b/xCAT-test/unit/debian_install_boot_files.t @@ -7,10 +7,9 @@ use File::Temp qw(tempdir); use FindBin; use Test::More; -# The installer kernel and initrd sit in a different place on every Ubuntu media layout: -# netboot trees name them after the Debian architecture, live images keep them under -# casper, and a hardware-enablement kernel ships beside the release one. Build each layout -# on disk and ask the resolver, rather than reading the table that describes them. +# The installer kernel and initrd sit in a different place on every Ubuntu media layout. +# Build each layout on disk and ask the resolver, rather than read the table that +# describes them. use lib "$FindBin::Bin/../../perl-xCAT"; use lib "$FindBin::Bin/../../xCAT-server/lib/perl"; @@ -103,10 +102,9 @@ is( 'riscv64 does not accept the kernel name the other live images use', ); -# The Ubuntu ppc64el live-server ISO carries no netboot tree at all. 22.04 and 24.04 ship -# casper/hwe-vmlinux + casper/hwe-initrd beside casper/vmlinux + casper/initrd; 26.04 ships -# the release pair only. Without these entries nodeset stops the diskful install with -# "The network boot initrd.gz is not found in /install/netboot". +# The Ubuntu ppc64el live-server ISO carries no netboot tree. 22.04 and 24.04 ship the +# hardware-enablement pair under casper beside the release pair; 26.04 ships the release +# pair only. is( resolved('ppc64le', 'ppc64el', media('casper/vmlinux', 'casper/initrd')), 'casper/vmlinux|casper/initrd', @@ -127,8 +125,7 @@ is( 'a POWER netboot tree still wins over a live image on the same media', ); -# mkinstall refused POWER media that carried no install/netboot/initrd.gz, whatever -# install_boot_files could resolve. One routine answers the question now. +# mkinstall asks this routine, so it accepts every media install_boot_files resolves. can_ok('xCAT_plugin::debian', 'install_media_is_bootable'); is( xCAT_plugin::debian::install_media_is_bootable('ppc64le', 'ppc64el',