HomeFreeBSD

fts: add misc fts traversal tests

Description

fts: add misc fts traversal tests

Extend fts_misc_test.c with additional test cases:

  • FTS_NOCHDIR with absolute paths allows application chdir freely
  • fts_name is always NUL-terminated with correct fts_namelen
  • FTS_D/FTS_DP are paired and fts_level increments correctly
  • FTSENT fts_errno/fts_dev/fts_ino/fts_nlink are correct
  • circular symlink loop under FTS_PHYSICAL terminates
  • cycle via symlink under FTS_LOGICAL yields FTS_DC
  • fts_close after root deletion must not crash
  • fts_close after root rename restores CWD (SVN r77497)
  • FTS_NOCHDIR + empty directory does not corrupt path (SVN r49772)
  • FTS_NS entry has non-zero fts_errno
  • FTS_XDEV and FTS_WHITEOUT stubbed pending mount setup

Sponsored by: Google LLC (GSoC 2026)
Reviewed by: asomers, jillest
MFC after: 2 weeks
Pull Request: https://github.com/freebsd/freebsd-src/pull/2248

Details

Provenance
Jitendra Bhati <bhatijitendra2022@gmail.com>Authored on May 26 2026, 11:23 AM
asomersCommitted on Jun 5 2026, 7:57 PM
Parents
rG0ae946e7223d: vt: Avoid integer overflow in CONS_HISTORY ioctl
Branches
Unknown
Tags
Unknown

Event Timeline

asomers committed rGb45654c6a4d3: fts: add misc fts traversal tests (authored by Jitendra Bhati <bhatijitendra2022@gmail.com>).Jun 5 2026, 7:57 PM