From 33fee7bb0d98efedc3fa83621ccfa4324e492191 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vin=C3=ADcius=20Ferr=C3=A3o?= <2031761+viniciusferrao@users.noreply.github.com> Date: Wed, 21 Oct 2026 17:39:28 -0300 Subject: [PATCH] test(netboot): resolve the shell mount target in profile tests Older bubblewrap releases reject a symlink mount destination. Bind Bash over the resolved shell path without changing the profile cases. --- xCAT-test/native/netboot_profile_riscv64.t | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/xCAT-test/native/netboot_profile_riscv64.t b/xCAT-test/native/netboot_profile_riscv64.t index be5109d4c9..9d92e00e01 100644 --- a/xCAT-test/native/netboot_profile_riscv64.t +++ b/xCAT-test/native/netboot_profile_riscv64.t @@ -4,6 +4,8 @@ use warnings; ## no critic (Modules::RequireFilenameMatchesPackage) use FindBin; +use Cwd qw(abs_path); +use File::Basename qw(basename); use lib "$FindBin::Bin/../lib"; use lib "$FindBin::Bin/../../perl-xCAT"; use lib "$FindBin::Bin/../../xCAT-server/lib/perl"; @@ -80,7 +82,7 @@ for my $family (@families) { for my $pass (1, 2) { # EL uses Bash as /bin/sh for these postinstall scripts. my ($status, $output) = sandbox_run($root, - {read_only => {repo_path('.') => repo_path('.'), '/bin/bash' => '/bin/sh'}}, + {read_only => {repo_path('.') => repo_path('.'), '/bin/bash' => '/bin/' . basename(abs_path('/bin/sh'))}}, $postinstall, '/target', $osver, 'riscv64', $profile); is($status, 0, "pass $pass executes the selected script") or diag($output); is(read_text("$root/etc/fstab"), "host fstab\n", "pass $pass leaves the host fstab unchanged");