test: fix tests in lightof test_strn2_ removals

Reviewed-by: Norbert Pocs <norbertp@openssl.org>
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
Reviewed-by: Frederik Wedel-Heinen <fwh.openssl@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/29627)
This commit is contained in:
Pauli
2026-01-14 08:14:38 +11:00
parent c90e160fe2
commit 22e1d8971b
2 changed files with 3 additions and 3 deletions

View File

@@ -293,8 +293,8 @@ static int test_membio_str_eq(BIO *bio_provided, BIO *bio_legacy)
return TEST_long_ge(len_legacy, 0)
&& TEST_long_ge(len_provided, 0)
&& TEST_strn2_eq(str_provided, len_provided,
str_legacy, len_legacy);
&& TEST_size_t_eq(len_provided, len_legacy)
&& TEST_strn_eq(str_provided, str_legacy, len_provided);
}
static int test_protected_PEM(const char *keytype, int evp_type,

View File

@@ -147,7 +147,7 @@ static int test_trace_channel(void)
ret = put_trace_output();
len = BIO_get_mem_data(bio, &p_buf);
if (!TEST_strn2_eq(p_buf, len, expected, expected_len))
if (!TEST_size_t_eq(len, expected_len) || !TEST_strn_eq(p_buf, expected, len))
ret = 0;
ret = TEST_int_eq(OSSL_trace_set_channel(OSSL_TRACE_CATEGORY_HTTP, NULL), 1)
&& ret;