Files
erofs-freebsd-out-tree/tests/TC059-readlink.md
T
2026-08-18 09:20:44 +02:00

31 lines
1.0 KiB
Markdown

# Test Case: readlink Exact Targets
**Test ID**: TC059-readlink
**Category**: VFS Integration
**Priority**: High
## Objective
Verify short, relative, broken, and long symlink targets are returned exactly,
including the long inline target length and bytes.
## Procedure
Mount vfs/vfs-plain.erofs and run:
./g3_vfs_probe readlink /tmp/repo22-g3/mnt/testdir/shortlink
./g3_vfs_probe readlink /tmp/repo22-g3/mnt/testdir/relative-link
./g3_vfs_probe readlink /tmp/repo22-g3/mnt/testdir/broken-link
./g3_vfs_probe readlink /tmp/repo22-g3/mnt/testdir/long-link
cmp fixtures/vfs/source/testdir/file.txt \
/tmp/repo22-g3/mnt/testdir/shortlink
./g3_vfs_probe expect-error stat \
/tmp/repo22-g3/mnt/testdir/broken-link 2
## Expected Results
The helper reports exact targets and hashes: shortlink is file.txt, the
relative link is subdir/child.txt, broken-link is missing-target, and long-link
has the recorded 119-byte target. Following valid links matches source; the
broken target returns errno 2. Record output and cleanup.