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)
Sun, Feb 8, 10:41 AM
Unknown Object (File)
Sun, Feb 8, 8:26 AM
Unknown Object (File)
Sun, Feb 8, 3:22 AM
Unknown Object (File)
Sun, Feb 8, 1:18 AM
Unknown Object (File)
Sat, Feb 7, 10:41 PM
Unknown Object (File)
Sat, Feb 7, 10:11 PM
Unknown Object (File)
Tue, Feb 3, 7:36 AM
Unknown Object (File)
Mon, Feb 2, 9:32 AM
Subscribers

Details

Summary

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

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 65555
Build 62438: arc lint + arc unit

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.