From bbd1a7e9d3b044687a18d7f174568e7dbb34d3ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vin=C3=ADcius=20Ferr=C3=A3o?= <2031761+viniciusferrao@users.noreply.github.com> Date: Fri, 21 Aug 2026 00:23:19 -0300 Subject: [PATCH] test(getinstdisk): cover the Xen disk scan Cover a guest whose only disk is a Xen disk, which the scan has to select rather than leave to the fallback, and a guest with two Xen disks, where the driver group decides. Against the previous filter both cases fail. --- xCAT-test/unit/getinstdisk_selection.t | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/xCAT-test/unit/getinstdisk_selection.t b/xCAT-test/unit/getinstdisk_selection.t index cb4dfa55d..b207e4931 100644 --- a/xCAT-test/unit/getinstdisk_selection.t +++ b/xCAT-test/unit/getinstdisk_selection.t @@ -130,6 +130,15 @@ selects( '/dev/nvme0n1', 'an NVMe device is selected from the last group', # No usable disk falls back to the documented default. selects( '/dev/sda', 'no disks fall back to the default' ); +# A Xen guest presents xvd names. The scan has to see them, because the +# fallback below it would take the first one without looking. +selects( '/dev/xvda', 'a Xen disk is scanned rather than assumed', + xvda => { driver => 'vbd' } ); + +selects( '/dev/xvdb', 'the better driver group wins among Xen disks', + xvda => { driver => 'vbd' }, + xvdb => { driver => 'ahci' } ); + # Every installer includes the one script, which carries the fallbacks and the # logging that the separate RHEL 10 copy used to hold on its own. my $common = slurp( $scripts[0] );