On 13. 1. 26 15:14, [email protected] wrote:
Author: brane
Date: Tue Jan 13 14:14:11 2026
New Revision: 1931293

Log:
Allow tests to only output messages from error callbacks, without
cluttering the output with low-level logging.

* test/test_serf.h
   (TEST_VERBOSE): Explain what the value does.

* test/test_util.c
   (setup_test_context): Register the error callback if TEST_VERBOSE > 0.
    Configure console logging if TEST_VERBOSE > 1.
   (test__log, test__log_nopref, test__log_skt): Require that the verbose_flag
    is greater than 1 in order to log anything.


Now, with #define TEST_VERBOSE 1, we can do something like this:

$ srcdir=$(cd ../serf-trunk/ && pwd) ./test/test_all ssl
ERROR: <120172> *g--- error:0A00042E:SSL routines::tlsv1 alert protocol version
ERROR: <120172> *g--- error:0A000410:SSL routines::ssl/tls alert handshake 
failure
.................................................
OK (49 tests)


without having to wade through several hundred lines of logging output.

-- Brane

Reply via email to