mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-08 12:10:59 +00:00
mbedtls unit tests: Allow for longer timeout using software SHA
Hardware SHA runs SHA operations faster than software...
This commit is contained in:

committed by
Angus Gratton

parent
6d03d42d2f
commit
fd9d889e62
@@ -165,8 +165,14 @@ TEST_CASE("mbedtls SHA self-tests multithreaded", "[mbedtls]")
|
||||
xTaskCreate(tskRunSHASelftests, "SHASelftests1", 8192, NULL, 3, NULL);
|
||||
xTaskCreate(tskRunSHASelftests, "SHASelftests2", 8192, NULL, 3, NULL);
|
||||
|
||||
#ifdef CONFIG_MBEDTLS_HARDWARE_SHA
|
||||
const int TIMEOUT_MS = 12000;
|
||||
#else
|
||||
const int TIMEOUT_MS = 20000; // Soft-only SHA may need a little longer
|
||||
#endif
|
||||
|
||||
for(int i = 0; i < 2; i++) {
|
||||
if(!xSemaphoreTake(done_sem, 12000/portTICK_PERIOD_MS)) {
|
||||
if(!xSemaphoreTake(done_sem, TIMEOUT_MS/portTICK_PERIOD_MS)) {
|
||||
TEST_FAIL_MESSAGE("done_sem not released by test task");
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user