mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-31 19:24:42 +02:00
Fix testsuite 32-bit build
This commit is contained in:
@@ -630,8 +630,7 @@ int main(int argc, char** argv)
|
||||
|
||||
wolfSSL_Cleanup();
|
||||
printf("\nAll tests passed!\n");
|
||||
|
||||
EXIT_TEST(EXIT_SUCCESS);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
|
@@ -70,19 +70,19 @@
|
||||
#else
|
||||
static ssize_t max_relative_heap_bytes = -1;
|
||||
#endif
|
||||
#define PRINT_HEAP_CHECKPOINT() { \
|
||||
#define PRINT_HEAP_CHECKPOINT() { \
|
||||
const ssize_t _rha = wolfCrypt_heap_peakAllocs_checkpoint() - heap_baselineAllocs; \
|
||||
const ssize_t _rhb = wolfCrypt_heap_peakBytes_checkpoint() - heap_baselineBytes; \
|
||||
printf(" relative heap peak usage: %d alloc%s, %d bytes\n", \
|
||||
(int)_rha, \
|
||||
_rha == 1 ? "" : "s", \
|
||||
(int)_rhb); \
|
||||
const ssize_t _rhb = wolfCrypt_heap_peakBytes_checkpoint() - heap_baselineBytes; \
|
||||
printf(" relative heap peak usage: %ld alloc%s, %ld bytes\n", \
|
||||
(long int)_rha, \
|
||||
_rha == 1 ? "" : "s", \
|
||||
(long int)_rhb); \
|
||||
if ((max_relative_heap_allocs > 0) && (_rha > max_relative_heap_allocs)) \
|
||||
return err_sys("heap allocs exceed designated max.", -1); \
|
||||
if ((max_relative_heap_bytes > 0) && (_rhb > max_relative_heap_bytes)) \
|
||||
return err_sys("heap bytes exceed designated max.", -1); \
|
||||
heap_baselineAllocs = wolfCrypt_heap_peakAllocs_checkpoint(); \
|
||||
heap_baselineBytes = wolfCrypt_heap_peakBytes_checkpoint(); \
|
||||
return err_sys("heap allocs exceed designated max.", -1); \
|
||||
if ((max_relative_heap_bytes > 0) && (_rhb > max_relative_heap_bytes)) \
|
||||
return err_sys("heap bytes exceed designated max.", -1); \
|
||||
heap_baselineAllocs = wolfCrypt_heap_peakAllocs_checkpoint(); \
|
||||
heap_baselineBytes = wolfCrypt_heap_peakBytes_checkpoint(); \
|
||||
}
|
||||
#else
|
||||
#define PRINT_HEAP_CHECKPOINT()
|
||||
|
@@ -3059,7 +3059,7 @@ int StackSizeHWMReset(void)
|
||||
#define STACK_SIZE_CHECKPOINT(...) ({ \
|
||||
ssize_t HWM = StackSizeHWM_OffsetCorrected(); \
|
||||
__VA_ARGS__; \
|
||||
printf(" relative stack peak usage = %d bytes\n", (int)HWM); \
|
||||
printf(" relative stack peak usage = %ld bytes\n", (long int)HWM); \
|
||||
StackSizeHWMReset(); \
|
||||
})
|
||||
|
||||
@@ -3067,10 +3067,10 @@ int StackSizeHWMReset(void)
|
||||
ssize_t HWM = StackSizeHWM_OffsetCorrected(); \
|
||||
int _ret; \
|
||||
__VA_ARGS__; \
|
||||
printf(" relative stack peak usage = %d bytes\n", (int)HWM); \
|
||||
printf(" relative stack peak usage = %ld bytes\n", (long int)HWM); \
|
||||
_ret = StackSizeHWMReset(); \
|
||||
if ((max >= 0) && (HWM > (ssize_t)(max))) { \
|
||||
printf(" relative stack usage at %s L%d exceeds designated max %d bytes.\n", __FILE__, __LINE__, (int)(max)); \
|
||||
printf(" relative stack usage at %s L%d exceeds designated max %ld bytes.\n", __FILE__, __LINE__, (long int)(max)); \
|
||||
_ret = -1; \
|
||||
} \
|
||||
_ret; \
|
||||
|
Reference in New Issue
Block a user