2
############################################################################
3
# Purpose: Test of priority multifactor algo to get correct decay and
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.
10
# Note: This script generates and then deletes files in the working directory
12
############################################################################
13
# Copyright (C) 2009 Lawrence Livermore National Security.
14
# Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
15
# Written by Danny Auble <da@llnl.gov>
16
# CODE-OCEC-09-009. All rights reserved.
18
# This file is part of SLURM, a resource management program.
19
# For details, see <https://computing.llnl.gov/linux/slurm/>.
20
# Please also read the included file: DISCLAIMER.
22
# SLURM is free software; you can redistribute it and/or modify it under
23
# the terms of the GNU General Public License as published by the Free
24
# Software Foundation; either version 2 of the License, or (at your option)
27
# SLURM is distributed in the hope that it will be useful, but WITHOUT ANY
28
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
29
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
32
# You should have received a copy of the GNU General Public License along
33
# with SLURM; if not, write to the Free Software Foundation, Inc.,
34
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
35
############################################################################
40
set test_prog "test$test_id.prog"
45
# Delete left-over programs and rebuild them
47
file delete $test_prog
49
send_user "build_dir is $build_dir\n"
51
send_user "$bin_cc ${test_prog}.c -ldl -lntbl -fno-gcse -fno-strict-aliasing -Wl,-brtl -Wl,-bgcbypass:1000 -Wl,-bexpfull -Wl,-bmaxdata:0x70000000 -Wl,-brtl -g -lpthreads -o ${test_prog} -I${build_dir} -I${src_dir} ${build_dir}/src/api/libslurm.o ${build_dir}/src/slurmctld/locks.o ${build_dir}/src/sshare/process.o\n"
52
exec $bin_cc ${test_prog}.c -ldl -lntbl -fno-gcse -fno-strict-aliasing -Wl,-brtl -Wl,-bgcbypass:1000 -Wl,-bexpfull -Wl,-bmaxdata:0x70000000 -Wl,-brtl -g -lpthreads -o ${test_prog} -I${build_dir} -I${src_dir} ${build_dir}/src/api/libslurm.o ${build_dir}/src/slurmctld/locks.o ${build_dir}/src/sshare/process.o
54
send_user "$bin_cc ${test_prog}.c -g -pthread -o ${test_prog} -I${build_dir} -I${src_dir} ${build_dir}/src/api/libslurm.o ${build_dir}/src/slurmctld/locks.o ${build_dir}/src/sshare/process.o -ldl -export-dynamic \n"
55
exec $bin_cc ${test_prog}.c -g -pthread -o ${test_prog} -I${build_dir} -I${src_dir} ${build_dir}/src/api/libslurm.o ${build_dir}/src/slurmctld/locks.o ${build_dir}/src/sshare/process.o -ldl -export-dynamic
57
exec $bin_chmod 700 $test_prog
59
# Usage: test24.1.prog
63
send_user "This error is expected. No worries.\n"
66
"error: Can't save decay state" {
67
send_user "This error is expected. No worries.\n"
70
"AccountA||40|0.400000|45|0.450000|0.450000|" {
74
"AccountB||30|0.300000|20|0.200000|0.387500|" {
78
"AccountB|User1|1|0.300000|20|0.200000|0.387500|" {
82
"AccountC||10|0.100000|25|0.250000|0.300000|" {
86
"AccountC|User2|1|0.050000|25|0.250000|0.275000|" {
90
"AccountC|User3|1|0.050000|0|0.000000|0.150000|" {
94
"AccountD||60|0.600000|25|0.250000|0.250000|" {
98
"AccountE||25|0.250000|25|0.250000|0.250000|" {
102
"AccountE|User4|1|0.250000|25|0.250000|0.250000|" {
106
"AccountF||35|0.350000|0|0.000000|0.145833|" {
110
"AccountF|User5|1|0.350000|0|0.000000|0.145833|" {
115
send_user "\nFAILURE: spawn IO not responding\n"
124
if {$matches != 11} {
125
send_user "\nFAILURE: we didn't get the correct priorities from the plugin $matches\n"
129
if {$exit_code == 0} {
130
file delete $test_prog
131
send_user "\nSUCCESS\n"