summaryrefslogtreecommitdiff
path: root/testsuite/nsswitch/getgrgid.exp
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2001-05-09 04:59:49 +0000
committerTim Potter <tpot@samba.org>2001-05-09 04:59:49 +0000
commitdcc39ea43984fe9f9c683e48423794793a923e28 (patch)
treecfccda702e3f50fa6da408c42937f1007abee49e /testsuite/nsswitch/getgrgid.exp
parent9de17c5c3892930d6d1d349df63e2c4206787ceb (diff)
downloadsamba-dcc39ea43984fe9f9c683e48423794793a923e28.tar.gz
samba-dcc39ea43984fe9f9c683e48423794793a923e28.tar.bz2
samba-dcc39ea43984fe9f9c683e48423794793a923e28.zip
Cleaned up bitrot in nsswitch testsuite. Merged tests across from TNG
branch. (This used to be commit acef477383e5739292e764c17cef87822a09f13b)
Diffstat (limited to 'testsuite/nsswitch/getgrgid.exp')
-rw-r--r--testsuite/nsswitch/getgrgid.exp22
1 files changed, 9 insertions, 13 deletions
diff --git a/testsuite/nsswitch/getgrgid.exp b/testsuite/nsswitch/getgrgid.exp
index a6508b3cd5..c53749f262 100644
--- a/testsuite/nsswitch/getgrgid.exp
+++ b/testsuite/nsswitch/getgrgid.exp
@@ -3,25 +3,19 @@
#
load_lib util-defs.exp
-load_lib "$srcdir/config/env.exp"
-load_lib "$srcdir/config/default-nt-names.exp"
+load_lib compile.exp
-# Compile getpwuid.c
+# Compile getgruid.c
-set output [target_compile "$srcdir/$subdir/getgrgid.c" \
- "$srcdir/$subdir/getgrgid" executable {additional_flags="-g"}]
+simple_compile "getgrgid"
-if {$output != ""} {
- perror "compile getgrgid"
- puts $output
- return
-}
-
-# Get list of uids using getent
+# Get list of gids using getent
set output [util_start "getent" "group" ""]
set got_entries 0
+verbose $output
+
foreach {line} [split $output "\n"] {
# Process user
@@ -29,7 +23,7 @@ foreach {line} [split $output "\n"] {
set grp_entry [split $line ":"]
set group [lindex $grp_entry 0]
- if {[regexp "^($domain)/" $group]} {
+ if {[regexp {^[^/]+/} $group]} {
set got_entries 1
@@ -40,6 +34,8 @@ foreach {line} [split $output "\n"] {
# Test lookup of gid succeeds
set output [util_start "$srcdir/$subdir/getgrgid" "$gid" ""]
+ verbose $output
+
if {[regexp "PASS:" $output]} {
pass "getgrgid $gid ($group)"
} else {