From 652c171e1fcad4ec9b77933babc33a17dad51cb8 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sat, 19 Aug 2023 21:20:03 +0200 Subject: [PATCH] [PATCH] tests: add 'large-time' as a testable feature This allows test cases to require this feature to run and to be used in %if conditions. Large here means larger than 32 bits. Ie does not suffer from y2038. Closes #11696 Backported by: Aquila Macedo Costa . Changes: - Refresh patch context Gbp-Pq: Name large-time-testable-feature.patch --- tests/FILEFORMAT.md | 1 + tests/runtests.pl | 1 + tests/server/disabled.c | 3 +++ 3 files changed, 5 insertions(+) diff --git a/tests/FILEFORMAT.md b/tests/FILEFORMAT.md index aff0e2d4..65df41cd 100644 --- a/tests/FILEFORMAT.md +++ b/tests/FILEFORMAT.md @@ -417,6 +417,7 @@ Features testable here are: - `ipv6` - `Kerberos` - `large_file` +- `large-time` (time_t is larger than 32 bit) - `ld_preload` - `libssh2` - `libssh` diff --git a/tests/runtests.pl b/tests/runtests.pl index 1510527e..c4c7717c 100755 --- a/tests/runtests.pl +++ b/tests/runtests.pl @@ -3064,6 +3064,7 @@ sub setupfeatures { $feature{"wakeup"} = 1; $feature{"headers-api"} = 1; $feature{"xattr"} = 1; + $feature{"large-time"} = 1; $feature{"nghttpx"} = !!$ENV{'NGHTTPX'}; $feature{"nghttpx-h3"} = !!$nghttpx_h3; } diff --git a/tests/server/disabled.c b/tests/server/disabled.c index 7ce29038..48cf8783 100644 --- a/tests/server/disabled.c +++ b/tests/server/disabled.c @@ -78,6 +78,9 @@ static const char *disabled[]={ #endif #ifndef USE_XATTR "xattr", +#endif +#if (SIZEOF_TIME_T < 5) + "large-time", #endif NULL }; -- 2.30.2