File: initgroups.exp

package info (click to toggle)
samba-doc-ja 2.2.8a%2Bja1.0-0.1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 34,192 kB
  • ctags: 22,693
  • sloc: ansic: 197,587; sh: 8,073; perl: 5,377; makefile: 1,489; awk: 1,146; exp: 1,143; csh: 216
file content (37 lines) | stat: -rw-r--r-- 640 bytes parent folder | download | duplicates (21)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#
# @(#) Test initgroups function
#

load_lib util-defs.exp
load_lib compile.exp

if { [util_start "id -u"] != 0 } {
    set test_desc "must be userid 0 to run"
    note $test_desc
    untested $test_desc
    return
}

# Compile test program

simple_compile "initgroups"

# Test domain users

set user_list [split [util_start "bin/wbinfo" "-u"] "\n"]

verbose $user_list

foreach { user } $user_list {
    set output [util_start "$srcdir/$subdir/initgroups" "\"$user\"" ""]

    verbose $output

    set test_desc "initgroups $user"

    if { [regexp "PASS" $output] } {
        pass $test_desc
    } else {
        fail $test_desc
    }
}