[libcxx-commits] [libcxx] [libcxx][test] Use smaller time range for 32 bit time_t (PR #104762)
David Spickett via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Aug 19 04:16:11 PDT 2024
https://github.com/DavidSpickett created https://github.com/llvm/llvm-project/pull/104762
This fixes the test on Arm 32 bit Ubuntu Jammy where time_t is 32 bit.
>From 2ae344670d98e625b7e386dd860820b7ea2f9ae8 Mon Sep 17 00:00:00 2001
From: David Spickett <david.spickett at linaro.org>
Date: Mon, 19 Aug 2024 11:14:12 +0000
Subject: [PATCH] [libcxx][test] Use smaller time range for 32 bit time_t
This fixes the test on Arm 32 bit Ubuntu Jammy where time_t is 32 bit.
---
.../time.zone.members/sys_info.zdump.pass.cpp | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/libcxx/test/std/time/time.zone/time.zone.timezone/time.zone.members/sys_info.zdump.pass.cpp b/libcxx/test/std/time/time.zone/time.zone.timezone/time.zone.members/sys_info.zdump.pass.cpp
index 2b97d9a5bc745b..b474fe50083b1d 100644
--- a/libcxx/test/std/time/time.zone/time.zone.timezone/time.zone.members/sys_info.zdump.pass.cpp
+++ b/libcxx/test/std/time/time.zone/time.zone.timezone/time.zone.members/sys_info.zdump.pass.cpp
@@ -13,9 +13,6 @@
// XFAIL: libcpp-has-no-experimental-tzdb
// XFAIL: availability-tzdb-missing
-// TODO TZDB Investigate
-// UNSUPPORTED: target={{armv(7|8)l-linux-gnueabihf}}
-
#include <chrono>
#include <format>
#include <fstream>
@@ -28,7 +25,7 @@
// The year range to validate. The dates used in practice are expected to be
// inside the tested range.
constexpr std::chrono::year first{1800};
-constexpr std::chrono::year last{2100};
+constexpr std::chrono::year last{sizeof(time_t) == 8 ? 2100 : 2037};
// A custom sys_info class that also stores the name of the time zone.
// Its formatter matches the output of zdump.
More information about the libcxx-commits
mailing list