test/asn1_time_test.c: make it work on 64-bit HP-UX.
authorAndy Polyakov <appro@openssl.org>
Sat, 24 Mar 2018 19:45:43 +0000 (20:45 +0100)
committerAndy Polyakov <appro@openssl.org>
Sun, 8 Apr 2018 09:17:44 +0000 (11:17 +0200)
HP-UX gmtime fails with ERANGE past 19011213204552Z, so skip some tests.

Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5742)

test/asn1_time_test.c

index 25105c6b72e88e4c5ed96ad3d1bf4e23bc2730c5..1df630f2da2d9a2166396636e4a603f244b568f5 100644 (file)
@@ -346,10 +346,12 @@ int setup_tests(void)
     if (sizeof(time_t) > sizeof(uint32_t)) {
         TEST_info("Adding 64-bit time_t tests");
         ADD_ALL_TESTS(test_table_pos_64bit, OSSL_NELEM(tbl_testdata_pos_64bit));
+#ifndef __hpux
         if (!(t > 0) && ptm != NULL) {
             TEST_info("Adding negative-sign 64-bit time_t tests");
             ADD_ALL_TESTS(test_table_neg_64bit, OSSL_NELEM(tbl_testdata_neg_64bit));
         }
+#endif
     }
     ADD_ALL_TESTS(test_table_compare, OSSL_NELEM(tbl_compare_testdata));
     return 1;