Skip to content

[libc] Fix failing mktime test case in 32-bit systems #65390

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

Merged
merged 1 commit into from
Sep 6, 2023

Conversation

mikhailramalho
Copy link
Member

Previously, these tests expected that calling mktime with a struct tm that caused overlow to succeed with return -1
(TimeConstants::OUT_OF_RANGE_RETURN_VALUE), however, the Succeeds call expects the errno to be zero (no failure).

This patch fixes the expected calls to fail with EOVERFLOW. These tests are only enabled to 32-bit systems, and are probably not being tested on the arm32 buildbot, that's why this was not a problem before.

Previously, these tests expected that calling mktime with a struct tm
that caused overlow to succeed with return -1
(TimeConstants::OUT_OF_RANGE_RETURN_VALUE), however, the Succeeds call
expects the errno to be zero (no failure).

This patch fixes the expected calls to fail with EOVERFLOW. These tests
are only enabled to 32-bit systems, and are probably not being tested on
the arm32 buildbot, that's why this was not a problem before.
@mikhailramalho mikhailramalho merged commit 6f38713 into llvm:main Sep 6, 2023
@mikhailramalho mikhailramalho deleted the mktime-test-fixes branch September 6, 2023 18:29
avillega pushed a commit to avillega/llvm-project that referenced this pull request Sep 11, 2023
Previously, these tests expected that calling mktime with a struct tm
that caused overlow to succeed with return -1
(TimeConstants::OUT_OF_RANGE_RETURN_VALUE), however, the Succeeds call
expects the errno to be zero (no failure).

This patch fixes the expected calls to fail with EOVERFLOW. These tests
are only enabled to 32-bit systems, and are probably not being tested on
the arm32 buildbot, that's why this was not a problem before.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants