2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-11-19 08:52:15 +00:00

test(build): limit the upgrade log allocation fault

This commit is contained in:
Vinícius Ferrão
2026-10-22 17:13:26 -03:00
parent b6f9294a79
commit a7d7b85c7c
+7 -1
View File
@@ -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");