Merge from TNG.
[tprouty/samba.git] / testsuite / nsswitch / pam_winbind_syms.exp
1 #
2 # @(#) Test nss functions are exported from the pam_winbind.so library
3 # @(#) Test there are no external dependencies in the pam_winbind.so library
4 #
5 # We expect the following symbols to be exported:
6 #
7 #    pam_sm_acct_mgmt
8 #    pam_sm_authenticate
9 #    pam_sm_setcred
10 #
11 # This test also has the nice side-effect of showing any unresolved symbols 
12 # in the library.
13 #
14
15 load_lib util-defs.exp
16
17 # Compile pam_winbind_syms.c
18
19 set output [target_compile "$srcdir/$subdir/pam_winbind_syms.c" \
20         "$srcdir/$subdir/pam_winbind_syms" executable \
21         {"libs=-ldl -lpam" "additional_flags=-g"}]
22
23 if {$output != ""} {
24     perror "compile pam_winbind_syms.c"
25     puts $output
26     return
27 }
28
29 # Run load-dl.c
30
31 set output [util_start "$srcdir/$subdir/pam_winbind_syms" \
32         "nsswitch/pam_winbind.so"]
33
34 if {[regexp "FAIL:" $output]} {
35     fail "run pam_winbind_syms"
36     puts $output
37     return
38 }
39
40 pass "pam_winbind_syms"
41
42 # Clean up
43
44 file delete "$srcdir/$subdir/pam_winbind_syms"