Files
erofs-freebsd-out-tree/tests/TC038-symlink-short.md
T
2026-08-13 10:44:59 +02:00

858 B

Test Case: Short Symlink Target

Test ID: TC038-symlink-short

Objective

Verify a short FLAT_INLINE symlink returns the exact source target and follows to source-exact file data.

Fixture

Use images/inline.erofs, source/inline/link1, and source/inline/target.txt. Evidence asserts symlink mode, layout 2, and target length 10.

Procedure

test -L "$mnt/link1"
readlink /tmp/repo22-g1/source/inline/link1 > /tmp/tc038-source-target
readlink "$mnt/link1" > /tmp/tc038-mount-target
cmp /tmp/tc038-source-target /tmp/tc038-mount-target
cmp /tmp/repo22-g1/source/inline/target.txt "$mnt/link1"
sha256 /tmp/repo22-g1/source/inline/target.txt "$mnt/link1"

Expected Results

  • readlink returns exactly target.txt, without newline truncation ambiguity.
  • Following the link yields the exact target source; cleanup succeeds.