Skip to content
Snippets Groups Projects
Commit 2773a99a authored by Danny Auble's avatar Danny Auble
Browse files

Handle root user in test

parent 0f4f4de7
No related branches found
No related tags found
No related merge requests found
...@@ -179,22 +179,27 @@ if {$hidden == 0} { ...@@ -179,22 +179,27 @@ if {$hidden == 0} {
set exit_code 1 set exit_code 1
} }
# set uid [get_my_uid]
# Confirm partition is hidden by default
# # This test will not work for user root since they always see all partitions
spawn $scontrol show part $part_name if {$uid > 0} {
expect { #
-re "PartitionName" { # Confirm partition is hidden by default
send_user "\nFAILURE: partition not hidden\n" #
set exit_code 1 spawn $scontrol show part $part_name
exp_continue expect {
} -re "PartitionName" {
timeout { send_user "\nFAILURE: partition not hidden\n"
send_user "\nFAILURE: scontrol not responding\n" set exit_code 1
set exit_code 1 exp_continue
} }
eof { timeout {
wait send_user "\nFAILURE: scontrol not responding\n"
set exit_code 1
}
eof {
wait
}
} }
} }
......
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