From 2060a5e7d2827c84dc55e9f04d64a80cdf8cc108 Mon Sep 17 00:00:00 2001
From: Danny Auble <da@schedmd.com>
Date: Tue, 26 Jul 2016 12:09:44 -0500
Subject: [PATCH] alter tests to work correctly if you aren't a super user

---
 testsuite/expect/test1.72 | 4 ++++
 testsuite/expect/test4.13 | 5 +++++
 testsuite/expect/test5.11 | 6 ++++++
 3 files changed, 15 insertions(+)

diff --git a/testsuite/expect/test1.72 b/testsuite/expect/test1.72
index d4460d583a4..7a481c5a428 100755
--- a/testsuite/expect/test1.72
+++ b/testsuite/expect/test1.72
@@ -34,6 +34,10 @@ set test_id   "1.72"
 set freq_val  0
 set exit_code 0
 
+if {[test_cray]} {
+        set timeout 60
+}
+
 if {[get_job_acct_freq] == 0} {
 	send_user "\nWARNING:this test requires JobAcctGatherFrequency to be set\n"
 	exit $exit_code
diff --git a/testsuite/expect/test4.13 b/testsuite/expect/test4.13
index 8990ae8e28d..d81c876c5ff 100755
--- a/testsuite/expect/test4.13
+++ b/testsuite/expect/test4.13
@@ -93,6 +93,11 @@ proc cleanup { } {
 
 }
 
+if { ![test_super_user] } {
+        send_user "\nWARNING: This test can't be run without being a super user of the cluster.\n"
+	exit 0
+}
+
 send_user "\n=== Testing Node Information ===\n"
 set first_option 1
 foreach option [array names node_info] {
diff --git a/testsuite/expect/test5.11 b/testsuite/expect/test5.11
index 7651aef478f..2ccfbb9f4ef 100755
--- a/testsuite/expect/test5.11
+++ b/testsuite/expect/test5.11
@@ -52,6 +52,12 @@ print_header $test_id
 make_bash_script $script "
 sleep 10
 "
+
+if { ![test_super_user] } {
+        send_user "\nWARNING: This test can't be run without being a super user of the cluster.\n"
+        exit 0
+}
+
 proc sub_job { cpu_cnt part } {
 
 	global sbatch script job_id number exit_code
-- 
GitLab