From 8d0c1137c1a80ae80cd98829efdb407696a56b9f Mon Sep 17 00:00:00 2001 From: "Bernhard M. Wiedemann" Date: Thu, 29 Jul 2021 07:29:01 +0200 Subject: tests: make three tests pass until 2037 after 2038 something in test1915 fails on 32-bit OSes Closes #7512 --- tests/data/test1915 | 8 ++++---- tests/data/test493 | 2 +- tests/libtest/lib1915.c | 3 ++- 3 files changed, 7 insertions(+), 6 deletions(-) (limited to 'tests') diff --git a/tests/data/test1915 b/tests/data/test1915 index c47840adf..047a16e2e 100644 --- a/tests/data/test1915 +++ b/tests/data/test1915 @@ -41,10 +41,10 @@ http://%HOSTIP:%NOLISTENPORT/not-there/%TESTNUMBER 7 -[0/4] 1.example.com 20300320 01:02:03 -[1/4] 2.example.com 20300320 01:02:03 -[2/4] 3.example.com 20300320 01:02:03 -[3/4] 4.example.com 20300320 01:02:03 +[0/4] 1.example.com 20370320 01:02:03 +[1/4] 2.example.com 20370320 01:02:03 +[2/4] 3.example.com 20370320 01:02:03 +[3/4] 4.example.com 20370320 01:02:03 diff --git a/tests/data/test493 b/tests/data/test493 index 142b0c1c5..db053d105 100644 --- a/tests/data/test493 +++ b/tests/data/test493 @@ -33,7 +33,7 @@ https -.hsts.example "20311001 04:47:41" +.hsts.example "99991001 04:47:41" diff --git a/tests/libtest/lib1915.c b/tests/libtest/lib1915.c index 4e632d3ab..f4b38267e 100644 --- a/tests/libtest/lib1915.c +++ b/tests/libtest/lib1915.c @@ -49,7 +49,8 @@ static CURLSTScode hstsread(CURL *easy, struct curl_hstsentry *e, if(host && (strlen(host) < e->namelen)) { strcpy(e->name, host); e->includeSubDomains = FALSE; - strcpy(e->expire, "20300320 01:02:03"); /* curl turns 32 that day */ + strcpy(e->expire, "20370320 01:02:03"); /* curl turns 39 that day + just before 31-bit time_t overflow */ fprintf(stderr, "add '%s'\n", host); } else -- cgit v1.2.1