<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/libc/test/src/time/gettimeofday_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][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][NFC] Attempt to deflake gettimeofday_test. (#69719)</title>
<updated>2023-10-20T15:08:01+00:00</updated>
<author>
<name>lntue</name>
<email>35648136+lntue@users.noreply.github.com</email>
</author>
<published>2023-10-20T15:08:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=6d53fdeab40fe2030db0f618be1a5e6e4ce70bef'/>
<id>6d53fdeab40fe2030db0f618be1a5e6e4ce70bef</id>
<content type='text'>
Only check if gettimeofday call succeeds.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Only check if gettimeofday call succeeds.</pre>
</div>
</content>
</entry>
<entry>
<title>[libc][NFC] Forcing data type in gettimeofday_test when comparing the diff. (#69652)</title>
<updated>2023-10-19T23:49:59+00:00</updated>
<author>
<name>lntue</name>
<email>35648136+lntue@users.noreply.github.com</email>
</author>
<published>2023-10-19T23:49:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ec10c36b07766f04576afac014d7f7aaab4395ae'/>
<id>ec10c36b07766f04576afac014d7f7aaab4395ae</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</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 test passing negative value in timespec passed to nanosleep (#65346)</title>
<updated>2023-09-06T18:28:31+00:00</updated>
<author>
<name>Mikhail R. Gadelha</name>
<email>mikhail@igalia.com</email>
</author>
<published>2023-09-06T18:28:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=10fb71bdff587d38d373b2dbcff33334bd7c66d1'/>
<id>10fb71bdff587d38d373b2dbcff33334bd7c66d1</id>
<content type='text'>
This test was setting tv_nsec to a negative value, which as per the
standard this is an EINVAL:

The value in the tv_nsec field was not in the range [0, 999999999] or
tv_sec was negative.

https://man7.org/linux/man-pages/man2/nanosleep.2.html</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This test was setting tv_nsec to a negative value, which as per the
standard this is an EINVAL:

The value in the tv_nsec field was not in the range [0, 999999999] or
tv_sec was negative.

https://man7.org/linux/man-pages/man2/nanosleep.2.html</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>
<entry>
<title>[libc][NFC] Move UnitTest and IntegrationTest to the 'test' directory.</title>
<updated>2023-02-07T19:45:51+00:00</updated>
<author>
<name>Siva Chandra Reddy</name>
<email>sivachandra@google.com</email>
</author>
<published>2023-02-06T07:07:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=af1315c28f9bab76d3c2e1492a3d41e7c48215f8'/>
<id>af1315c28f9bab76d3c2e1492a3d41e7c48215f8</id>
<content type='text'>
This part of the effort to make all test related pieces into the `test`
directory. This helps is excluding test related pieces in a straight
forward manner if LLVM_INCLUDE_TESTS is OFF. Future patches will also move
the MPFR wrapper and testutils into the 'test' directory.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This part of the effort to make all test related pieces into the `test`
directory. This helps is excluding test related pieces in a straight
forward manner if LLVM_INCLUDE_TESTS is OFF. Future patches will also move
the MPFR wrapper and testutils into the 'test' directory.
</pre>
</div>
</content>
</entry>
<entry>
<title>[libc] cleanup changes to gettimeofday.</title>
<updated>2022-11-15T23:06:35+00:00</updated>
<author>
<name>Raman Tenneti</name>
<email>rtenneti@google.com</email>
</author>
<published>2022-11-15T22:14:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=dbd31935ed0384b5d72dd4fc5f0309853b2da844'/>
<id>dbd31935ed0384b5d72dd4fc5f0309853b2da844</id>
<content type='text'>
+ Deleted duplicate definitions of StructTimeVal and StructTimeValPtr.
+ Caled syscall  clock_gettime to get timespec data.
+ Added tests to test for sleeping 200 and 1000 microseconds.
+ Fixed comments from https://reviews.llvm.org/D137881

Reviewed By: sivachandra

Differential Revision: https://reviews.llvm.org/D138064
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
+ Deleted duplicate definitions of StructTimeVal and StructTimeValPtr.
+ Caled syscall  clock_gettime to get timespec data.
+ Added tests to test for sleeping 200 and 1000 microseconds.
+ Fixed comments from https://reviews.llvm.org/D137881

Reviewed By: sivachandra

Differential Revision: https://reviews.llvm.org/D138064
</pre>
</div>
</content>
</entry>
<entry>
<title>[libc] Implement gettimeofday</title>
<updated>2022-11-12T02:02:33+00:00</updated>
<author>
<name>Raman Tenneti</name>
<email>rtenneti@google.com</email>
</author>
<published>2022-11-12T02:00:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=78f172e45ad95bb9cac907486af968a9e41d9570'/>
<id>78f172e45ad95bb9cac907486af968a9e41d9570</id>
<content type='text'>
Implement gettimeofday per
.../onlinepubs/9699919799/functions/gettimeofday.html.
This call clock_gettime to implement gettimeofday function.

Tested:
Limited unit test: This makes a call and checks that no error was
returned. Used nanosleep for 100 microseconds and verfified it
returns a value that elapses more than 100 microseconds and less
than 300 microseconds.

Co-authored-by: Jeff Bailey &lt;jeffbailey@google.com&gt;

Differential Revision: https://reviews.llvm.org/D137881
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Implement gettimeofday per
.../onlinepubs/9699919799/functions/gettimeofday.html.
This call clock_gettime to implement gettimeofday function.

Tested:
Limited unit test: This makes a call and checks that no error was
returned. Used nanosleep for 100 microseconds and verfified it
returns a value that elapses more than 100 microseconds and less
than 300 microseconds.

Co-authored-by: Jeff Bailey &lt;jeffbailey@google.com&gt;

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