1
0
mirror of https://github.com/wolfSSL/wolfssl.git synced 2026-10-24 04:09:07 +03:00

13 Commits

Author SHA1 Message Date
Paul Adelsbach
b34f33a5c8 CI: increase timeouts in workflow scripts 2026-10-05 09:48:59 -07:00
Sean Parkinson
e36beda7bf Regression testing fixes
Fix guard around inclunde of chacha20_poly1305.h in internal.h for when
session ticket is not ChaCha20-Poly1305.

Fix port allocation and readiness testing in scripts.
Fix other issues in the scripts as well.
Update test.h code around ready file.

For LTO compiles, all functions must be used.
Make sure the assembly functions are marked as 'used' when not called
internally.

Fix a race in the example client that intermittently failed
scripts/unit.test on TLS 1.3 non-blocking session resumption.

RISC-V 64-bit: s0 needed but functions need to omit frame pointer.

Have source matching generated code again.
2026-09-03 20:59:54 +10:00
Juliusz Sosinowicz
1fa1228ba1 Address review: make the hang guards actually fire
Three ways the bounds added here failed to do their job:

- get_first_free_port ended the scan cap with 'exit 1', but every caller
  runs it in a command substitution, so only the subshell died. The port
  variable came back empty, the next $((port + 1)) evaluated to 1, and the
  run limped on to a confusing wait_for_readyFile failure. Forcing the cap
  on ocsp-stapling.test: before, the script ran on and hung until an outer
  timeout killed it; now it exits 1 at the error. Return instead, and check
  the status at all 25 call sites across the six scripts.

- The macOS timeout shim was a shell function. Backgrounding a function
  forks a subshell, so $! was the subshell and cleanup killed that while
  the server it was meant to stop leaked. Use a prefix variable that
  expands to nothing when timeout(1) is absent, keeping $! the real pid.

- timeout -s KILL exits 137, not 124. Sites that read $? and treat any
  non-zero as 'feature not compiled in' turned a hang into exit 0, so the
  bound made a hang less visible than before. Add timed_out() and check it
  before those skip branches; use it for the version probes too, which
  matched any status >= 124.
2026-08-13 15:52:17 +00:00
Juliusz Sosinowicz
fb3c892931 Bound remaining hangable operations in test scripts
A test script that blocks forever burns the CI job's full
timeout-minutes with no logs. e82ecdff93 and 5c5cbd3094 bounded the
waited-on servers; this covers the remaining hang classes in
scripts/*.test:

- Wrap foreground example client/server, openssl s_client, and
  openssl ocsp invocations in "timeout -s KILL 2m". A client wedged
  before or without a live peer (e.g. blocked in first-seed entropy
  gathering, or DTLS with no reset from a dead peer) is not bounded
  by its peer's timeout.
- Add the macOS timeout() fallback shim to scripts that now use
  timeout.
- Bound the get_first_free_port scan loops (nc -w 1, 100-port cap).
- Add -w 1 to the remaining nc probes and dtls.test UDP pcap markers.
- ocsp-responder-openssl-interop.test: bound the responder reap in
  cleanup: give each responder 5 s to exit after SIGTERM, then
  SIGKILL before waiting, so a wedged responder cannot hang the EXIT
  trap.
- benchmark.test: bound the clients but leave the -i servers
  unwrapped: the script ends them with kill -6, which timeout(1)
  does not forward, so wrapping would orphan the server.
- trusted_peer/tls13: kill the server with SIGTERM instead of
  SIGKILL in cleanup so the signal forwards through the timeout
  wrapper to the wrapped server.
2026-08-13 15:52:17 +00:00
Daniel Pouzzner
e4fab90938 scripts/*.test: in kill -0 PID existence tests, close stderr to silence noise. 2026-04-14 23:23:53 -05:00
Daniel Pouzzner
96199467f9 scripts/*.test: delay reaping servers in cleanup handlers to allow sanitizers to finish rendering backtraces. 2026-04-14 23:09:20 -05:00
Juliusz Sosinowicz
fd63d6c20e Add bwrap network namespace isolation to scripts with listening ports
Add NETWORK_UNSHARE_HELPER/bwrap wrapping to benchmark.test,
openssl_srtp.test, and sniffer-gen.sh to isolate network namespaces and
prevent port collisions when tests run concurrently. sniffer-gen.sh uses
--cap-add ALL (like dtls.test) since it runs tcpdump. ocsp-stapling.test
is excluded because it connects to external servers (login.live.com).
2026-04-09 13:56:14 +02:00
Juliusz Sosinowicz
5f755f6bd5 Fix compilation checks in test scripts
Correct the logic for checking if the client and server examples are compiled
in the test scripts. The previous logic was inverted, causing the tests to
always skip if the examples *were* compiled.
2026-02-10 13:14:55 +01:00
Daniel Pouzzner
c9a7393923 fixes for shell script errors detected by shellcheck --severity=error. 2022-03-08 12:51:48 -06:00
Hayden Roche
5fdc4cf6e1 Fix RX/TX throughput reporting in example server.
- I observed that client TX throughput < client RX throughput, but server TX
  throughput > server RX throughput. Turns out this is just a typo in the
  printing of the stats. The RX stat was being printed as the TX stat and vice-
  versa.
- I added a note to scripts/benchmark.test about a 2 second sleep we do waiting
  for the server to come up. If you were to time this script with the time
  command, you'll see that 2 seconds in the result, which might be confusing
  if you didn't realize the sleep was there.
2020-12-08 16:49:09 -06:00
Eric Blankenhorn
b83804cb9d Correct misspellings and typos from codespell tool 2019-12-24 12:29:33 -06:00
Michael Shihrer
fa94f5ffe9 Replaced == with -eq to fix benchmark.test scripting error 2016-05-20 09:43:30 -06:00
David Garske
fdab3943be Added throughput benchmarking for client/server examples and added helper script "scripts/benchmark.test". Added example client option: "-B <num>" Benchmarking throughput. Added example server options: "-B <num>" Benchmark throughput, "-e" Echo data, "-i" Loop / Accept multiple connections. Cleanup of the include.am for examples. Cleanup of tcp_connect with DTLS enabled. Cleanup of the valid socket checking. Cleanup trailing whitespace. 2015-10-14 19:13:45 -07:00