2
############################################################################
3
# Purpose: Test of SLURM functionality
4
# Test interuption of salloc while waiting for resource allocation.
6
# Output: "TEST: #.#" followed by "SUCCESS" if test was successful, OR
7
# "FAILURE: ..." otherwise with an explanation of the failure, OR
8
# anything else indicates a failure mode that must be investigated.
9
############################################################################
10
# Copyright (C) 2002-2007 The Regents of the University of California.
11
# Copyright (C) 2008-2010 Lawrence Livermore National Security
12
# Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
13
# Written by Morris Jette <jette1@llnl.gov>
14
# CODE-OCEC-09-009. All rights reserved.
16
# This file is part of SLURM, a resource management program.
17
# For details, see <https://computing.llnl.gov/linux/slurm/>.
18
# Please also read the included file: DISCLAIMER.
20
# SLURM is free software; you can redistribute it and/or modify it under
21
# the terms of the GNU General Public License as published by the Free
22
# Software Foundation; either version 2 of the License, or (at your option)
25
# SLURM is distributed in the hope that it will be useful, but WITHOUT ANY
26
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
27
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
30
# You should have received a copy of the GNU General Public License along
31
# with SLURM; if not, write to the Free Software Foundation, Inc.,
32
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
33
############################################################################
43
send_user "\nWARNING: This test is incompatible with XCPU systems\n"
48
# Spawn initial program via srun
49
# Send the signal while the srun is waiting for a resource allocation
51
set salloc_pid [spawn $salloc -N1 -t1 --begin=noon -v $bin_sleep 1]
53
-re "queued and waiting for resources" {
55
exec $bin_kill -INT $salloc_pid
56
send_user "\nSent SIGINT\n"
59
-re "Job allocation ($number) has been revoked" {
64
send_user "\nFAILURE: salloc not responding\n"
75
send_user "\nFAILURE: salloc failed to process SIGINT while waiting for allocation\n"
82
if {$exit_code == 0} {
83
send_user "\nSUCCESS\n"