From: Pauli Date: Tue, 13 Jan 2026 21:14:19 +0000 (+1100) Subject: test: fix endecode_test in light of test_strn2 removal X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c90e160fe24903ec39c7f1d96ae0df31133e362e;p=thirdparty%2Fopenssl.git test: fix endecode_test in light of test_strn2 removal Reviewed-by: Norbert Pocs Reviewed-by: Nikola Pajkovsky Reviewed-by: Frederik Wedel-Heinen (Merged from https://github.com/openssl/openssl/pull/29627) --- diff --git a/test/endecode_test.c b/test/endecode_test.c index 6081ef5d0be..538907b363b 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,