From d067956e9eba872d23bd4b98c5f697e2b07b283f Mon Sep 17 00:00:00 2001
From: Moe Jette <jette1@llnl.gov>
Date: Thu, 24 Jul 2008 19:40:36 +0000
Subject: [PATCH] modify some error messages for greater clarity

---
 testsuite/expect/regression |  2 +-
 testsuite/expect/test1.44   |  9 +++++++--
 testsuite/expect/test9.1    |  9 +++++++--
 testsuite/expect/test9.2    |  9 +++++++--
 testsuite/expect/test9.3    |  9 +++++++--
 testsuite/expect/test9.4    | 14 ++++++++++----
 testsuite/expect/test9.5    |  9 +++++++--
 testsuite/expect/test9.6    | 13 +++++++++----
 8 files changed, 55 insertions(+), 19 deletions(-)

diff --git a/testsuite/expect/regression b/testsuite/expect/regression
index b59af852566..14b89596c07 100755
--- a/testsuite/expect/regression
+++ b/testsuite/expect/regression
@@ -40,7 +40,7 @@ if [ ! -x ./regression ]; then
 	exit 1
 fi
 if [ ! -x ./globals ]; then
-	echo "FAILURE: copy 'globals.example' to 'globals' and modify as needed"
+	echo "FAILURE: 'globals' file not found"
 	exit 1
 fi
 
diff --git a/testsuite/expect/test1.44 b/testsuite/expect/test1.44
index e66c4690998..993f1aa9a22 100755
--- a/testsuite/expect/test1.44
+++ b/testsuite/expect/test1.44
@@ -8,7 +8,8 @@
 #          "FAILURE: ..." otherwise with an explanation of the failure, OR
 #          anything else indicates a failure mode that must be investigated.
 ############################################################################
-# Copyright (C) 2005 The Regents of the University of California.
+# Copyright (C) 2002-2007 The Regents of the University of California.
+# Copyright (C) 2008 Lawrence Livermore National Security.
 # Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
 # Written by Chris Morrone <morrone2@llnl.gov>
 # LLNL-CODE-402394.
@@ -97,7 +98,11 @@ for {set inx 0} {$inx < $cycle_count} {incr inx} {
 		set stdout_lines [get_line_cnt $file_out]
 	}
 	if {$stdout_lines != $stdout_target} {
-		send_user "\nFAILURE: stdout is incomplete\n"
+		if {$stdout_lines == 0} {
+			send_user "\nFAILURE: stdout is empty, is current working directory writable from compute nodes?\n"
+		} else {
+			send_user "\nFAILURE:stdout is incomplete\n"
+		}
 	        set exit_code 1
 	        break
 	} else {
diff --git a/testsuite/expect/test9.1 b/testsuite/expect/test9.1
index b2e1f3bb47c..16c03cd15b0 100755
--- a/testsuite/expect/test9.1
+++ b/testsuite/expect/test9.1
@@ -9,7 +9,8 @@
 # Note:    This script generates and then deletes files in the working directory 
 #          named test9.1.input and test9.1.output
 ############################################################################
-# Copyright (C) 2002 The Regents of the University of California.
+# Copyright (C) 2002-2007 The Regents of the University of California.
+# Copyright (C) 2008 Lawrence Livermore National Security.
 # Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
 # Written by Morris Jette <jette1@llnl.gov>
 # LLNL-CODE-402394.
@@ -105,7 +106,11 @@ for {set inx 0} {$inx < $cycle_count} {incr inx} {
 		set stdout_lines [get_line_cnt $file_out]
 	}
 	if {$stdout_lines != $stdout_target} {
-		send_user "\nFAILURE: stdout is incomplete\n"
+		if {$stdout_lines == 0} {
+			send_user "\nFAILURE: stdout is empty, is current working directory writable from compute nodes?\n"
+		} else {
+			send_user "\nFAILURE:stdout is incomplete\n"
+		}
 		set cycle_count [expr $inx + 1]
 		set exit_code 1
 		break
diff --git a/testsuite/expect/test9.2 b/testsuite/expect/test9.2
index 34a71af12aa..49dbaffc26e 100755
--- a/testsuite/expect/test9.2
+++ b/testsuite/expect/test9.2
@@ -9,7 +9,8 @@
 # Note:    This script generates and then deletes files in the working directory 
 #          named test9.2.output
 ############################################################################
-# Copyright (C) 2002-2006 The Regents of the University of California.
+# Copyright (C) 2002-2007 The Regents of the University of California.
+# Copyright (C) 2008 Lawrence Livermore National Security.
 # Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
 # Written by Morris Jette <jette1@llnl.gov>
 # LLNL-CODE-402394.
@@ -95,7 +96,11 @@ for {set inx 0} {$inx < $cycle_count} {incr inx} {
 		set stdout_lines [get_line_cnt $file_out]
 	}
 	if {$stdout_lines != $task_cnt} {
-		send_user "\nFAILURE:stdout is incomplete\n"
+		if {$stdout_lines == 0} {
+			send_user "\nFAILURE: stdout is empty, is current working directory writable from compute nodes?\n"
+		} else {
+			send_user "\nFAILURE:stdout is incomplete\n"
+		}
 		set cycle_count [expr $inx + 1]
 		set exit_code 1
 		break
diff --git a/testsuite/expect/test9.3 b/testsuite/expect/test9.3
index 7a392520bed..8d9567ca435 100755
--- a/testsuite/expect/test9.3
+++ b/testsuite/expect/test9.3
@@ -9,7 +9,8 @@
 # Note:    This script generates and then deletes files in the working directory 
 #          named test9.3.output
 ############################################################################
-# Copyright (C) 2002-2006 The Regents of the University of California.
+# Copyright (C) 2002-2007 The Regents of the University of California.
+# Copyright (C) 2008 Lawrence Livermore National Security.
 # Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
 # Written by Morris Jette <jette1@llnl.gov>
 # LLNL-CODE-402394.
@@ -105,7 +106,11 @@ for {set inx 0} {$inx < $cycle_count} {incr inx} {
 		set stdout_lines [get_line_cnt $file_out]
 	}
 	if {$stdout_lines != $stdout_target} {
-		send_user "\nFAILURE:stdout is incomplete\n"
+		if {$stdout_lines == 0} {
+			send_user "\nFAILURE: stdout is empty, is current working directory writable from compute nodes?\n"
+		} else {
+			send_user "\nFAILURE:stdout is incomplete\n"
+		}
 		set cycle_count [expr $inx + 1]
 		set exit_code 1
 		break
diff --git a/testsuite/expect/test9.4 b/testsuite/expect/test9.4
index 0b7d9575008..86d680ed48b 100755
--- a/testsuite/expect/test9.4
+++ b/testsuite/expect/test9.4
@@ -10,10 +10,12 @@
 #          we create them ahead of time. Without explicity file creation, 
 #          this test requires about one minute per cycle to execute.
 #
-# Note:    This script generates and then deletes files in the working directory
-#          named test9.4.input, test9.4.[0-9]+.input, and test9.4.[0-9]+.output
+# Note:    This script generates and then deletes files in the working 
+#          directory named test9.4.input, test9.4.[0-9]+.input, and
+#          test9.4.[0-9]+.output
 ############################################################################
-# Copyright (C) 2002-2006 The Regents of the University of California.
+# Copyright (C) 2002-2007 The Regents of the University of California.
+# Copyright (C) 2008 Lawrence Livermore National Security.
 # Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
 # Written by Morris Jette <jette1@llnl.gov>
 # LLNL-CODE-402394.
@@ -135,7 +137,11 @@ for {set inx 0} {$inx < $cycle_count} {incr inx} {
 			set stdout_lines [get_line_cnt $file_out_glob]
 		}
 		if {$stdout_lines != $stdin_lines} {
-			send_user "\nFAILURE:stdout is incomplete\n"
+			if {$stdout_lines == 0} {
+				send_user "\nFAILURE: stdout is empty, is current working directory writable from compute nodes?\n"
+			} else {
+				send_user "\nFAILURE:stdout is incomplete\n"
+			}
 			set exit_code 1
 		} else {
 			incr success_cnt
diff --git a/testsuite/expect/test9.5 b/testsuite/expect/test9.5
index fb8a46b9b08..087939383f4 100755
--- a/testsuite/expect/test9.5
+++ b/testsuite/expect/test9.5
@@ -6,7 +6,8 @@
 #          "FAILURE: ..." otherwise with an explanation of the failure, OR
 #          anything else indicates a failure mode that must be investigated.
 ############################################################################
-# Copyright (C) 2002-2006 The Regents of the University of California.
+# Copyright (C) 2002-2007 The Regents of the University of California.
+# Copyright (C) 2008 Lawrence Livermore National Security.
 # Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
 # Written by Morris Jette <jette1@llnl.gov>
 # LLNL-CODE-402394.
@@ -119,7 +120,11 @@ for {set inx 0} {$inx < $cycle_count} {incr inx} {
 		set stdout_lines [get_line_cnt $file_out]
 	}
 	if {$stdout_lines != $stdout_target} {
-		send_user "\nFAILURE:stdout is missing output\n"
+		if {$stdout_lines == 0} {
+			send_user "\nFAILURE: stdout is empty, is current working directory writable from compute nodes?\n"
+		} else {
+			send_user "\nFAILURE:stdout is incomplete\n"
+		}
 		set exit_code 1
 	} else {
 		incr success_cnt
diff --git a/testsuite/expect/test9.6 b/testsuite/expect/test9.6
index a057883f121..2dda35de63f 100755
--- a/testsuite/expect/test9.6
+++ b/testsuite/expect/test9.6
@@ -6,10 +6,11 @@
 #          "FAILURE: ..." otherwise with an explanation of the failure, OR
 #          anything else indicates a failure mode that must be investigated.
 #
-# Note:    This script generates and then deletes files in the working directory 
+# Note:    This script generates and then deletes files in the working directory
 #          named test9.6.input and test9.6.output
 ############################################################################
-# Copyright (C) 2002-2006 The Regents of the University of California.
+# Copyright (C) 2002-2007 The Regents of the University of California.
+# Copyright (C) 2008 Lawrence Livermore National Security.
 # Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
 # Written by Morris Jette <jette1@llnl.gov>
 # LLNL-CODE-402394.
@@ -102,11 +103,15 @@ for {set inx 0} {$inx < $cycle_count} {incr inx} {
 	}
 	set stdout_lines [get_line_cnt $file_out]
 	if {$stdout_lines != $stdout_target} {
-		 exec $bin_sleep 1
+		exec $bin_sleep 1
 		set stdout_lines [get_line_cnt $file_out]
 	}
 	if {$stdout_lines != $stdout_target} {
-		send_user "\nFAILURE:stdout is missing output\n"
+		if {$stdout_lines == 0} {
+			send_user "\nFAILURE: stdout is empty, is current working directory writable from compute nodes?\n"
+		} else {
+			send_user "\nFAILURE:stdout is incomplete\n"
+		}
 		set cycle_count [expr $inx + 1]
 		set exit_code 1
 		break
-- 
GitLab