Skip to content

[libcxx][test] Skip sys_info zdump test when zdump was built with 32 bit time_t #103056

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,12 @@
//===----------------------------------------------------------------------===//

// UNSUPPORTED: c++03, c++11, c++14, c++17
// UNSUPPORTED: no-filesystem, no-localization, no-tzdb, has-no-zdump
// UNSUPPORTED: no-filesystem, no-localization, no-tzdb, has-no-zdump, zdump-time_t-32bit
// REQUIRES: long_tests

// XFAIL: libcpp-has-no-experimental-tzdb
// XFAIL: availability-tzdb-missing

// TODO TZDB Investigate
// UNSUPPORTED: target={{armv(7|8)l-linux-gnueabihf}}

#include <chrono>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How changing constexpr std::chrono::year last{2100}; at line 28 to 2037 for 32-bit time_t instead?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#include <format>
#include <fstream>
Expand Down
15 changes: 15 additions & 0 deletions libcxx/utils/libcxx/test/features.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,21 @@ def _mingwSupportsModules(cfg):
name="has-no-zdump",
when=lambda cfg: runScriptExitCode(cfg, ["zdump --version"]) != 0,
),
# zdump built with 32 bit time_t will truncate times into the 32 bit range.
# Starting with glibc 2.34, some architectures, like armhf, started building
# zdump with time_t as 64 bit which allows it to handle the maximum range.
# If zdump was built with time_t 64 bit, it will show the 1869 entries for
# this zone, which would be out of range for 32 bit.
Feature(
name="zdump-time_t-32bit",
when=lambda cfg: BooleanExpression.evaluate(
"!has-no-zdump", cfg.available_features
)
and runScriptExitCode(
cfg, ["zdump -V -c1800,2100 Africa/Addis_Ababa | grep -q 1869"]
)
!= 0,
),
]

# Deduce and add the test features that that are implied by the #defines in
Expand Down
Loading