mirror of
https://github.com/ARMmbed/mbedtls.git
synced 2025-06-26 15:07:59 +08:00
Add testcase for MBEDTLS_PRINTF_MS_TIME
Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
This commit is contained in:
parent
85d92ec1ce
commit
9cde9d4b2c
@ -5,6 +5,9 @@ printf_int_expr:(uintptr_t) "%" MBEDTLS_PRINTF_SIZET:sizeof(size_t):0:"0"
|
|||||||
printf "%" MBEDTLS_PRINTF_LONGLONG, 0
|
printf "%" MBEDTLS_PRINTF_LONGLONG, 0
|
||||||
printf_int_expr:(uintptr_t) "%" MBEDTLS_PRINTF_LONGLONG:sizeof(long long):0:"0"
|
printf_int_expr:(uintptr_t) "%" MBEDTLS_PRINTF_LONGLONG:sizeof(long long):0:"0"
|
||||||
|
|
||||||
|
printf "%" MBEDTLS_PRINTF_MS_TIME, 0
|
||||||
|
printf_int_expr:(uintptr_t) "%" MBEDTLS_PRINTF_MS_TIME:MBEDTLS_MS_TIME_SIZE:0:"0"
|
||||||
|
|
||||||
Debug print msg (threshold 1, level 0)
|
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\n"
|
||||||
|
|
||||||
|
@ -4,6 +4,15 @@
|
|||||||
#include "mbedtls/pk.h"
|
#include "mbedtls/pk.h"
|
||||||
#include <test/ssl_helpers.h>
|
#include <test/ssl_helpers.h>
|
||||||
|
|
||||||
|
// Use a macro instead of sizeof(mbedtls_ms_time_t) because the expression store
|
||||||
|
// doesn't exclude entries based on depends_on headers, which would cause failures
|
||||||
|
// in builds without MBEDTLS_HAVE_TIME
|
||||||
|
#if defined(MBEDTLS_PLATFORM_MS_TIME_TYPE_MACRO)
|
||||||
|
# define MBEDTLS_MS_TIME_SIZE sizeof(MBEDTLS_PLATFORM_MS_TIME_TYPE_MACRO)
|
||||||
|
#else
|
||||||
|
# define MBEDTLS_MS_TIME_SIZE sizeof(int64_t)
|
||||||
|
#endif
|
||||||
|
|
||||||
struct buffer_data {
|
struct buffer_data {
|
||||||
char buf[2000];
|
char buf[2000];
|
||||||
char *ptr;
|
char *ptr;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user