Ignore:
Timestamp:
Nov 24, 2016, 1:14:11 PM (9 years ago)
Author:
Silvan Scherrer
Message:

Samba Server: update vendor to version 4.4.3

Location:
vendor/current/nsswitch/tests
Files:
3 added
1 edited

Legend:

Unmodified
Added
Removed
  • vendor/current/nsswitch/tests/test_wbinfo.sh

    r740 r988  
    1515
    1616failed=0
    17 samba4bindir="$BUILDDIR/bin"
    18 wbinfo="$VALGRIND $samba4bindir/wbinfo$EXEEXT"
     17samba4bindir="$BINDIR"
     18wbinfo="$VALGRIND $samba4bindir/wbinfo"
    1919
    2020. `dirname $0`/../../testprogs/blackbox/subunit.sh
     
    5858# Convert netbios name to IP
    5959# Does not work yet
    60 knownfail "wbinfo -N against $TARGET" $wbinfo -N $NETBIOSNAME || failed=`expr $failed + 1`
     60testit "wbinfo -N against $TARGET" $wbinfo -N $NETBIOSNAME || failed=`expr $failed + 1`
    6161# Convert IP to netbios name
    6262# Does not work yet
    63 knownfail "wbinfo -I against $TARGET" $wbinfo -I $SERVER_IP || failed=`expr $failed + 1`
     63testit "wbinfo -I against $TARGET" $wbinfo -I $SERVER_IP || failed=`expr $failed + 1`
    6464
    6565# Convert name to SID
     
    152152
    153153#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`
     154testit "wbinfo  --trusted-domains against $TARGET" $wbinfo --trusted-domains || failed=`expr $failed + 1`
     155testit "wbinfo --all-domains against $TARGET" $wbinfo --all-domains || failed=`expr $failed + 1`
    156156
    157157testit "wbinfo --own-domain against $TARGET" $wbinfo --own-domain || failed=`expr $failed + 1`
     
    175175testit "wbinfo -i against $TARGET" $wbinfo -i "$DOMAIN/$USERNAME" || failed=`expr $failed + 1`
    176176
    177 testit "wbinfo --uid-info against $TARGET" $wbinfo --uid-info $admin_uid || failed=`expr $failed + 1`
    178 
    179177echo "test: wbinfo --group-info against $TARGET"
    180 rawgid=`$wbinfo --group-info "Domain admins" | sed 's/.*:\([0-9][0-9]*\):/\1/'`
     178gid=`$wbinfo --group-info "$DOMAIN/Domain users" | cut -d: -f3`
    181179if test x$? = x0; then
    182180        echo "success: wbinfo --group-info against $TARGET"
     
    186184fi
    187185
    188 gid=`echo $rawgid | sed 's/.*:\([0-9][0-9]*\):/\1/'`
     186test_name="wbinfo -i against $TARGET"
     187subunit_start_test "$test_name"
     188passwd_line=`$wbinfo -i "$DOMAIN/$USERNAME"`
     189if test x$? = x0; then
     190        subunit_pass_test "$test_name"
     191else
     192        subunit_fail_test "$test_name"
     193        failed=`expr $failed + 1`
     194fi
     195
     196test_name="confirm output of wbinfo -i against $TARGET"
     197subunit_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.
     202expected_line="$DOMAIN/administrator:*:$admin_uid:$gid:Administrator:/home/$DOMAIN/administrator:/bin/false"
     203expected2_line="$DOMAIN/administrator:*:$admin_uid:$gid::/home/$DOMAIN/administrator:/bin/false"
     204
     205if test x$passwd_line = x"$expected_line" -o x$passwd_line = x"$expected2_line"; then
     206        subunit_pass_test "$test_name"
     207else
     208        echo "expected '$expected_line' or '$expected2_line' got '$passwd_line'" | subunit_fail_test "$test_name"
     209        failed=`expr $failed + 1`
     210fi
     211
     212test_name="wbinfo --uid-info against $TARGET"
     213subunit_start_test "$test_name"
     214passwd_line=`$wbinfo --uid-info=$admin_uid`
     215if test x$? = x0; then
     216        subunit_pass_test "$test_name"
     217else
     218        subunit_fail_test "$test_name"
     219        failed=`expr $failed + 1`
     220fi
     221
     222test_name="confirm output of wbinfo --uid-info against $TARGET"
     223subunit_start_test "$test_name"
     224if test x$passwd_line = x"$expected_line" -o x$passwd_line = x"$expected2_line"; then
     225        subunit_pass_test "$test_name"
     226else
     227        echo "expected '$expected_line' or '$expected2_line' got '$passwd_line'" | subunit_fail_test "$test_name"
     228        failed=`expr $failed + 1`
     229fi
     230
     231testfail "wbinfo --group-info against $TARGET with $USERNAME" $wbinfo --group-info $USERNAME && failed=`expr $failed + 1`
     232
    189233testit "wbinfo --gid-info against $TARGET" $wbinfo --gid-info $gid || failed=`expr $failed + 1`
    190234
Note: See TracChangeset for help on using the changeset viewer.