From 9fc610ee94d02c656e0486e77a5b600c1a9fd3e3 Mon Sep 17 00:00:00 2001 From: Daniel Hilst <392820+dhilst@users.noreply.github.com> Date: Tue, 15 Sep 2026 21:11:18 -0300 Subject: [PATCH] fix(xcat-core): ubuntu_genimage_initrd_firmware.t passes when the file it reads is missing ubuntu_genimage_initrd_firmware.t called plan skip_all when xCAT-server/share/xcat/netboot/ubuntu/genimage was absent, so a checkout that lost the file reported 0 tests and exit 0. A test that cannot fail measures nothing. Die instead, which is what makentp_ntp_deps.t already does for setupntp. With xCAT-server/share/xcat/netboot/ubuntu/genimage moved aside the file now exits 2 and prints "genimage not found at "; before this change it exited 0 and printed "1..0 # SKIP genimage not found at ". With the file present the test passes either way. Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com> (cherry picked from commit 3c104421a28fc354a00b90ce27619487dc60960c) --- xCAT-test/unit/ubuntu_genimage_initrd_firmware.t | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xCAT-test/unit/ubuntu_genimage_initrd_firmware.t b/xCAT-test/unit/ubuntu_genimage_initrd_firmware.t index b51bc6ba1..8408545b9 100755 --- a/xCAT-test/unit/ubuntu_genimage_initrd_firmware.t +++ b/xCAT-test/unit/ubuntu_genimage_initrd_firmware.t @@ -15,7 +15,7 @@ use Test::More; my $repo_root = File::Spec->rel2abs(File::Spec->catdir($FindBin::Bin, '..', '..')); my $genimage = File::Spec->catfile( $repo_root, 'xCAT-server', 'share', 'xcat', 'netboot', 'ubuntu', 'genimage'); -plan skip_all => "genimage not found at $genimage" unless -f $genimage; +die "genimage not found at $genimage\n" unless -f $genimage; my $src = do { local $/; open my $fh, '<', $genimage or die $!; <$fh> };