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>
diff --git a/tests/suites/test_suite_ssl.function b/tests/suites/test_suite_ssl.function
index c365fd6..e48cae7 100644
--- a/tests/suites/test_suite_ssl.function
+++ b/tests/suites/test_suite_ssl.function
@@ -5078,9 +5078,7 @@
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);
}