]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
test: relax cread_test time constraint
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Sun, 23 Nov 2025 22:57:08 +0000 (23:57 +0100)
committerTom Rini <trini@konsulko.com>
Fri, 5 Dec 2025 14:54:44 +0000 (08:54 -0600)
The ppce500 is not as fine grained as expected.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
test/common/cread.c

index 4926c21680353d89ce7968869ebe2d04de9f2542..5afc7397212423177660805f5cf8097b0e93f5b3 100644 (file)
@@ -90,13 +90,14 @@ static int cread_test(struct unit_test_state *uts)
        ut_asserteq(5, cli_readline_into_buffer("-> ", buf, 1));
        ut_asserteq_str("abcXx", buf);
 
-       /* check timeout, should be between 1000 and 1050ms */
+       /* check timeout, should be between 900 and 1100ms */
        start = get_timer(0);
        *buf = '\0';
        ut_asserteq(-2, cli_readline_into_buffer("-> ", buf, 1));
-       duration = get_timer(start) - 1000;
-       ut_assert(duration >= 0);
-       ut_assert(duration < 50);
+       printf("get_timer(start): %ld", get_timer(start));
+       duration = get_timer(start);
+       ut_assert(duration >= 900);
+       ut_assert(duration < 1100);
 
        return 0;
 }