]> git.ipfire.org Git - thirdparty/kmod.git/commitdiff
testsuite/test-util: add extra get_backoff_delta_msec iteration
authorEmil Velikov <emil.l.velikov@gmail.com>
Fri, 30 May 2025 10:21:32 +0000 (11:21 +0100)
committerLucas De Marchi <lucas.de.marchi@gmail.com>
Wed, 11 Jun 2025 12:54:40 +0000 (07:54 -0500)
Add an extra test to check delta does not exceed the upper boundary.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/361
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
testsuite/test-util.c

index 13bdf1c0bcbb3e1342b4969be6c33e4cd29133a1..7f71ef2ab7d39029e594b35fdf48d0cd6b6242c6 100644 (file)
@@ -270,6 +270,8 @@ static int test_backoff_time(void)
        assert_return(delta == 4, EXIT_FAILURE);
        get_backoff_delta_msec(now_msec() + 10, &delta);
        assert_return(delta == 8, EXIT_FAILURE);
+       get_backoff_delta_msec(now_msec() + 10, &delta);
+       assert_return(delta == 8, EXIT_FAILURE);
 
        {
                /* Check tail */