openafs/tests/rx
Cheyenne Wills 6ace773fdc tests: rx/perf wait for server init before client
The rx/perf test can occasionally fail due to the rxperf server not
being fully initialized before the client started. This can cause test
errors, even without changes to the rx code.

 C_TAP_VERBOSE=1 make check TESTS="rx/perf"
 ...
 rx/perf

 1..4
 ok 1 - Started rxperf server
 not ok 2 - single threaded client ran successfully
 RPC: threads	30, times	1, write bytes	1048576, read bytes...
 ok 3 - multi threaded client ran succesfully
 ok 4 - Server exited succesfully
 FAILED 2 (exit status 1)

Add a routine that waits for the rx_perf server to become available.
Loop several times trying the connection via the rx_perf client, with
a short delay between retries.  If the connection cannot be established,
fail the test.

Clean up trailing whitespace on a couple of lines.

Note: This failure was observed in an OpenAFS buildbot worker that
included a make tests, and which would occasionally fail when there was
no rx related code changes. The intermittent failure could be duplicated
on a slower virtual test system, but would not fail on a faster system.

Thanks to mmeffie@sinenomine.net for the 'wait_for_server' contribution.

Change-Id: Ie11e0d726ce287c45a677f3bb799388121aafc1e
Reviewed-on: https://gerrit.openafs.org/15676
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
2024-04-11 17:45:00 -04:00
..
.gitignore tests: Add unit tests for rx_atomic.h 2023-03-01 23:04:04 -05:00
atomic-t.c tests: Add unit tests for rx_atomic.h 2023-03-01 23:04:04 -05:00
event-t.c tests: fix potential divide by zero condition 2021-01-22 19:36:36 -05:00
Makefile.in tests: Add unit tests for rx_atomic.h 2023-03-01 23:04:04 -05:00
perf-t tests: rx/perf wait for server init before client 2024-04-11 17:45:00 -04:00