sympa-community / sympa

Sympa, Mailing List Management Software
https://www.sympa.community/sympa
GNU General Public License v2.0
237 stars 94 forks source link

Tools_Time.t test fails on Fedora 40+ #1805

Closed xavierba closed 4 months ago

xavierba commented 4 months ago

Version

6.2.72

Installation method

Not really applicable, but rpm

Expected behavior

make check succeeds

Actual behavior

make check fails

Steps to reproduce

Build the rpm in a Fedora 40 or later environment https://src.fedoraproject.org/rpms/sympa/tree/rawhide

Additional information

t/Tools_Text.t ............... ok
#   Failed test 'get_midnight_time 1350544367'
#   at t/Tools_Time.t line 93.
#          got: '1350518400'
#     expected: '1350511200'
#   Failed test 'get_midnight_time 1250544367'
#   at t/Tools_Time.t line 93.
#          got: '1250467200'
#     expected: '1250460000'
#   Failed test 'date_conv ARRAY(0x5618123b1af8)'
#   at t/Tools_Time.t line 98.
#          got: '1350551567'
#     expected: '1350544367'
#   Failed test 'date_conv ARRAY(0x5618123b1bb8)'
#   at t/Tools_Time.t line 98.
#          got: '1350551520'
#     expected: '1350544320'
#   Failed test 'date_conv ARRAY(0x5618123b1c78)'
#   at t/Tools_Time.t line 98.
#          got: '1350550800'
#     expected: '1350543600'
#   Failed test 'date_conv ARRAY(0x5618123b1d38)'
#   at t/Tools_Time.t line 98.
#          got: '1350518400'
#     expected: '1350511200'
#   Failed test 'date_conv ARRAY(0x5618123b1df8)'
#   at t/Tools_Time.t line 98.
#          got: '1349049600'
#     expected: '1349042400'
#   Failed test 'date_conv ARRAY(0x5618123b1eb8)'
#   at t/Tools_Time.t line 98.
#          got: '1325376000'
#     expected: '1325372400'
#   Failed test 'Before daylight saving'
#   at t/Tools_Time.t line 98.
#          got: '1364695199'
#     expected: '1364691599'
#   Failed test 'Invalid date'
#   at t/Tools_Time.t line 98.
#          got: '1364697000'
#     expected: '1364693400'
#   Failed test 'Beginning of daylight saving'
#   at t/Tools_Time.t line 98.
#          got: '1364698800'
#     expected: '1364691600'
#   Failed test 'Ending of daylight saving'
#   at t/Tools_Time.t line 98.
#          got: '1382839199'
#     expected: '1382831999'
#   Failed test 'Ambiguous date'
#   at t/Tools_Time.t line 98.
#          got: '1382841000'
#     expected: '1382833800'
#   Failed test 'After daylight saving'
#   at t/Tools_Time.t line 98.
#          got: '1382842800'
#     expected: '1382839200'
# Looks like you failed 14 tests of 25.
t/Tools_Time.t ............... 
Dubious, test returned 14 (wstat 3584, 0xe00)
Failed 14/25 subtests 
...
Test Summary Report
-------------------
t/Tools_Time.t             (Wstat: 3584 (exited 14) Tests: 25 Failed: 14)
  Failed tests:  1-2, 4-15
  Non-zero exit status: 14
Files=26, Tests=1278, 60 wallclock secs ( 0.14 usr  0.03 sys + 45.32 cusr  7.58 csys = 53.07 CPU)
Result: FAIL
Failed 1/26 test programs. 14/1278 subtests failed.
ikedas commented 4 months ago

These tests depend on the Europe/Paris timezone (CET/CEST). IMHO setting timezone (POSIX::tzset) failed and the other timezone (UTC?) was used.

Is there any change related on timezone, such as tzdata package, as of Fedora 40?

ikedas commented 4 months ago

Exactly.

Red Hat Bugzilla #1722233:

Confirmed that tzdata is no longer part of fedora-minimal.

On Fedora 40+, perhaps tzdata package should be added to BuildRequires in RPM spec.

xavierba commented 4 months ago

Well spotted, this is indeed the correct fix. Thanks @ikedas