You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
SFTP nonblocking negotiation test can fail when RealPath completes without a retry #1331
The SFTP nonblocking negotiation API test can fail even when the request succeeds on its first call.
Observed in this CI job for PR #1327, with macOS, wolfSSL v5.9.2-stable, and --enable-sftp --disable-sftp-zeroize:
RealPath stopped after 1 tries: name returned, error 0 (no error)
ERROR - tests/api.c line 6778 failed with:
expected: sawPartial == 1
result: 0 != 1
FAIL tests/api.test (exit status: 134)
In test_wolfSSH_SFTP_SendPacketType_negotiation_non_block(), sawPartial is set only when wolfSSH_SFTP_RealPath() returns NULL with WS_WANT_READ or WS_WANT_WRITE. The test then unconditionally requires sawPartial == 1.
The client uses a nonblocking socket against a local server thread, but the test does not force an I/O operation to would-block. If the server responds quickly enough, negotiation and RealPath can complete in one call. Nonblocking mode permits this, so requiring an intermediate retry makes the test dependent on scheduling and allows the failure to recur.
The test should deterministically inject a retryable I/O result during negotiation, then verify that the request survives reentry and completes.
Activity
ejohnstown commentedon Oct 20, 2026
PR #1325 fixes this issue.