mirror of
https://github.com/xcat2/xcat-core.git
synced 2026-11-21 09:52:17 +00:00
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.
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user