tests: run app-driven sftp in a block build

The non-blocking app-driven case runs under WOLFSSH_TEST_BLOCK again,
reverting ba899603. It deadlocks there until ssh_worker() waits on the
write side for a send wolfSSH_worker() reported through ssh->error, so
this wants PR 1251 landed with the wantWrite arm kept.
pull/1251/head
John Safranek 2026-09-15 11:12:04 -07:00 committed by Yosuke Shimizu
parent bbf46b5f3f
commit fab6066845
1 changed files with 13 additions and 20 deletions

View File

@ -6,7 +6,6 @@ no_pid=-1
server_pid="$no_pid"
ready_file="$PWD/wolfssh_sftp_ready$$"
nonblockingOnly=0
blockBuild=0
[ ! -x ./examples/sftpclient/wolfsftp ] && echo && echo "wolfSFTP client doesn't exist" && exit 1
@ -28,7 +27,6 @@ if echo "$WOLFSSH_OPTIONS" | grep -qx "TEST_BLOCK"
then
echo "macro WOLFSSH_TEST_BLOCK was used"
nonblockingOnly=1
blockBuild=1
fi
#echo "ready file $ready_file"
@ -134,24 +132,19 @@ if [ "$nonblockingOnly" = 0 ]; then
fi
# The same handoff on a non-blocking server, which reaches the accept call's
# want-read and want-write retries. Held out of a forced-blocking build: the
# two ends deadlock there, the server parked in DoReceive with output it owes
# still queued, which is a defect of its own rather than this case failing.
if [ "$blockBuild" = 0 ]; then
echo "Test non blocking connection to an app-driven server"
./examples/echoserver/echoserver -A -N -1 -R "$ready_file" &
server_pid=$!
create_port
echo "exit" | ./examples/sftpclient/wolfsftp -N -u jill -P upthehill \
-p "$port"
RESULT=$?
remove_ready_file
if [ $RESULT -ne 0 ]; then
echo
echo "failed to connect to non blocking app-driven server"
do_cleanup
exit 1
fi
# want-read and want-write retries.
echo "Test non blocking connection to an app-driven server"
./examples/echoserver/echoserver -A -N -1 -R "$ready_file" &
server_pid=$!
create_port
echo "exit" | ./examples/sftpclient/wolfsftp -N -u jill -P upthehill -p "$port"
RESULT=$?
remove_ready_file
if [ $RESULT -ne 0 ]; then
echo
echo "failed to connect to non blocking app-driven server"
do_cleanup
exit 1
fi
# Test want write return from highwater callback