mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2024-12-26 18:20:21 +00:00
debug: Add usage of MBEDTLS_PRINTF_SIZET in print_msg test
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
This commit is contained in:
parent
bc5d9165ae
commit
53b52b76bd
@ -1,8 +1,8 @@
|
||||
Debug print msg (threshold 1, level 0)
|
||||
debug_print_msg_threshold:1:0:"MyFile":999:"MyFile(0999)\: Text message, 2 == 2\n"
|
||||
debug_print_msg_threshold:1:0:"MyFile":999:"MyFile(0999)\: Text message, 2 == 2, len=10\n"
|
||||
|
||||
Debug print msg (threshold 1, level 1)
|
||||
debug_print_msg_threshold:1:1:"MyFile":999:"MyFile(0999)\: Text message, 2 == 2\n"
|
||||
debug_print_msg_threshold:1:1:"MyFile":999:"MyFile(0999)\: Text message, 2 == 2, len=10\n"
|
||||
|
||||
Debug print msg (threshold 1, level 2)
|
||||
debug_print_msg_threshold:1:2:"MyFile":999:""
|
||||
|
@ -57,6 +57,7 @@ void debug_print_msg_threshold(int threshold, int level, char *file,
|
||||
mbedtls_ssl_context ssl;
|
||||
mbedtls_ssl_config conf;
|
||||
struct buffer_data buffer;
|
||||
size_t len = 10;
|
||||
|
||||
MD_PSA_INIT();
|
||||
|
||||
@ -77,7 +78,8 @@ void debug_print_msg_threshold(int threshold, int level, char *file,
|
||||
mbedtls_debug_set_threshold(threshold);
|
||||
|
||||
mbedtls_debug_print_msg(&ssl, level, file, line,
|
||||
"Text message, 2 == %d", 2);
|
||||
"Text message, 2 == %d, len=%" MBEDTLS_PRINTF_SIZET,
|
||||
2, len);
|
||||
|
||||
TEST_ASSERT(strcmp(buffer.buf, result_str) == 0);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user