From ad97129dd5ffae7fde15dcac448df4b234ff7e84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vin=C3=ADcius=20Ferr=C3=A3o?= <2031761+viniciusferrao@users.noreply.github.com> Date: Sun, 6 Sep 2026 23:44:22 -0300 Subject: [PATCH] test(xcat-dep): hold the riscv64 cell to the builder's package set The assertion fails against the previous manifest, naming perl-HTML-Form as the package the cell lacked. It reads the set from the builder, so a package added to the builder later fails here until the cell names it. --- t/riscv64_perl_cell.t | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 t/riscv64_perl_cell.t diff --git a/t/riscv64_perl_cell.t b/t/riscv64_perl_cell.t new file mode 100644 index 0000000..f181b08 --- /dev/null +++ b/t/riscv64_perl_cell.t @@ -0,0 +1,33 @@ +#!/usr/bin/env perl +use strict; +use warnings; + +use FindBin qw($RealBin); +use Test::More; + +use lib $RealBin, "$RealBin/.."; +use MockBuildUtils qw(read_manifest); + +# EL10 riscv64 has no EPEL, so every perl package the builder exists to supply must be pinned in +# the riscv64 cell: an omission there is not filled in by any other repository. perl-HTML-Form +# was missing, and perl-xCAT hard-requires perl(HTML::Form), so `dnf install xCAT` could not +# resolve on riscv64 at all. The set comes from the builder itself, so a package added to it later +# fails here until the cell names it. + +my $builder = "$RealBin/../mockbuild-perl-packages.pl"; +plan skip_all => 'mockbuild-perl-packages.pl not found' unless -f $builder; +plan skip_all => 'Parallel::ForkManager is not available' unless eval { require Parallel::ForkManager; 1 }; + +my @built = grep { length } split /\n/, `perl -I "$RealBin/.." -I "$RealBin/../lib" "$builder" --epel-gap --list-packages 2>/dev/null`; +is( $?, 0, 'the builder lists the packages an --epel-gap run would build' ); +cmp_ok( scalar(@built), '>=', 10, '... and the list is the real one, not an empty run' ); + +my %m = read_manifest("$RealBin/../packages-manifest.conf"); +my $cell = $m{'rocky-10-riscv64-xcat'}; +ok( $cell, 'the manifest has the riscv64 cell' ); + +my @unpinned = grep { !defined $cell->{$_} } @built; +is_deeply( \@unpinned, [], 'every package the builder supplies is pinned in the riscv64 cell' ) + or diag( "missing from [rocky-10-riscv64-xcat]: @unpinned" ); + +done_testing;