[PATCH 45/59] Remove invalid tzset tests from tst-bz29951.c
Paul Eggert
eggert@cs.ucla.edu
Sun Jan 5 05:57:20 GMT 2025
* timezone/tst-bz29951.c (set_timezone):
Do not test errno after tzset, as its value is unspecified then.
(do_test): Do not test daylight or timezone after tzset, as their
values are unspecified with geographical TZ. See Austin Group
Defect 1816 <https://www.austingroupbugs.net/view.php?id=1816>.
---
timezone/tst-bz29951.c | 8 --------
1 file changed, 8 deletions(-)
diff --git a/timezone/tst-bz29951.c b/timezone/tst-bz29951.c
index ff0eb6ff1e..ee68c5c143 100644
--- a/timezone/tst-bz29951.c
+++ b/timezone/tst-bz29951.c
@@ -26,9 +26,7 @@ static void
set_timezone (const char *name)
{
TEST_VERIFY (setenv ("TZ", name, 1) == 0);
- errno = 0;
tzset ();
- TEST_COMPARE (errno, 0);
}
static int
@@ -44,15 +42,9 @@ do_test (void)
= Fri Oct 25 02:00:00 2013 EET isdst=0 gmtoff=7200
*/
set_timezone ("XT6");
- TEST_VERIFY (daylight != 0);
- TEST_COMPARE (timezone, -7200);
- /* Check that localtime re-initializes the two variables. */
- daylight = timezone = 17;
time_t t = 844034401;
struct tm *tm = localtime (&t);
- TEST_VERIFY (daylight != 0);
- TEST_COMPARE (timezone, -7200);
TEST_COMPARE (tm->tm_year, 96);
TEST_COMPARE (tm->tm_mon, 8);
TEST_COMPARE (tm->tm_mday, 29);
--
2.45.2
More information about the Libc-alpha
mailing list