From 05ece6096a82363ba589d535bd1ee79ded389c6c Mon Sep 17 00:00:00 2001
From: Morris Jette <jette@schedmd.com>
Date: Wed, 20 Apr 2011 19:00:31 -0700
Subject: [PATCH] fix a number of problems with respect to cray systems.

---
 testsuite/expect/test1.61  | 6 +++++-
 testsuite/expect/test1.81  | 5 +++++
 testsuite/expect/test11.5  | 7 ++++++-
 testsuite/expect/test15.17 | 5 +++++
 testsuite/expect/test2.11  | 5 +++++
 testsuite/expect/test2.13  | 7 ++++++-
 testsuite/expect/test2.8   | 6 +++---
 testsuite/expect/test3.9   | 5 +++++
 testsuite/expect/test5.4   | 2 +-
 testsuite/expect/test5.6   | 2 +-
 testsuite/expect/test7.5   | 5 ++++-
 testsuite/expect/test9.1   | 5 +++++
 testsuite/expect/test9.2   | 5 +++++
 testsuite/expect/test9.4   | 5 +++++
 testsuite/expect/test9.5   | 5 +++++
 testsuite/expect/test9.8   | 5 +++++
 16 files changed, 71 insertions(+), 9 deletions(-)

diff --git a/testsuite/expect/test1.61 b/testsuite/expect/test1.61
index 0583f9cf3d5..f10b7d06e09 100755
--- a/testsuite/expect/test1.61
+++ b/testsuite/expect/test1.61
@@ -40,9 +40,13 @@ set file_out    "test$test_id.output"
 set file_err    "test$test_id.error"
 set timeout 60
 
-
 print_header $test_id
 
+if {[test_cray]} {
+	send_user "\nWARNING: This test is incompatible with Cray systems\n"
+	exit $exit_code
+}
+
 exec $bin_rm -f $file_in file_out file_err
 make_bash_script $file_in "
   $bin_date
diff --git a/testsuite/expect/test1.81 b/testsuite/expect/test1.81
index a1e7982a1f4..d08f061938a 100755
--- a/testsuite/expect/test1.81
+++ b/testsuite/expect/test1.81
@@ -40,6 +40,11 @@ set exit_code   0
 
 print_header $test_id
 
+if {[test_cray]} {
+	send_user "\nWARNING: This test is incompatible with Cray systems\n"
+	exit $exit_code
+}
+
 #
 # Submit a 1 node job and validate that we don't get more than one
 #
diff --git a/testsuite/expect/test11.5 b/testsuite/expect/test11.5
index 14f80b2bc4e..f20e61425c8 100755
--- a/testsuite/expect/test11.5
+++ b/testsuite/expect/test11.5
@@ -39,6 +39,11 @@ set job_id      0
 
 print_header $test_id
 
+if {[test_cray]} {
+	send_user "\nWARNING: This test is incompatible with Cray systems\n"
+	exit $exit_code
+}
+
 #
 # Delete left-over input script
 # Build input script file
@@ -85,7 +90,7 @@ if {[wait_for_step $job_id.0] != 0} {
 }
 
 #
-# Enable/disable/test ability to heckpoint
+# Enable/disable/test abFAILility to heckpoint
 #
 spawn $scontrol check disable $job_id.0
 expect {
diff --git a/testsuite/expect/test15.17 b/testsuite/expect/test15.17
index e91d6632a02..50e166f2c51 100755
--- a/testsuite/expect/test15.17
+++ b/testsuite/expect/test15.17
@@ -41,6 +41,11 @@ set job_id_2     0
 
 print_header $test_id
 
+if {[test_cray]} {
+	send_user "\nWARNING: This test is incompatible with Cray systems\n"
+	exit $exit_code
+}
+
 #
 # Build input script file
 #
diff --git a/testsuite/expect/test2.11 b/testsuite/expect/test2.11
index 3d8eac25cdc..1cdb1546b7a 100755
--- a/testsuite/expect/test2.11
+++ b/testsuite/expect/test2.11
@@ -41,6 +41,11 @@ set scontrol_id 0
 
 print_header $test_id
 
+if {[test_cray]} {
+	send_user "\nWARNING: This test is incompatible with Cray systems\n"
+	exit $exit_code
+}
+
 # Delete left-over stdout file
 file delete $file_out
 
diff --git a/testsuite/expect/test2.13 b/testsuite/expect/test2.13
index d4f77fef3fa..b2f6ab06544 100755
--- a/testsuite/expect/test2.13
+++ b/testsuite/expect/test2.13
@@ -41,11 +41,16 @@ set orig_time     0
 set new_time      0
 
 print_header $test_id
-exec $bin_rm -f $file_in $file_out
+
+if {[test_cray]} {
+	send_user "\nWARNING: This test is incompatible with Cray systems\n"
+	exit $exit_code
+}
 
 #
 # Build input script file
 #
+exec $bin_rm -f $file_in $file_out
 make_bash_script $file_in "
   $bin_echo TEST_BEGIN
   $srun -t5 $bin_sleep 120
diff --git a/testsuite/expect/test2.8 b/testsuite/expect/test2.8
index 91ba33aa63a..605f88d89f2 100755
--- a/testsuite/expect/test2.8
+++ b/testsuite/expect/test2.8
@@ -178,7 +178,7 @@ expect {
 		wait
 	}
 }
-if {$matches != 1} {
+if {[test_cray] == 0 && $matches != 1} {
 	send_user "\nFAILURE: scontrol failed to find all job steps\n"
 	set exit_code 1
 }
@@ -206,7 +206,7 @@ expect {
 		wait
 	}
 }
-if {$matches != 1} {
+if {[test_cray] == 0 && $matches != 1} {
 	send_user "\nFAILURE: scontrol failed to specific job step\n"
 	set exit_code 1
 }
@@ -242,7 +242,7 @@ expect {
 		wait
 	}
 }
-if {$matches != 1} {
+if {[test_cray] == 0 && $matches != 1} {
 	send_user "\nFAILURE: scontrol found unexpected job step\n"
 	set exit_code 1
 }
diff --git a/testsuite/expect/test3.9 b/testsuite/expect/test3.9
index 76a161f2045..026abb31afc 100755
--- a/testsuite/expect/test3.9
+++ b/testsuite/expect/test3.9
@@ -37,6 +37,11 @@ set exit_code   0
 
 print_header $test_id
 
+if {[test_cray]} {
+	send_user "\nWARNING: This test is incompatible with Cray systems\n"
+	exit $exit_code
+}
+
 #
 # Issue scontrol reconfigure
 #
diff --git a/testsuite/expect/test5.4 b/testsuite/expect/test5.4
index c502c09e116..32fbe630a9c 100755
--- a/testsuite/expect/test5.4
+++ b/testsuite/expect/test5.4
@@ -229,7 +229,7 @@ expect {
 	}
 }
 
-if {$step_found == 0} {
+if {[test_cray] == 0 && $step_found == 0} {
 	send_user "\nFAILURE: squeue step format error\n"
 	set exit_code 1
 }
diff --git a/testsuite/expect/test5.6 b/testsuite/expect/test5.6
index 4b1d1244ae8..753bb4467f0 100755
--- a/testsuite/expect/test5.6
+++ b/testsuite/expect/test5.6
@@ -336,7 +336,7 @@ expect {
 		wait
 	}
 }
-if {$job_found == 0} {
+if {[test_cray] == 0 && $job_found == 0} {
 	send_user "\nFAILURE: squeue failed to locate desired job step\n"
 	set exit_code 1
 }
diff --git a/testsuite/expect/test7.5 b/testsuite/expect/test7.5
index 7abd8663372..0c8f6b9ef85 100755
--- a/testsuite/expect/test7.5
+++ b/testsuite/expect/test7.5
@@ -49,7 +49,10 @@ if { [test_xcpu] } {
 	send_user "\nWARNING: This test is incompatible with XCPU systems\n"
 	exit $exit_code
 }
-
+if {[test_cray]} {
+	send_user "\nWARNING: This test is incompatible with Cray systems\n"
+	exit $exit_code
+}
 
 #
 # Delete left-over program and rebuild it
diff --git a/testsuite/expect/test9.1 b/testsuite/expect/test9.1
index a55ca422dfc..da24e690ea8 100755
--- a/testsuite/expect/test9.1
+++ b/testsuite/expect/test9.1
@@ -57,6 +57,11 @@ set other_opts   "-O"
 
 print_header $test_id
 
+if {[test_cray]} {
+	send_user "\nWARNING: This test is incompatible with Cray systems\n"
+	exit $exit_code
+}
+
 # Execute an srun job to cat input_file to output_file, wait for completion
 # Returns 0 on successful completion, returns 1 otherwise
 proc run_cat_job { input_file output_file } {
diff --git a/testsuite/expect/test9.2 b/testsuite/expect/test9.2
index 52fd0a75131..70bf0f3b5af 100755
--- a/testsuite/expect/test9.2
+++ b/testsuite/expect/test9.2
@@ -55,6 +55,11 @@ set task_cnt     $max_stress_tasks
 
 print_header $test_id
 
+if {[test_cray]} {
+	send_user "\nWARNING: This test is incompatible with Cray systems\n"
+	exit $exit_code
+}
+
 # Execute an srun job to print hostname to output_file with task_cnt tasks per node,
 # wait for completion
 # Returns 0 on successful completion, returns 1 otherwise
diff --git a/testsuite/expect/test9.4 b/testsuite/expect/test9.4
index 684040b54c7..d51c267f064 100755
--- a/testsuite/expect/test9.4
+++ b/testsuite/expect/test9.4
@@ -63,6 +63,11 @@ set task_cnt      $max_stress_tasks
 
 print_header $test_id
 
+if {[test_cray]} {
+	send_user "\nWARNING: This test is incompatible with Cray systems\n"
+	exit $exit_code
+}
+
 # Execute an srun job to print hostname to output_file with task_cnt tasks
 # per node, wait for completion
 # Returns 0 on successful completion, returns 1 otherwise
diff --git a/testsuite/expect/test9.5 b/testsuite/expect/test9.5
index df7a1ed99ef..70637170f3d 100755
--- a/testsuite/expect/test9.5
+++ b/testsuite/expect/test9.5
@@ -54,6 +54,11 @@ set task_cnt      $max_stress_tasks
 
 print_header $test_id
 
+if {[test_cray]} {
+	send_user "\nWARNING: This test is incompatible with Cray systems\n"
+	exit $exit_code
+}
+
 # Execute an srun job to print hostname to output_file with task_cnt tasks
 # per node, wait for completion
 # Returns 0 on successful completion, returns 1 otherwise
diff --git a/testsuite/expect/test9.8 b/testsuite/expect/test9.8
index f2259e7360c..288e821dc3f 100755
--- a/testsuite/expect/test9.8
+++ b/testsuite/expect/test9.8
@@ -46,6 +46,11 @@ set task_cnt     60
 
 print_header $test_id
 
+if {[test_cray]} {
+	send_user "\nWARNING: This test is incompatible with Cray systems\n"
+	exit $exit_code
+}
+
 #
 # A single slurmd can't handle a large task count without
 # running out of memory and pthreads
-- 
GitLab