Page MenuHomeFreeBSD

libc: Test time zone change detection.
ClosedPublic

Authored by des on Jul 16 2025, 1:28 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Oct 10, 10:23 PM
Unknown Object (File)
Fri, Oct 10, 10:23 PM
Unknown Object (File)
Fri, Oct 10, 10:23 PM
Unknown Object (File)
Fri, Oct 10, 10:23 PM
Unknown Object (File)
Fri, Oct 10, 10:23 PM
Unknown Object (File)
Fri, Oct 10, 4:21 PM
Unknown Object (File)
Fri, Oct 10, 4:21 PM
Unknown Object (File)
Fri, Oct 10, 10:32 AM
Subscribers

Details

Summary

Sponsored by: Klara, Inc.
Sponsored by: NetApp, Inc.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

des requested review of this revision.Jul 16 2025, 1:28 PM

tzset is unnecessary and may slow the test down

markj added inline comments.
contrib/tzcode/localtime.c
412

Is this bringing us closer to upstream's code?

lib/libc/tests/stdtime/detect_tz_changes_test.c
56

Probably not much of an issue in practice, but I believe copy_file_range() must be called in a loop to handle short I/O.

153

I believe ATF_* can't be used in a child process.

des marked 3 inline comments as done.Jul 17 2025, 6:21 PM
des added inline comments.
contrib/tzcode/localtime.c
412

No, this code does not exist upstream.

lib/libc/tests/stdtime/detect_tz_changes_test.c
153

It works just fine. It emits an error message to stderr (which we echo) and kills the child (which causes the parent to fail).

des marked 2 inline comments as done.Jul 18 2025, 9:03 AM
des added inline comments.
contrib/tzcode/localtime.c
512–513

This actually fixes a regression in bc42155199b5. I'll split it out into a separate commit.

This revision is now accepted and ready to land.Jul 18 2025, 4:16 PM
This revision was automatically updated to reflect the committed changes.