Commit Graph

5 Commits (4ca96ec6cb9349974c77b9497823c9cc50870a76)

Author SHA1 Message Date
John Safranek 4ca96ec6cb wolfsshd: name the large SFTP files per run
sshd_large_sftp_test.sh puts its pid in both the local and the remote
file name, and removes them from an EXIT trap.

- the remote name was fixed in the daemon user's home, one directory
  for the whole host, so two runs uploaded to the same path and each
  compared its own file against the other's upload
- 4.4G apiece, and the transfer runs under "set -e", so a failed run
  left both behind
2026-09-17 15:04:26 +02:00
John Safranek f52c3f7e22 tests: save sshd test scripts' dir in TESTDIR
Eight scripts saved their starting directory in PWD, which the shell
rewrites on every cd, so the "cd $PWD" restore landed in the repository
root. sshd_forcedcmd_test.sh's second scenario and the log count in
sshd_x509_upn_fail.sh silently never did what they cover.

- Save the starting directory in TESTDIR, as sshd_pubkey_reject_test.sh does.
- Quote "$TESTDIR" at every cd, now that the saved value is really used.
- Stop the daemon from a trap in sshd_forcedcmd_test.sh, so its now reachable
  second scenario cannot leave one on the shared port when set -e aborts.
- Take start_wolfsshd's before and after daemon PID snapshots from pgrep -x
  instead of scraping every digit run out of "ps -e", which mixed the TIME
  field's clock digits in with the PID and, with a leftover daemon running,
  stopped the wrong process.
- Let both snapshot pipelines fail, so a set -e caller survives no daemon
  being up and a daemon that dies after sudo returns is reported by the
  caller's own empty-PID check.
2026-08-20 10:28:20 -07:00
John Safranek 754317b6bf Use wolfssh-options in the test scripts
The scripts now read the build options from the probe instead of grepping
usage text, config.log and daemon logs. Drops the usage lines only tests read.
2026-08-19 16:55:00 -07:00
Yosuke Shimizu d49b15f51a SFTP path confinement and status-reply refactor 2026-06-09 10:46:17 -07:00
JacobBarthelmeh cd3130fa7e add large sftp file transfer test case 2024-02-15 09:32:58 -07:00