Skip to content
Snippets Groups Projects
Commit 587c74e7 authored by Moe Jette's avatar Moe Jette
Browse files

modify sbcast tests for SlurmdUser != root

parent 65b2f7c8
No related branches found
No related tags found
No related merge requests found
...@@ -637,6 +637,33 @@ proc test_assoc_enforced { } { ...@@ -637,6 +637,33 @@ proc test_assoc_enforced { } {
return $assoc_enforced return $assoc_enforced
} }
################################################################
#
# Proc: slurmd_user_root
#
# Return 1 if the SlurmdUser is root, 0 otherwise
#
################################################################
proc slurmd_user_root { } {
global scontrol
log_user 0
set rc 0
spawn $scontrol show config
expect {
-re "SlurmdUser *= root" {
set rc 1
exp_continue
}
eof {
wait
}
}
log_user 1
return $rc
}
################################################################ ################################################################
# #
# Proc: test_topology # Proc: test_topology
......
...@@ -46,6 +46,10 @@ if {[test_front_end] != 0} { ...@@ -46,6 +46,10 @@ if {[test_front_end] != 0} {
send_user "\nWARNING: This test is incompatable with front-end systems\n" send_user "\nWARNING: This test is incompatable with front-end systems\n"
exit 0 exit 0
} }
if {[slurmd_user_root] == 0} {
send_user "\nWARNING: This test is incompatable with SlurmdUser != root\n"
exit 0
}
# Delete left-over stdout/err files # Delete left-over stdout/err files
file delete $file_out $file_err file delete $file_out $file_err
......
...@@ -116,6 +116,13 @@ if {[wait_for_file $file_err] == 0} { ...@@ -116,6 +116,13 @@ if {[wait_for_file $file_err] == 0} {
incr matches incr matches
exp_continue exp_continue
} }
-re "REQUEST_FILE_BCAST.* Operation not permitted" {
# variation on Permission denied if initgroups() fails
# due to not running slurmd as root
send_user "These errors are expected, no worries\n"
incr matches
exp_continue
}
-re "REQUEST_FILE_BCAST.* File exists" { -re "REQUEST_FILE_BCAST.* File exists" {
send_user "Vestigial file should be removed\n" send_user "Vestigial file should be removed\n"
incr matches incr matches
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment