1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-12-24 17:41:01 +03:00

Adjust logic around log pattern

This is more flexible: the test data gets to decide whether we want to
assert the presence of a pattern or not.

Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
This commit is contained in:
Manuel Pégourié-Gonnard
2025-03-11 10:12:30 +01:00
parent d2197afa37
commit 4712b3e6b8
2 changed files with 8 additions and 10 deletions

View File

@@ -5102,9 +5102,7 @@ void inject_client_content_on_the_wire(int pk_alg,
ret = mbedtls_ssl_handshake_step(&server.ssl);
} while (ret == 0 && server.ssl.state == state);
TEST_EQUAL(ret, expected_ret);
/* If we're expected to suceeed and we do, that's enough.
* If we're expected to fail, also check it was in the expected way. */
if (expected_ret != 0) {
if (strlen(log_pattern) != 0) {
TEST_EQUAL(srv_pattern.counter, 1);
}