Page MenuHomeFreeBSD

realpath: Additional test cases
ClosedPublic

Authored by des on Oct 10 2025, 2:05 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Jan 10, 6:18 PM
Unknown Object (File)
Thu, Jan 1, 2:34 PM
Unknown Object (File)
Wed, Dec 31, 12:01 PM
Unknown Object (File)
Dec 3 2025, 7:57 PM
Unknown Object (File)
Nov 24 2025, 3:10 PM
Unknown Object (File)
Nov 19 2025, 2:18 PM
Unknown Object (File)
Nov 16 2025, 11:12 AM
Unknown Object (File)
Nov 2 2025, 10:57 PM
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 Not Applicable
Unit
Tests Not Applicable

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.