From 2cf4715cb65495dd4d134ef749f6b293a5a7ebab Mon Sep 17 00:00:00 2001 From: Christopher Haster Date: Wed, 22 Nov 2017 17:19:16 -0600 Subject: [PATCH] littlefs: Increased test timeout to 4 minutes Unfortunately there are several issues colluding to force the timeout this high. 1. The tests push littlefs to the limits of how many errors it can handle before failing. As a side effect this causes a massive amount of debug/warn/error logging about the situation. 2. The logging can't be turned off for specific tests. Note: This might change with the introduction of test-configs. 3. Logging is fixed to a baud rate of 9600. Previous testing was carried out with a baud rate of 115200, which is the reason for the original timeout. --- features/filesystem/littlefs/TESTS/filesystem/dirs/main.cpp | 2 +- .../filesystem/littlefs/TESTS/filesystem/files/main.cpp | 2 +- .../littlefs/TESTS/filesystem/interspersed/main.cpp | 2 +- features/filesystem/littlefs/TESTS/filesystem/seek/main.cpp | 2 +- .../littlefs/TESTS/filesystem_recovery/resilience/main.cpp | 6 +++++- .../filesystem_recovery/resilience_functional/main.cpp | 6 +++++- .../TESTS/filesystem_recovery/wear_leveling/main.cpp | 6 +++++- .../littlefs/TESTS/filesystem_retarget/dirs/main.cpp | 2 +- .../littlefs/TESTS/filesystem_retarget/files/main.cpp | 2 +- .../TESTS/filesystem_retarget/interspersed/main.cpp | 2 +- .../littlefs/TESTS/filesystem_retarget/seek/main.cpp | 2 +- 11 files changed, 23 insertions(+), 11 deletions(-) diff --git a/features/filesystem/littlefs/TESTS/filesystem/dirs/main.cpp b/features/filesystem/littlefs/TESTS/filesystem/dirs/main.cpp index f98db60bf4..42f60f0d4e 100644 --- a/features/filesystem/littlefs/TESTS/filesystem/dirs/main.cpp +++ b/features/filesystem/littlefs/TESTS/filesystem/dirs/main.cpp @@ -52,7 +52,7 @@ using namespace utest::v1; #endif #ifndef MBED_TEST_TIMEOUT -#define MBED_TEST_TIMEOUT 120 +#define MBED_TEST_TIMEOUT 480 #endif diff --git a/features/filesystem/littlefs/TESTS/filesystem/files/main.cpp b/features/filesystem/littlefs/TESTS/filesystem/files/main.cpp index 702cf68d80..658867bdb7 100644 --- a/features/filesystem/littlefs/TESTS/filesystem/files/main.cpp +++ b/features/filesystem/littlefs/TESTS/filesystem/files/main.cpp @@ -52,7 +52,7 @@ using namespace utest::v1; #endif #ifndef MBED_TEST_TIMEOUT -#define MBED_TEST_TIMEOUT 120 +#define MBED_TEST_TIMEOUT 480 #endif diff --git a/features/filesystem/littlefs/TESTS/filesystem/interspersed/main.cpp b/features/filesystem/littlefs/TESTS/filesystem/interspersed/main.cpp index c1de477399..c16a6f5629 100644 --- a/features/filesystem/littlefs/TESTS/filesystem/interspersed/main.cpp +++ b/features/filesystem/littlefs/TESTS/filesystem/interspersed/main.cpp @@ -52,7 +52,7 @@ using namespace utest::v1; #endif #ifndef MBED_TEST_TIMEOUT -#define MBED_TEST_TIMEOUT 120 +#define MBED_TEST_TIMEOUT 480 #endif diff --git a/features/filesystem/littlefs/TESTS/filesystem/seek/main.cpp b/features/filesystem/littlefs/TESTS/filesystem/seek/main.cpp index 7235df31eb..1f00ca476b 100644 --- a/features/filesystem/littlefs/TESTS/filesystem/seek/main.cpp +++ b/features/filesystem/littlefs/TESTS/filesystem/seek/main.cpp @@ -52,7 +52,7 @@ using namespace utest::v1; #endif #ifndef MBED_TEST_TIMEOUT -#define MBED_TEST_TIMEOUT 120 +#define MBED_TEST_TIMEOUT 480 #endif diff --git a/features/filesystem/littlefs/TESTS/filesystem_recovery/resilience/main.cpp b/features/filesystem/littlefs/TESTS/filesystem_recovery/resilience/main.cpp index ac51f4be5f..b43f6bdab4 100644 --- a/features/filesystem/littlefs/TESTS/filesystem_recovery/resilience/main.cpp +++ b/features/filesystem/littlefs/TESTS/filesystem_recovery/resilience/main.cpp @@ -41,6 +41,10 @@ using namespace utest::v1; #define MBED_TEST_CYCLES 10 #endif +#ifndef MBED_TEST_TIMEOUT +#define MBED_TEST_TIMEOUT 480 +#endif + // declarations #define STRINGIZE(x) STRINGIZE2(x) #define STRINGIZE2(x) #x @@ -89,7 +93,7 @@ Case cases[] = { utest::v1::status_t greentea_test_setup(const size_t number_of_cases) { - GREENTEA_SETUP(120, "default_auto"); + GREENTEA_SETUP(MBED_TEST_TIMEOUT, "default_auto"); return greentea_test_setup_handler(number_of_cases); } diff --git a/features/filesystem/littlefs/TESTS/filesystem_recovery/resilience_functional/main.cpp b/features/filesystem/littlefs/TESTS/filesystem_recovery/resilience_functional/main.cpp index bfc319d074..f0ea4afe23 100644 --- a/features/filesystem/littlefs/TESTS/filesystem_recovery/resilience_functional/main.cpp +++ b/features/filesystem/littlefs/TESTS/filesystem_recovery/resilience_functional/main.cpp @@ -44,6 +44,10 @@ using namespace utest::v1; #define MBED_TEST_CYCLES 10 #endif +#ifndef MBED_TEST_TIMEOUT +#define MBED_TEST_TIMEOUT 480 +#endif + // declarations #define STRINGIZE(x) STRINGIZE2(x) #define STRINGIZE2(x) #x @@ -95,7 +99,7 @@ static cmd_status_t handle_command(const char *key, const char *value) int main() { - GREENTEA_SETUP(120, "unexpected_reset"); + GREENTEA_SETUP(MBED_TEST_TIMEOUT, "unexpected_reset"); static char _key[10 + 1] = {}; static char _value[128 + 1] = {}; diff --git a/features/filesystem/littlefs/TESTS/filesystem_recovery/wear_leveling/main.cpp b/features/filesystem/littlefs/TESTS/filesystem_recovery/wear_leveling/main.cpp index c382296d8c..85a9736205 100644 --- a/features/filesystem/littlefs/TESTS/filesystem_recovery/wear_leveling/main.cpp +++ b/features/filesystem/littlefs/TESTS/filesystem_recovery/wear_leveling/main.cpp @@ -42,6 +42,10 @@ using namespace utest::v1; #define MBED_TEST_ERASE_CYCLES 100 #endif +#ifndef MBED_TEST_TIMEOUT +#define MBED_TEST_TIMEOUT 480 +#endif + // declarations #define STRINGIZE(x) STRINGIZE2(x) #define STRINGIZE2(x) #x @@ -105,7 +109,7 @@ Case cases[] = { utest::v1::status_t greentea_test_setup(const size_t number_of_cases) { - GREENTEA_SETUP(120, "default_auto"); + GREENTEA_SETUP(MBED_TEST_TIMEOUT, "default_auto"); return greentea_test_setup_handler(number_of_cases); } diff --git a/features/filesystem/littlefs/TESTS/filesystem_retarget/dirs/main.cpp b/features/filesystem/littlefs/TESTS/filesystem_retarget/dirs/main.cpp index 1c4e62863b..31d271b121 100644 --- a/features/filesystem/littlefs/TESTS/filesystem_retarget/dirs/main.cpp +++ b/features/filesystem/littlefs/TESTS/filesystem_retarget/dirs/main.cpp @@ -52,7 +52,7 @@ using namespace utest::v1; #endif #ifndef MBED_TEST_TIMEOUT -#define MBED_TEST_TIMEOUT 120 +#define MBED_TEST_TIMEOUT 480 #endif diff --git a/features/filesystem/littlefs/TESTS/filesystem_retarget/files/main.cpp b/features/filesystem/littlefs/TESTS/filesystem_retarget/files/main.cpp index df14557eb9..c9deae2d92 100644 --- a/features/filesystem/littlefs/TESTS/filesystem_retarget/files/main.cpp +++ b/features/filesystem/littlefs/TESTS/filesystem_retarget/files/main.cpp @@ -52,7 +52,7 @@ using namespace utest::v1; #endif #ifndef MBED_TEST_TIMEOUT -#define MBED_TEST_TIMEOUT 120 +#define MBED_TEST_TIMEOUT 480 #endif diff --git a/features/filesystem/littlefs/TESTS/filesystem_retarget/interspersed/main.cpp b/features/filesystem/littlefs/TESTS/filesystem_retarget/interspersed/main.cpp index 250016ef67..f622c01a6a 100644 --- a/features/filesystem/littlefs/TESTS/filesystem_retarget/interspersed/main.cpp +++ b/features/filesystem/littlefs/TESTS/filesystem_retarget/interspersed/main.cpp @@ -52,7 +52,7 @@ using namespace utest::v1; #endif #ifndef MBED_TEST_TIMEOUT -#define MBED_TEST_TIMEOUT 120 +#define MBED_TEST_TIMEOUT 480 #endif diff --git a/features/filesystem/littlefs/TESTS/filesystem_retarget/seek/main.cpp b/features/filesystem/littlefs/TESTS/filesystem_retarget/seek/main.cpp index c37383e76c..24ad870533 100644 --- a/features/filesystem/littlefs/TESTS/filesystem_retarget/seek/main.cpp +++ b/features/filesystem/littlefs/TESTS/filesystem_retarget/seek/main.cpp @@ -52,7 +52,7 @@ using namespace utest::v1; #endif #ifndef MBED_TEST_TIMEOUT -#define MBED_TEST_TIMEOUT 120 +#define MBED_TEST_TIMEOUT 480 #endif