Fix tevent testsuite issue on Solaris.
[Samba/gbeck.git] / testsuite / nsswitch / initgroups.exp
blobab21bcc9e7ba9c944b882b159738bbef85b82208
2 # @(#) Test initgroups function
5 load_lib util-defs.exp
6 load_lib compile.exp
8 if { [util_start "id -u"] != 0 } {
9 set test_desc "must be userid 0 to run"
10 note $test_desc
11 untested $test_desc
12 return
15 # Compile test program
17 simple_compile "initgroups"
19 # Test domain users
21 set user_list [split [util_start "bin/wbinfo" "-u"] "\n"]
23 verbose $user_list
25 foreach { user } $user_list {
26 set output [util_start "$srcdir/$subdir/initgroups" "\"$user\"" ""]
28 verbose $output
30 set test_desc "initgroups $user"
32 if { [regexp "PASS" $output] } {
33 pass $test_desc
34 } else {
35 fail $test_desc