From 6bda10abd08c0733920850c89ccda391f2ce32ba Mon Sep 17 00:00:00 2001 From: effbiae Date: Sat, 13 Sep 2025 13:00:02 +1000 Subject: [PATCH] define WOLFSSL_SMALL_STACK in tests and benchmark for ASYNC --- tests/api/test_rsa.c | 4 ++++ wolfcrypt/benchmark/benchmark.c | 3 +++ wolfcrypt/test/test.c | 4 ++++ 3 files changed, 11 insertions(+) diff --git a/tests/api/test_rsa.c b/tests/api/test_rsa.c index 97354217e..40786e467 100644 --- a/tests/api/test_rsa.c +++ b/tests/api/test_rsa.c @@ -28,6 +28,10 @@ #include #endif +#ifdef WOLFSSL_ASYNC_CRYPT + #define WOLFSSL_SMALL_STACK +#endif + #include #include #include diff --git a/wolfcrypt/benchmark/benchmark.c b/wolfcrypt/benchmark/benchmark.c index a4f2df83a..8e77f5800 100644 --- a/wolfcrypt/benchmark/benchmark.c +++ b/wolfcrypt/benchmark/benchmark.c @@ -69,6 +69,9 @@ /* Macro to disable benchmark */ #ifndef NO_CRYPT_BENCHMARK +#ifdef WOLFSSL_ASYNC_CRYPT + #define WOLFSSL_SMALL_STACK +#endif #define WC_ALLOC_DO_ON_FAILURE() do { printf("out of memory at benchmark.c L %d\n", __LINE__); ret = MEMORY_E; goto exit; } while (0) #include diff --git a/wolfcrypt/test/test.c b/wolfcrypt/test/test.c index b03b70089..1e8c87d45 100644 --- a/wolfcrypt/test/test.c +++ b/wolfcrypt/test/test.c @@ -43,6 +43,10 @@ #define WOLFSSL_DEBUG_TRACE_ERROR_CODES_ALWAYS #endif +#ifdef WOLFSSL_ASYNC_CRYPT + #define WOLFSSL_SMALL_STACK +#endif + #if !defined(NO_CRYPT_TEST) || defined(WC_TEST_EXPORT_SUBTESTS) #include