From a7d7b85c7cfeded02134ebe3b83d99872fcfc652 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vin=C3=ADcius=20Ferr=C3=A3o?= <2031761+viniciusferrao@users.noreply.github.com> Date: Thu, 22 Oct 2026 17:13:26 -0300 Subject: [PATCH] test(build): limit the upgrade log allocation fault --- xCAT-test/native/package_upgrade_logging.t | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/xCAT-test/native/package_upgrade_logging.t b/xCAT-test/native/package_upgrade_logging.t index e387c4a685..b6e233ee26 100644 --- a/xCAT-test/native/package_upgrade_logging.t +++ b/xCAT-test/native/package_upgrade_logging.t @@ -57,7 +57,13 @@ SHELL my $failed = $case eq 'command-failure' || $case eq 'warning-failure'; $root->write('/command-status', "17\n") if $failed; if ($case eq 'temporary-failure') { - $root->write('/test-bin/mktemp', "#!/bin/sh\necho 'temporary allocation failed' >&2\nexit 19\n", 0755); + $root->write('/test-bin/mktemp', <<'SH', oct('755')); +#!/bin/sh +case "$1" in + /tmp/xcat-upgrade.*) echo 'temporary allocation failed' >&2; exit 19 ;; +esac +exec /usr/bin/mktemp "$@" +SH } for my $service (qw(installservice udpservice mainservice)) { $root->write("/tmp/xcat/$service.pid", "$service pid\n");