Reduce the runtime/output from the gmdiff test
authorPauli <pauli@openssl.org>
Sat, 8 May 2021 12:05:45 +0000 (22:05 +1000)
committerPauli <pauli@openssl.org>
Tue, 11 May 2021 08:15:06 +0000 (18:15 +1000)
Reduce from 1e6 iterations to 1e3.  Add additional cases to cover the same
range although most intermediate values will be skipped.

Fixes #15185

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15202)

test/gmdifftest.c

index 0d9b71a5c0850b5c4e5166b4d8acf0ecf5c73328..028816f6ded40451707a360bcaadaada923ccfd4 100644 (file)
@@ -49,10 +49,12 @@ static int check_time(long offset)
 
 static int test_gmtime(int offset)
 {
-    return check_time(offset) &&
-           check_time(-offset) &&
-           check_time(offset * 1000L) &&
-           check_time(-offset * 1000L);
+    return check_time(offset)
+           && check_time(-offset)
+           && check_time(offset * 1000L)
+           && check_time(-offset * 1000L)
+           && check_time(offset * 1000000L)
+           && check_time(-offset * 1000000L);
 }
 
 int setup_tests(void)
@@ -60,6 +62,6 @@ int setup_tests(void)
     if (sizeof(time_t) < 8)
         TEST_info("Skipping; time_t is less than 64-bits");
     else
-        ADD_ALL_TESTS_NOSUBTEST(test_gmtime, 1000000);
+        ADD_ALL_TESTS_NOSUBTEST(test_gmtime, 1000);
     return 1;
 }