llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
29.35k stars 12.14k forks source link

[libc++] sys_info.zdump.pass.cpp fails on `%z` format with tzdata 2024b #108957

Open mgorny opened 2 months ago

mgorny commented 2 months ago
FAIL: llvm-libc++-shared.cfg.in :: std/time/time.zone/time.zone.timezone/time.zone.members/sys_info.zdump.pass.cpp (8335 of 9747)
******************** TEST 'llvm-libc++-shared.cfg.in :: std/time/time.zone/time.zone.timezone/time.zone.members/sys_info.zdump.pass.cpp' FAILED ********************
Exit Code: 250

Command Output (stdout):
--
# COMPILED WITH
/usr/lib/ccache/bin/i686-pc-linux-gnu-clang++ /var/tmp/portage/sys-libs/libcxx-20.0.0_pre20240917/work/libcxx/test/std/time/time.zone/time.zone.timezone/time.zone.members/sys_info.zdump.pass.cpp -pthread --target=i686-pc-linux-gnu -nostdinc++ -I /var/tmp/portage/sys-libs/libcxx-20.0.0_pre20240917/work/runtimes_build-abi_x86_32.x86/libcxx/test-suite-install/include/c++/v1 -I /var/tmp/portage/sys-libs/libcxx-20.0.0_pre20240917/work/runtimes_build-abi_x86_32.x86/libcxx/test-suite-install/include/c++/v1 -I /var/tmp/portage/sys-libs/libcxx-20.0.0_pre20240917/work/libcxx/test/support -std=c++26 -Werror -Wall -Wctad-maybe-unsupported -Wextra -Wshadow -Wundef -Wunused-template -Wno-unused-command-line-argument -Wno-attributes -Wno-pessimizing-move -Wno-noexcept-type -Wno-atomic-alignment -Wno-reserved-module-identifier -Wdeprecated-copy -Wdeprecated-copy-dtor -Wno-user-defined-literals -Wno-tautological-compare -Wsign-compare -Wunused-variable -Wunused-parameter -Wunreachable-code -Wno-unused-local-typedef -Wno-local-type-template-args -Wno-c++11-extensions -Wno-unknown-pragmas -Wno-pass-failed -Wno-mismatched-new-delete -Wno-redundant-move -Wno-self-move -D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER -D_LIBCPP_ENABLE_EXPERIMENTAL -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_NONE -Werror=thread-safety -Wuser-defined-warnings  -lc++experimental -nostdlib++ -L /var/tmp/portage/sys-libs/libcxx-20.0.0_pre20240917/work/runtimes_build-abi_x86_32.x86/libcxx/test-suite-install/lib -Wl,-rpath,/var/tmp/portage/sys-libs/libcxx-20.0.0_pre20240917/work/runtimes_build-abi_x86_32.x86/libcxx/test-suite-install/lib -lc++ -latomic -o /var/tmp/portage/sys-libs/libcxx-20.0.0_pre20240917/work/runtimes_build-abi_x86_32.x86/test/std/time/time.zone/time.zone.timezone/time.zone.members/Output/sys_info.zdump.pass.cpp.dir/t.tmp.exe
# executed command: /usr/lib/ccache/bin/i686-pc-linux-gnu-clang++ /var/tmp/portage/sys-libs/libcxx-20.0.0_pre20240917/work/libcxx/test/std/time/time.zone/time.zone.timezone/time.zone.members/sys_info.zdump.pass.cpp -pthread --target=i686-pc-linux-gnu -nostdinc++ -I /var/tmp/portage/sys-libs/libcxx-20.0.0_pre20240917/work/runtimes_build-abi_x86_32.x86/libcxx/test-suite-install/include/c++/v1 -I /var/tmp/portage/sys-libs/libcxx-20.0.0_pre20240917/work/runtimes_build-abi_x86_32.x86/libcxx/test-suite-install/include/c++/v1 -I /var/tmp/portage/sys-libs/libcxx-20.0.0_pre20240917/work/libcxx/test/support -std=c++26 -Werror -Wall -Wctad-maybe-unsupported -Wextra -Wshadow -Wundef -Wunused-template -Wno-unused-command-line-argument -Wno-attributes -Wno-pessimizing-move -Wno-noexcept-type -Wno-atomic-alignment -Wno-reserved-module-identifier -Wdeprecated-copy -Wdeprecated-copy-dtor -Wno-user-defined-literals -Wno-tautological-compare -Wsign-compare -Wunused-variable -Wunused-parameter -Wunreachable-code -Wno-unused-local-typedef -Wno-local-type-template-args -Wno-c++11-extensions -Wno-unknown-pragmas -Wno-pass-failed -Wno-mismatched-new-delete -Wno-redundant-move -Wno-self-move -D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER -D_LIBCPP_ENABLE_EXPERIMENTAL -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_NONE -Werror=thread-safety -Wuser-defined-warnings -lc++experimental -nostdlib++ -L /var/tmp/portage/sys-libs/libcxx-20.0.0_pre20240917/work/runtimes_build-abi_x86_32.x86/libcxx/test-suite-install/lib -Wl,-rpath,/var/tmp/portage/sys-libs/libcxx-20.0.0_pre20240917/work/runtimes_build-abi_x86_32.x86/libcxx/test-suite-install/lib -lc++ -latomic -o /var/tmp/portage/sys-libs/libcxx-20.0.0_pre20240917/work/runtimes_build-abi_x86_32.x86/test/std/time/time.zone/time.zone.timezone/time.zone.members/Output/sys_info.zdump.pass.cpp.dir/t.tmp.exe
# EXECUTED AS
/usr/bin/python3.13 /var/tmp/portage/sys-libs/libcxx-20.0.0_pre20240917/work/libcxx/utils/run.py --execdir /var/tmp/portage/sys-libs/libcxx-20.0.0_pre20240917/work/runtimes_build-abi_x86_32.x86/test/std/time/time.zone/time.zone.timezone/time.zone.members/Output/sys_info.zdump.pass.cpp.dir --  /var/tmp/portage/sys-libs/libcxx-20.0.0_pre20240917/work/runtimes_build-abi_x86_32.x86/test/std/time/time.zone/time.zone.timezone/time.zone.members/Output/sys_info.zdump.pass.cpp.dir/t.tmp.exe
# executed command: /usr/bin/python3.13 /var/tmp/portage/sys-libs/libcxx-20.0.0_pre20240917/work/libcxx/utils/run.py --execdir /var/tmp/portage/sys-libs/libcxx-20.0.0_pre20240917/work/runtimes_build-abi_x86_32.x86/test/std/time/time.zone/time.zone.timezone/time.zone.members/Output/sys_info.zdump.pass.cpp.dir -- /var/tmp/portage/sys-libs/libcxx-20.0.0_pre20240917/work/runtimes_build-abi_x86_32.x86/test/std/time/time.zone/time.zone.timezone/time.zone.members/Output/sys_info.zdump.pass.cpp.dir/t.tmp.exe
# .---command stderr------------
# | Assertion failure: libcxx.str() == zdump.str() /var/tmp/portage/sys-libs/libcxx-20.0.0_pre20240917/work/libcxx/test/std/time/time.zone/time.zone.timezone/time.zone.members/sys_info.zdump.pass.cpp 123
# | 
# | TZ=Africa/Bissau
# | libc++
# | Africa/Bissau  Mon Jan  1 00:59:59 1912 UT = Sun Dec 31 23:57:39 1911 LMT isdst=0 gmtoff=-3740
# | Africa/Bissau  Mon Jan  1 01:00:00 1912 UT = Mon Jan  1 00:00:00 1912 %z isdst=0 gmtoff=-3600
# | Africa/Bissau  Wed Jan  1 00:59:59 1975 UT = Tue Dec 31 23:59:59 1974 %z isdst=0 gmtoff=-3600
# | Africa/Bissau  Wed Jan  1 01:00:00 1975 UT = Wed Jan  1 01:00:00 1975 GMT isdst=0 gmtoff=0
# | |
# | 
# | zdump
# | Africa/Bissau  Mon Jan  1 00:59:59 1912 UT = Sun Dec 31 23:57:39 1911 LMT isdst=0 gmtoff=-3740
# | Africa/Bissau  Mon Jan  1 01:00:00 1912 UT = Mon Jan  1 00:00:00 1912 -01 isdst=0 gmtoff=-3600
# | Africa/Bissau  Wed Jan  1 00:59:59 1975 UT = Tue Dec 31 23:59:59 1974 -01 isdst=0 gmtoff=-3600
# | Africa/Bissau  Wed Jan  1 01:00:00 1975 UT = Wed Jan  1 01:00:00 1975 GMT isdst=0 gmtoff=0
# | |
# `-----------------------------
# error: command failed with exit status: 250

--

********************

Note that %z doesn't seem to be expanded. This is on 41f1b467a29d2ca4e35df37c3aa79a0a8c04bc4f.

mgorny commented 2 months ago

I think getting full %z support into 19.x would probably be useful too.

ldionne commented 2 months ago

@mgorny Is fixing this only a matter of cherry-picking a commit onto release/19.x? If so, which one?

If not, I think we'll have to fix this in the 20 release since LLVM 19 is wrapping up and this feature is experimental anyway.

mgorny commented 2 months ago

I haven't rechecked, but at the time 20.x was affected.

ldionne commented 2 months ago

Ok, in that case I'll remove the 19.x milestone from this since it seems unlikely to make it.

asb commented 1 month ago

I just encountered this issue and came searching to see if it's already filed, so I might as well leave a comment to provide additional confirmation of it. Reproduce on current HEAD (48deb3568eb2452ff385b04b8f71c34121f47387) on Arch Linux with tzdata package 2024b-2.