1
0
mirror of https://sourceware.org/git/glibc.git synced 2026-01-06 11:51:29 +03:00
Files
glibc/support
H.J. Lu 77e921bc61 tst-timespec.c: Explicitly cast TIME_T_MAX to double
Explicitly cast TIME_T_MAX to double in tst-timespec.c to silence Clang
error:

tst-timespec.c:290:19: error: implicit conversion from 'time_t' (aka 'long') to 'double' changes value from 9223372036854775807 to 9223372036854775808 [-Werror,-Wimplicit-const-int-float-conversion]
  287 |   {.expected = {.tv_sec = 0, .tv_nsec = 1},
      |   ~
  288 |    .observed = {.tv_sec = TIME_T_MAX / TIMESPEC_HZ,
  289 |                 .tv_nsec = TIMESPEC_HZ - 1},
  290 |    .upper_bound = TIME_T_MAX, .lower_bound = 1, .result = 1,
      |                   ^~~~~~~~~~

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Reviewed-by: Sam James <sam@gentoo.org>
2024-12-18 01:26:52 +08:00
..
2024-07-26 13:21:34 +01:00
2024-11-12 10:19:58 -05:00
2024-09-12 09:40:45 +02:00
2024-09-05 12:05:32 +02:00
2024-01-08 17:09:36 -03:00
2024-09-05 12:05:32 +02:00
2024-09-05 12:05:32 +02:00
2024-11-12 10:19:58 -05:00
2024-09-05 12:05:32 +02:00
2024-04-10 18:10:22 +02:00
2024-09-05 12:05:32 +02:00
2024-04-10 18:10:22 +02:00
2024-08-16 16:05:19 +02:00
2024-11-12 10:19:58 -05:00

This subdirectory contains infrastructure which is not put into
installed libraries, but may be linked into programs (installed or
not) and tests.

# Error-checking wrappers

These wrappers test for error return codes an terminate the process on
error.  They are declared in these header files:

* support.h
* xsignal.h
* xthread.h
* xtime.h

In general, new wrappers should be added to support.h if possible.
However, support.h must remain fully compatible with C90 and therefore
cannot include headers which use identifiers not reserved in C90.  If
the wrappers need additional types, additional headers such as
signal.h need to be introduced.

# Test framework

The test framework provides a main program for tests, including a
timeout for hanging tests.  See README-testing.c for a minimal
example, and test-driver.c for details how to use it.  The following
header files provide related declarations:

* check.h
* temp_file.h
* test-driver.h

For tests that make use of struct timespec, the following header files
contain additional macros and helper functions:

* timespec.h