31 lines
858 B
Markdown
31 lines
858 B
Markdown
# 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
|
|
|
|
```sh
|
|
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.
|