From fab606684562cbca7a062db7dce6e1d92b504a5b Mon Sep 17 00:00:00 2001 From: John Safranek Date: Tue, 15 Sep 2026 11:12:04 -0700 Subject: [PATCH] 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. --- scripts/sftp.test | 33 +++++++++++++-------------------- 1 file changed, 13 insertions(+), 20 deletions(-) diff --git a/scripts/sftp.test b/scripts/sftp.test index 90fcdd19..9e551df1 100755 --- a/scripts/sftp.test +++ b/scripts/sftp.test @@ -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