summaryrefslogtreecommitdiff
path: root/testsuite/nsswitch/getgrnam.exp
blob: 2ba6ba0281babc4ee5d6508eec71734f097e69ae (plain)
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
#
# @(#) Test domain/local groups resolve using getgrnam()
#

load_lib util-defs.exp
load_lib "$srcdir/config/env.exp"
load_lib "$srcdir/config/default-nt-names.exp"

# Compile getgrnam.c

set output [target_compile "$srcdir/$subdir/getgrnam.c" \
        "$srcdir/$subdir/getgrnam" executable {additional_flags="-g"}]

if {$output != ""} {
    perror "compile getgrnam"
    puts $output
    return
}

# Test domain groups

foreach {group} $domain_groups {
    set output [util_start "$srcdir/$subdir/getgrnam" "\"$group\"" ""]
    if {[regexp "PASS:" $output]} {
        pass "getgrnam $group"
    } else {
        fail "getgrnam $group"
    }
}