<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/libc/test/src/time/mktime_test.cpp, branch users/nico/python-2</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/'/>
<entry>
<title>[libc] Enable 'mktime' for the GPU (#133437)</title>
<updated>2025-03-28T16:14:51+00:00</updated>
<author>
<name>Joseph Huber</name>
<email>huberjn@outlook.com</email>
</author>
<published>2025-03-28T16:14:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=4abe47c6fc06e44792bc1b0dc58f3b453ae4fb80'/>
<id>4abe47c6fc06e44792bc1b0dc58f3b453ae4fb80</id>
<content type='text'>
Summary:
This is a dependency on `strftime` which we provide, so we should have
this.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Summary:
This is a dependency on `strftime` which we provide, so we should have
this.</pre>
</div>
</content>
</entry>
<entry>
<title>[libc][NFC] Cleanup time.h (#122027)</title>
<updated>2025-01-08T20:28:50+00:00</updated>
<author>
<name>Michael Jones</name>
<email>michaelrj@google.com</email>
</author>
<published>2025-01-08T20:28:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=f9c2377fb68e5051b3061186c507f7b87db2a8b2'/>
<id>f9c2377fb68e5051b3061186c507f7b87db2a8b2</id>
<content type='text'>
While working on strftime I noticed some constants were being defined in
unexpected places. One thing led to another, and I ended up doing a
major cleanup of the time functions.

What's included:
All uses of &lt;time.h&gt; in /src and /test removed (except for LibcTest.cpp)
The various time constants have been moved to time_constants.h, and the
`time_constants` namespace.
struct tm gets its own type indirection header now.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
While working on strftime I noticed some constants were being defined in
unexpected places. One thing led to another, and I ended up doing a
major cleanup of the time functions.

What's included:
All uses of &lt;time.h&gt; in /src and /test removed (except for LibcTest.cpp)
The various time constants have been moved to time_constants.h, and the
`time_constants` namespace.
struct tm gets its own type indirection header now.</pre>
</div>
</content>
</entry>
<entry>
<title>[libc] Fix overflow check for 32-bit mktime. (#101993)</title>
<updated>2024-08-07T03:51:25+00:00</updated>
<author>
<name>Simon Tatham</name>
<email>simon.tatham@arm.com</email>
</author>
<published>2024-08-07T03:51:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=81d8273978ace8b9a2b8cfd811b94e95f9560ac5'/>
<id>81d8273978ace8b9a2b8cfd811b94e95f9560ac5</id>
<content type='text'>
The 32-bit time_t rolls over to a value with its high bit set at
2038-01-19 03:14:07. The overflow check for this in mktime() was
checking each individual component of the time: reject if year&gt;2038, or
if month&gt;1, or if day&gt;19, etc. As a result it would reject valid times
before the overflow point, because a low-order component was out of
range even though a higher-order one makes the time as a whole safe. The
earliest failing value is 2145916808 == 2038-01-01 00:00:08, in which
only the seconds field 'overflows'.

Fixed so that if any component is _less_ than its threshold value, we
don't check the lower-order components.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The 32-bit time_t rolls over to a value with its high bit set at
2038-01-19 03:14:07. The overflow check for this in mktime() was
checking each individual component of the time: reject if year&gt;2038, or
if month&gt;1, or if day&gt;19, etc. As a result it would reject valid times
before the overflow point, because a low-order component was out of
range even though a higher-order one makes the time as a whole safe. The
earliest failing value is 2145916808 == 2038-01-01 00:00:08, in which
only the seconds field 'overflows'.

Fixed so that if any component is _less_ than its threshold value, we
don't check the lower-order components.</pre>
</div>
</content>
</entry>
<entry>
<title>[libc] Add C23 limits.h header. (#78887)</title>
<updated>2024-01-24T21:08:56+00:00</updated>
<author>
<name>lntue</name>
<email>35648136+lntue@users.noreply.github.com</email>
</author>
<published>2024-01-24T21:08:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=72ce6294157964042b7ed5576ce2c99257eeea9d'/>
<id>72ce6294157964042b7ed5576ce2c99257eeea9d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[libc][NFC] Fix missing field 'tm_isdst' initializer warning (#67837)</title>
<updated>2023-10-02T23:32:55+00:00</updated>
<author>
<name>Mikhail R. Gadelha</name>
<email>mikhail@igalia.com</email>
</author>
<published>2023-10-02T23:32:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=824b1677a44e25b7c9808c774ba2d894ff14df2b'/>
<id>824b1677a44e25b7c9808c774ba2d894ff14df2b</id>
<content type='text'>
This patch fixes several warnings thrown by clang about an uninitialized
member of struct tm, tm_isdst.

Weirdly, gcc doesn't complain about it, probably this member is never
read in the tests.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch fixes several warnings thrown by clang about an uninitialized
member of struct tm, tm_isdst.

Weirdly, gcc doesn't complain about it, probably this member is never
read in the tests.</pre>
</div>
</content>
</entry>
<entry>
<title>[libc] Mass replace enclosing namespace (#67032)</title>
<updated>2023-09-26T09:45:04+00:00</updated>
<author>
<name>Guillaume Chatelet</name>
<email>gchatelet@google.com</email>
</author>
<published>2023-09-26T09:45:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=b6bc9d72f65a5086f310f321e969d96e9a559e75'/>
<id>b6bc9d72f65a5086f310f321e969d96e9a559e75</id>
<content type='text'>
This is step 4 of
https://discourse.llvm.org/t/rfc-customizable-namespace-to-allow-testing-the-libc-when-the-system-libc-is-also-llvms-libc/73079</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is step 4 of
https://discourse.llvm.org/t/rfc-customizable-namespace-to-allow-testing-the-libc-when-the-system-libc-is-also-llvms-libc/73079</pre>
</div>
</content>
</entry>
<entry>
<title>[libc] Fix failing mktime test case in 32-bit systems (#65390)</title>
<updated>2023-09-06T18:29:31+00:00</updated>
<author>
<name>Mikhail R. Gadelha</name>
<email>mikhail@igalia.com</email>
</author>
<published>2023-09-06T18:29:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=6f387135ae9b25f761127b5cf6c04a06263d58b7'/>
<id>6f387135ae9b25f761127b5cf6c04a06263d58b7</id>
<content type='text'>
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.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.</pre>
</div>
</content>
</entry>
<entry>
<title>[libc] Fix test case that expects time_t to be a 32-bit type</title>
<updated>2023-08-30T14:24:19+00:00</updated>
<author>
<name>Mikhail R. Gadelha</name>
<email>mikhail@igalia.com</email>
</author>
<published>2023-08-30T14:22:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=9e34454519898b79975c655ee46048f77490b0d2'/>
<id>9e34454519898b79975c655ee46048f77490b0d2</id>
<content type='text'>
This patch changes a test case that tests for overflow when time_t is
32-bit long, however, it was checking size_t instead of time_t.

This in on par with other testcases that correctly check the size of
time_t (asctime_test.cpp, gmtime_r_test.cpp and gmtime_test.cpp).

Reviewed By: sivachandra

Differential Revision: https://reviews.llvm.org/D159113
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch changes a test case that tests for overflow when time_t is
32-bit long, however, it was checking size_t instead of time_t.

This in on par with other testcases that correctly check the size of
time_t (asctime_test.cpp, gmtime_r_test.cpp and gmtime_test.cpp).

Reviewed By: sivachandra

Differential Revision: https://reviews.llvm.org/D159113
</pre>
</div>
</content>
</entry>
<entry>
<title>[libc] Make ErrnoSetterMatcher handle logging floating point values.</title>
<updated>2023-05-26T06:24:51+00:00</updated>
<author>
<name>Siva Chandra Reddy</name>
<email>sivachandra@google.com</email>
</author>
<published>2023-05-15T22:12:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=4f1fe19df385445fabde47998affca50c7f1bc1e'/>
<id>4f1fe19df385445fabde47998affca50c7f1bc1e</id>
<content type='text'>
Along the way, couple of additional things have been done:

1. Move `ErrnoSetterMatcher.h` to `test/UnitTest` as all other matchers live
   there now.
2. `ErrnoSetterMatcher` ignores matching `errno` on GPUs.

Reviewed By: jhuber6

Differential Revision: https://reviews.llvm.org/D151129
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Along the way, couple of additional things have been done:

1. Move `ErrnoSetterMatcher.h` to `test/UnitTest` as all other matchers live
   there now.
2. `ErrnoSetterMatcher` ignores matching `errno` on GPUs.

Reviewed By: jhuber6

Differential Revision: https://reviews.llvm.org/D151129
</pre>
</div>
</content>
</entry>
<entry>
<title>[libc][NFC] Switch use of errno in src/time and test/src/time to libc_errno.</title>
<updated>2023-03-02T22:41:19+00:00</updated>
<author>
<name>Raman Tenneti</name>
<email>rtenneti@google.com</email>
</author>
<published>2023-03-02T22:24:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=b98c1906d6a5483ef709afaa1c05f36fb783d73d'/>
<id>b98c1906d6a5483ef709afaa1c05f36fb783d73d</id>
<content type='text'>
Switch use of errno in src/time and test/src/time to libc_errno.

Reviewed By: sivachandra

Differential Revision: https://reviews.llvm.org/D145192
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Switch use of errno in src/time and test/src/time to libc_errno.

Reviewed By: sivachandra

Differential Revision: https://reviews.llvm.org/D145192
</pre>
</div>
</content>
</entry>
</feed>
