~vcs-imports/samba/main

« back to all changes in this revision

Viewing changes to testsuite/nsswitch/initgroups.exp

  • Committer: jerry
  • Date: 2006-07-14 21:48:39 UTC
  • Revision ID: vcs-imports@canonical.com-20060714214839-586d8c489a8fcead
gutting trunk to move to svn:externals

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#
2
 
# @(#) Test initgroups function
3
 
#
4
 
 
5
 
load_lib util-defs.exp
6
 
load_lib compile.exp
7
 
 
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
13
 
}
14
 
 
15
 
# Compile test program
16
 
 
17
 
simple_compile "initgroups"
18
 
 
19
 
# Test domain users
20
 
 
21
 
set user_list [split [util_start "bin/wbinfo" "-u"] "\n"]
22
 
 
23
 
verbose $user_list
24
 
 
25
 
foreach { user } $user_list {
26
 
    set output [util_start "$srcdir/$subdir/initgroups" "\"$user\"" ""]
27
 
 
28
 
    verbose $output
29
 
 
30
 
    set test_desc "initgroups $user"
31
 
 
32
 
    if { [regexp "PASS" $output] } {
33
 
        pass $test_desc
34
 
    } else {
35
 
        fail $test_desc
36
 
    }
37
 
}