Commit c90e160fe2 for openssl.org
commit c90e160fe24903ec39c7f1d96ae0df31133e362e
Author: Pauli <paul.dale@oracle.com>
Date: Wed Jan 14 08:14:19 2026 +1100
test: fix endecode_test in light of test_strn2 removal
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)
diff --git a/test/endecode_test.c b/test/endecode_test.c
index 6081ef5d0b..538907b363 100644
--- a/test/endecode_test.c
+++ b/test/endecode_test.c
@@ -33,8 +33,8 @@ OSSL_provider_init_fn ossl_legacy_provider_init;
/* Extended test macros to allow passing file & line number */
#define TEST_FL_ptr(a) test_ptr(file, line, #a, a)
#define TEST_FL_mem_eq(a, m, b, n) test_mem_eq(file, line, #a, #b, a, m, b, n)
-#define TEST_FL_strn_eq(a, b, n) test_strn_eq(file, line, #a, #b, a, n, b, n)
-#define TEST_FL_strn2_eq(a, m, b, n) test_strn_eq(file, line, #a, #b, a, m, b, n)
+#define TEST_FL_strn_eq(a, b, n) test_strn_eq(file, line, #a, #b, a, b, n)
+#define TEST_FL_size_t_eq(a, b) test_size_t_eq(file, line, #a, #b, a, b)
#define TEST_FL_int_eq(a, b) test_int_eq(file, line, #a, #b, a, b)
#define TEST_FL_int_ge(a, b) test_int_ge(file, line, #a, #b, a, b)
#define TEST_FL_int_gt(a, b) test_int_gt(file, line, #a, #b, a, b)
@@ -507,7 +507,8 @@ static int test_text(const char *file, const int line,
const void *data1, size_t data1_len,
const void *data2, size_t data2_len)
{
- return TEST_FL_strn2_eq(data1, data1_len, data2, data2_len);
+ return TEST_FL_size_t_eq(data1_len, data2_len)
+ && TEST_FL_strn_eq(data1, data2, data1_len);
}
static int test_mem(const char *file, const int line,