Changeset 988 for vendor/current/nsswitch/tests
- Timestamp:
- Nov 24, 2016, 1:14:11 PM (9 years ago)
- Location:
- vendor/current/nsswitch/tests
- Files:
-
- 3 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
vendor/current/nsswitch/tests/test_wbinfo.sh
r740 r988 15 15 16 16 failed=0 17 samba4bindir="$B UILDDIR/bin"18 wbinfo="$VALGRIND $samba4bindir/wbinfo $EXEEXT"17 samba4bindir="$BINDIR" 18 wbinfo="$VALGRIND $samba4bindir/wbinfo" 19 19 20 20 . `dirname $0`/../../testprogs/blackbox/subunit.sh … … 58 58 # Convert netbios name to IP 59 59 # Does not work yet 60 knownfail"wbinfo -N against $TARGET" $wbinfo -N $NETBIOSNAME || failed=`expr $failed + 1`60 testit "wbinfo -N against $TARGET" $wbinfo -N $NETBIOSNAME || failed=`expr $failed + 1` 61 61 # Convert IP to netbios name 62 62 # Does not work yet 63 knownfail"wbinfo -I against $TARGET" $wbinfo -I $SERVER_IP || failed=`expr $failed + 1`63 testit "wbinfo -I against $TARGET" $wbinfo -I $SERVER_IP || failed=`expr $failed + 1` 64 64 65 65 # Convert name to SID … … 152 152 153 153 #didn't really work anyway 154 knownfail"wbinfo --trusted-domains against $TARGET" $wbinfo --trusted-domains || failed=`expr $failed + 1`155 knownfail"wbinfo --all-domains against $TARGET" $wbinfo --all-domains || failed=`expr $failed + 1`154 testit "wbinfo --trusted-domains against $TARGET" $wbinfo --trusted-domains || failed=`expr $failed + 1` 155 testit "wbinfo --all-domains against $TARGET" $wbinfo --all-domains || failed=`expr $failed + 1` 156 156 157 157 testit "wbinfo --own-domain against $TARGET" $wbinfo --own-domain || failed=`expr $failed + 1` … … 175 175 testit "wbinfo -i against $TARGET" $wbinfo -i "$DOMAIN/$USERNAME" || failed=`expr $failed + 1` 176 176 177 testit "wbinfo --uid-info against $TARGET" $wbinfo --uid-info $admin_uid || failed=`expr $failed + 1`178 179 177 echo "test: wbinfo --group-info against $TARGET" 180 rawgid=`$wbinfo --group-info "Domain admins" | sed 's/.*:\([0-9][0-9]*\):/\1/'`178 gid=`$wbinfo --group-info "$DOMAIN/Domain users" | cut -d: -f3` 181 179 if test x$? = x0; then 182 180 echo "success: wbinfo --group-info against $TARGET" … … 186 184 fi 187 185 188 gid=`echo $rawgid | sed 's/.*:\([0-9][0-9]*\):/\1/'` 186 test_name="wbinfo -i against $TARGET" 187 subunit_start_test "$test_name" 188 passwd_line=`$wbinfo -i "$DOMAIN/$USERNAME"` 189 if test x$? = x0; then 190 subunit_pass_test "$test_name" 191 else 192 subunit_fail_test "$test_name" 193 failed=`expr $failed + 1` 194 fi 195 196 test_name="confirm output of wbinfo -i against $TARGET" 197 subunit_start_test "$test_name" 198 199 # The full name (GECOS) is based on name (the RDN, in this case CN) 200 # and displayName in winbindd_ads, and is based only on displayName in 201 # winbindd_msrpc and winbindd_rpc. Allow both versions. 202 expected_line="$DOMAIN/administrator:*:$admin_uid:$gid:Administrator:/home/$DOMAIN/administrator:/bin/false" 203 expected2_line="$DOMAIN/administrator:*:$admin_uid:$gid::/home/$DOMAIN/administrator:/bin/false" 204 205 if test x$passwd_line = x"$expected_line" -o x$passwd_line = x"$expected2_line"; then 206 subunit_pass_test "$test_name" 207 else 208 echo "expected '$expected_line' or '$expected2_line' got '$passwd_line'" | subunit_fail_test "$test_name" 209 failed=`expr $failed + 1` 210 fi 211 212 test_name="wbinfo --uid-info against $TARGET" 213 subunit_start_test "$test_name" 214 passwd_line=`$wbinfo --uid-info=$admin_uid` 215 if test x$? = x0; then 216 subunit_pass_test "$test_name" 217 else 218 subunit_fail_test "$test_name" 219 failed=`expr $failed + 1` 220 fi 221 222 test_name="confirm output of wbinfo --uid-info against $TARGET" 223 subunit_start_test "$test_name" 224 if test x$passwd_line = x"$expected_line" -o x$passwd_line = x"$expected2_line"; then 225 subunit_pass_test "$test_name" 226 else 227 echo "expected '$expected_line' or '$expected2_line' got '$passwd_line'" | subunit_fail_test "$test_name" 228 failed=`expr $failed + 1` 229 fi 230 231 testfail "wbinfo --group-info against $TARGET with $USERNAME" $wbinfo --group-info $USERNAME && failed=`expr $failed + 1` 232 189 233 testit "wbinfo --gid-info against $TARGET" $wbinfo --gid-info $gid || failed=`expr $failed + 1` 190 234
Note:
See TracChangeset
for help on using the changeset viewer.