Skip to content
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

Test icinga_legacytimeperiod/dst fails on musl libc #10288

Open
oxzi opened this issue Jan 10, 2025 · 1 comment
Open

Test icinga_legacytimeperiod/dst fails on musl libc #10288

oxzi opened this issue Jan 10, 2025 · 1 comment
Labels
area/tests Unit and environment tests bug Something isn't working

Comments

@oxzi
Copy link
Member

oxzi commented Jan 10, 2025

Describe the bug

In #9949, an issue with the failing icinga_legacytimeperiod/dst test on musl libc was raised. This issue seems to exist for quite some time, as seen in the exclusion patch for the Alpine Linux downstream package build.

When running the tests, this is the only failing one.

147/176 Test #147: base-icinga_legacytimeperiod/dst ........................................***Failed    0.01 sec
Running 1 test case...
/icinga2/test/icinga-legacytimeperiod.cpp(805): error: in "icinga_legacytimeperiod/dst": FindRunningSegment(day='2021-03-14' ra
nges='01:30-02:30' ref='2021-03-14 01:59:59 '): got=none expected=(2021-03-14 01:30:00 PST (1615714200) .. 2021-03-14 03:30:00
PDT (1615717800))
/icinga2/test/icinga-legacytimeperiod.cpp(824): error: in "icinga_legacytimeperiod/dst": FindNextSegment(day='2021-03-14' range
s='01:30-02:30' ref='2021-03-14 01:00:00 '): got=none expected=(2021-03-14 01:30:00 PST (1615714200) .. 2021-03-14 03:30:00 PDT
 (1615717800))
/icinga2/test/icinga-legacytimeperiod.cpp(805): error: in "icinga_legacytimeperiod/dst": FindRunningSegment(day='2021-03-14' ra
nges='02:30-03:30' ref='2021-03-14 03:00:00 '): got=(2021-03-14 01:30:00 PST (1615714200) .. 2021-03-14 03:30:00 PDT (161571780
0)) expected=none
/icinga2/test/icinga-legacytimeperiod.cpp(824): error: in "icinga_legacytimeperiod/dst": FindNextSegment(day='2021-03-14' range
s='02:30-03:30' ref='2021-03-14 01:00:00 '): got=(2021-03-14 01:30:00 PST (1615714200) .. 2021-03-14 03:30:00 PDT (1615717800))
 expected=none
/icinga2/test/icinga-legacytimeperiod.cpp(805): error: in "icinga_legacytimeperiod/dst": FindRunningSegment(day='2021-03-14' ra
nges='02:15-03:45' ref='2021-03-14 03:30:00 '): got=(2021-03-14 01:15:00 PST (1615713300) .. 2021-03-14 03:45:00 PDT (161571870
0)) expected=(2021-03-14 03:15:00 PDT (1615716900) .. 2021-03-14 03:45:00 PDT (1615718700))
/icinga2/test/icinga-legacytimeperiod.cpp(824): error: in "icinga_legacytimeperiod/dst": FindNextSegment(day='2021-03-14' range
s='02:15-03:45' ref='2021-03-14 01:00:00 '): got=(2021-03-14 01:15:00 PST (1615713300) .. 2021-03-14 03:45:00 PDT (1615718700))
 expected=(2021-03-14 03:15:00 PDT (1615716900) .. 2021-03-14 03:45:00 PDT (1615718700))
/icinga2/test/icinga-legacytimeperiod.cpp(805): error: in "icinga_legacytimeperiod/dst": FindRunningSegment(day='sunday' ranges
='02:15-03:45' ref='2021-03-14 03:30:00 '): got=(2021-03-14 01:15:00 PST (1615713300) .. 2021-03-14 03:45:00 PDT (1615718700))
expected=(2021-03-14 03:15:00 PDT (1615716900) .. 2021-03-14 03:45:00 PDT (1615718700))
/icinga2/test/icinga-legacytimeperiod.cpp(824): error: in "icinga_legacytimeperiod/dst": FindNextSegment(day='sunday' ranges='0
2:15-03:45' ref='2021-03-14 01:00:00 '): got=(2021-03-14 01:15:00 PST (1615713300) .. 2021-03-14 03:45:00 PDT (1615718700)) exp
ected=(2021-03-14 03:15:00 PDT (1615716900) .. 2021-03-14 03:45:00 PDT (1615718700))
/icinga2/test/icinga-legacytimeperiod.cpp(805): error: in "icinga_legacytimeperiod/dst": FindRunningSegment(day='sunday 2' rang
es='02:15-03:45' ref='2021-03-14 03:30:00 '): got=(2021-03-14 01:15:00 PST (1615713300) .. 2021-03-14 03:45:00 PDT (1615718700)
) expected=(2021-03-14 03:15:00 PDT (1615716900) .. 2021-03-14 03:45:00 PDT (1615718700))
/icinga2/test/icinga-legacytimeperiod.cpp(824): error: in "icinga_legacytimeperiod/dst": FindNextSegment(day='sunday 2' ranges=
'02:15-03:45' ref='2021-03-14 01:00:00 '): got=(2021-03-14 01:15:00 PST (1615713300) .. 2021-03-14 03:45:00 PDT (1615718700)) e
xpected=(2021-03-14 03:15:00 PDT (1615716900) .. 2021-03-14 03:45:00 PDT (1615718700))
/icinga2/test/icinga-legacytimeperiod.cpp(805): error: in "icinga_legacytimeperiod/dst": FindRunningSegment(day='sunday -3' ran
ges='02:15-03:45' ref='2021-03-14 03:30:00 '): got=(2021-03-14 01:15:00 PST (1615713300) .. 2021-03-14 03:45:00 PDT (1615718700
)) expected=(2021-03-14 03:15:00 PDT (1615716900) .. 2021-03-14 03:45:00 PDT (1615718700))
/icinga2/test/icinga-legacytimeperiod.cpp(824): error: in "icinga_legacytimeperiod/dst": FindNextSegment(day='sunday -3' ranges
='02:15-03:45' ref='2021-03-14 01:00:00 '): got=(2021-03-14 01:15:00 PST (1615713300) .. 2021-03-14 03:45:00 PDT (1615718700))
expected=(2021-03-14 03:15:00 PDT (1615716900) .. 2021-03-14 03:45:00 PDT (1615718700))

*** 12 failures are detected in the test module "icinga2"

To Reproduce

Build and test Icinga 2 under a Linux with musl instead of glibc, e.g., by using #9949.

Your Environment

Include as many relevant details about the environment you experienced the problem in

  • Version used (icinga2 --version): latest master, but present since versions
  • Operating System and version: Alpine Linux v3.21
@oxzi
Copy link
Member Author

oxzi commented Jan 10, 2025

Related issue: #9801

@oxzi oxzi added bug Something isn't working area/tests Unit and environment tests labels Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/tests Unit and environment tests bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant