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

Make tests pass after 2024 #1591

Merged
merged 1 commit into from Aug 20, 2021
Merged

Make tests pass after 2024 #1591

merged 1 commit into from Aug 20, 2021

Conversation

bmwiedemann
Copy link
Contributor

Make tests pass after 2024

Tested on i586 and x86_64

Background:
As part of my work on reproducible builds for openSUSE, I check that software still gives identical build results in the future.
The usual offset is +15 years, because that is how long I expect some software will be used in some places.
This showed up 1 failing test in our rnp package build.
See https://reproducible-builds.org/ for why this matters.

This PR was done while working on reproducible builds for openSUSE.

@antonsviridenko
Copy link
Contributor

20 tests have failed...

@bmwiedemann
Copy link
Contributor Author

Interesting. These tests passed for me on openSUSE Tumbleweed.

[ RUN      ] rnp_tests.test_rnpcfg_get_expiration
/tmp/cirrus-ci-build/src/tests/utils-rnpcfg.cpp:130: Failure
Expected equality of these values:
  (get_expiration("3100-01-01", &raw_expiry))
    Which is: -3
  (0)
    Which is: 0

Maybe the test is good, but some of the implementation is bad?

@ni4
Copy link
Contributor

ni4 commented Aug 18, 2021

Interesting. These tests passed for me on openSUSE Tumbleweed.
...
Maybe the test is good, but some of the implementation is bad?

Is it possible that you checked with the version 0.15.1? This commit probably changed the behaviour: 2ae6479

Expiration time, which is calculated there, cannot exceed 32bit unsigned (as it is stored as 32 bit uint in OpenPGP packets).
So maximum value should be not more than ~125 years from now.

Tested on i586 and x86_64

Background:
As part of my work on reproducible builds for openSUSE, I check that software still gives identical build results in the future.
The usual offset is +15 years, because that is how long I expect some software will be used in some places.
This showed up failing tests in our package build.
See https://reproducible-builds.org/ for why this matters.
Copy link
Contributor

@ni4 ni4 left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @bmwiedemann !

@ni4 ni4 merged commit 18c45dd into rnpgp:master Aug 20, 2021
31 checks passed
@ni4 ni4 added this to the v0.16.0 milestone Aug 24, 2021
@bmwiedemann bmwiedemann deleted the ftbfs2024 branch August 31, 2021 00:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants