1
mirror of https://github.com/jedisct1/libsodium.git synced 2024-12-20 10:37:24 -07:00

Skip the misuse handler test when running benchmarks or wasm

This commit is contained in:
Frank Denis 2022-12-20 13:17:11 +01:00
parent 62424f2840
commit 6d726c70e4

View File

@ -31,11 +31,11 @@ main(void)
(void) sodium_runtime_has_rdrand(); (void) sodium_runtime_has_rdrand();
sodium_set_misuse_handler(misuse_handler); sodium_set_misuse_handler(misuse_handler);
#ifndef __EMSCRIPTEN__ #if defined(__EMSCRIPTEN__) || defined(__wasm__) || defined(BENCHMARKS)
printf("misuse_handler()\n");
#else
sodium_misuse(); sodium_misuse();
printf("Misuse handler returned\n"); printf("Misuse handler returned\n");
#else
printf("misuse_handler()\n");
#endif #endif
return 0; return 0;