Page MenuHomeFreeBSD

realpath: Additional test cases
ClosedPublic

Authored by des on Oct 10 2025, 2:05 PM.
Tags
None
Referenced Files
F174354039: D53024.id163937.diff
Fri, Oct 2, 3:36 PM
Unknown Object (File)
Mon, Sep 28, 12:54 PM
Unknown Object (File)
Wed, Sep 23, 9:36 AM
Unknown Object (File)
Thu, Sep 10, 9:02 PM
Unknown Object (File)
Mon, Sep 7, 6:54 PM
Unknown Object (File)
Mon, Sep 7, 3:46 PM
Unknown Object (File)
Mon, Sep 7, 2:50 PM
Unknown Object (File)
Mon, Sep 7, 10:55 AM
Subscribers

Details

Summary
  • Passing NULL should result in EINVAL
  • Passing an empty path should result in ENOENT
  • Failure with a non-null buffer should leave a partial result. As pointed out in a comment in the test case, this reveals a discrepancy between the documentation and reality. I am not sure if we want to fix the code (and risk breaking existing consumers) or amend the documentation to point out that this feature is both non-portable and not always as helpful as it sounds.

Sponsored by: Klara, Inc.

Diff Detail

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

Event Timeline

des requested review of this revision.Oct 10 2025, 2:05 PM
This revision is now accepted and ready to land.Oct 10 2025, 7:18 PM
This revision was automatically updated to reflect the committed changes.