testprogs: use texpect instead of rkpty.
authorGünther Deschner <gd@samba.org>
Tue, 26 Aug 2014 16:01:10 +0000 (18:01 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Mon, 1 Sep 2014 13:47:33 +0000 (15:47 +0200)
Guenther

Pair-Programmed-With: Andreas Schneider <asn@samba.org>
Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andrew Bartlet <abartlet@samba.org>
testprogs/blackbox/test_kinit.sh
testprogs/blackbox/test_pdbtest.sh
testprogs/blackbox/test_pkinit.sh

index 000303ac71fccab8f9c2b584323dc54e080aaef4..6ec1eafc6e6956c582482bc4f9ab740cf9dc6edf 100755 (executable)
@@ -29,7 +29,7 @@ if test -x $BINDIR/samba4kinit; then
 fi
 
 samba_tool="$samba4bindir/samba-tool"
-rkpty="$samba4bindir/rkpty"
+texpect="$samba4bindir/texpect"
 samba4kpasswd=kpasswd
 if test -x $BINDIR/samba4kpasswd; then
        samba4kpasswd=$BINDIR/samba4kpasswd
@@ -137,7 +137,7 @@ send ${NEWUSERPASS}\n
 expect Success
 EOF
 
-testit "change user password with kpasswd" $rkpty $PREFIX/tmpkpasswdscript $samba4kpasswd nettestuser@$REALM || failed=`expr $failed + 1`
+testit "change user password with kpasswd" $texpect $PREFIX/tmpkpasswdscript $samba4kpasswd nettestuser@$REALM || failed=`expr $failed + 1`
 
 testit "kinit with user password" $samba4kinit $enctype --password-file=$PREFIX/tmpuserpassfile --request-pac nettestuser@$REALM   || failed=`expr $failed + 1`
 
@@ -154,7 +154,7 @@ send ${NEWUSERPASS}\n
 expect Success
 EOF
 
-testit "set user password with kpasswd" $rkpty $PREFIX/tmpkpasswdscript $samba4kpasswd --cache=$PREFIX/tmpccache nettestuser@$REALM || failed=`expr $failed + 1`
+testit "set user password with kpasswd" $texpect $PREFIX/tmpkpasswdscript $samba4kpasswd --cache=$PREFIX/tmpccache nettestuser@$REALM || failed=`expr $failed + 1`
 
 testit "kinit with user password" $samba4kinit $enctype --password-file=$PREFIX/tmpuserpassfile --request-pac nettestuser@$REALM   || failed=`expr $failed + 1`
 
@@ -171,7 +171,7 @@ send ${NEWUSERPASS}\n
 expect Success
 EOF
 
-testit "set user password with kpasswd and servicePrincipalName" $rkpty $PREFIX/tmpkpasswdscript $samba4kpasswd --cache=$PREFIX/tmpccache host/nettestuser@$REALM || failed=`expr $failed + 1`
+testit "set user password with kpasswd and servicePrincipalName" $texpect $PREFIX/tmpkpasswdscript $samba4kpasswd --cache=$PREFIX/tmpccache host/nettestuser@$REALM || failed=`expr $failed + 1`
 
 testit "kinit with user password" $samba4kinit $enctype --password-file=$PREFIX/tmpuserpassfile --request-pac nettestuser@$REALM   || failed=`expr $failed + 1`
 
@@ -201,7 +201,7 @@ send ${NEWUSERPASS}\n
 expect Success: Password changed
 EOF
 
-testit "kinit with user password for expired password" $rkpty $PREFIX/tmppasswordchange $samba4kinit $enctype --request-pac nettestuser@$REALM && failed=`expr $failed + 1`
+testit "kinit with user password for expired password" $texpect $PREFIX/tmppasswordchange $samba4kinit $enctype --request-pac nettestuser@$REALM && failed=`expr $failed + 1`
 
 test_smbclient "Test login with user kerberos ccache" 'ls' -k yes || failed=`expr $failed + 1`
 
index 05314dd2f55fc4835d9175ac3aa8ba24628d721a..017116c206e8489300d0b4ca9537321f3e2de25a 100755 (executable)
@@ -23,7 +23,7 @@ pdbtest="$samba4bindir/pdbtest"
 pdbedit="$samba4bindir/pdbedit"
 net="$samba4bindir/net"
 smbpasswd="$samba4bindir/smbpasswd"
-rkpty="$samba4bindir/rkpty"
+texpect="$samba4bindir/texpect"
 
 . `dirname $0`/subunit.sh
 
@@ -58,7 +58,7 @@ expect retype new password:
 send ${NEWUSERPASS}\n
 EOF
 
-testit "create user with pdbedit" $rkpty ./tmpsmbpasswdscript $VALGRIND $pdbedit -a $USER --account-desc="pdbedit-test-user" $@ || failed=`expr $failed + 1`
+testit "create user with pdbedit" $texpect ./tmpsmbpasswdscript $VALGRIND $pdbedit -a $USER --account-desc="pdbedit-test-user" $@ || failed=`expr $failed + 1`
 USERPASS=$NEWUSERPASS
 
 test_smbclient "Test login with user (ntlm)" 'ls' -k no -U$USER%$NEWUSERPASS $@ || failed=`expr $failed + 1`
@@ -77,7 +77,7 @@ expect Retype new SMB password:
 send ${NEWUSERPASS}\n
 EOF
 
-testit "set user password with smbpasswd" $rkpty ./tmpsmbpasswdscript $smbpasswd -L $USER -c $SMB_CONF || failed=`expr $failed + 1`
+testit "set user password with smbpasswd" $texpect ./tmpsmbpasswdscript $smbpasswd -L $USER -c $SMB_CONF || failed=`expr $failed + 1`
 USERPASS=$NEWUSERPASS
 
 test_smbclient "Test login with user (ntlm)" 'ls' -k no -U$USER%$NEWUSERPASS $@|| failed=`expr $failed + 1`
index 78c888bb6c337b8c67e74ae165542a93fc3476ed..b727c0c668901c5c3ef227b49198f28745e4a06a 100755 (executable)
@@ -29,7 +29,6 @@ if test -x $BINDIR/samba4kinit; then
 fi
 
 samba_tool="$samba4bindir/samba-tool"
-rkpty="$samba4bindir/rkpty"
 samba4kpasswd=kpasswd
 if test -x $BINDIR/samba4kpasswd; then
        samba4passwd=$BINDIR/samba4kpasswd