From: Emil Velikov Date: Thu, 19 Jun 2025 16:41:22 +0000 (+0200) Subject: testsuite: add test for get_backoff_delta_msec X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f71f74efa07ec289edfbd975ae1681cda506e26f;p=thirdparty%2Fkmod.git testsuite: add test for get_backoff_delta_msec Signed-off-by: Tobias Stoeckmann Link: https://github.com/kmod-project/kmod/pull/377 Signed-off-by: Lucas De Marchi --- diff --git a/testsuite/test-util.c b/testsuite/test-util.c index 0421f592..eeefa3e0 100644 --- a/testsuite/test-util.c +++ b/testsuite/test-util.c @@ -286,6 +286,11 @@ static int test_backoff_time(void) assert_return(delta == 0, EXIT_FAILURE); } + /* Check when end time has passed */ + delta = 0; + get_backoff_delta_msec(now_msec() - 10, &delta); + assert_return(delta == 0, EXIT_FAILURE); + return EXIT_SUCCESS; } DEFINE_TEST(test_backoff_time,