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:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user