37 lines
1.2 KiB
Markdown
37 lines
1.2 KiB
Markdown
# Test Case: Long Symlink Target
|
|
|
|
**Test ID**: TC039-symlink-long
|
|
|
|
## Objective
|
|
|
|
Verify a greater-than-60-byte EROFS symlink target is returned completely and
|
|
follows correctly.
|
|
|
|
## Fixture
|
|
|
|
Use `images/flat.erofs`, `source/flat/longlink`, and its nested target file.
|
|
Structured evidence records symlink size 73 and actual layout 2. EROFS does not
|
|
switch to a separate-data-block symlink merely at 60 bytes; that former fixture
|
|
assumption is invalid.
|
|
|
|
## Procedure
|
|
|
|
```sh
|
|
test -L "$mnt/longlink"
|
|
readlink /tmp/repo22-g1/source/flat/longlink > /tmp/tc039-source-target
|
|
readlink "$mnt/longlink" > /tmp/tc039-mount-target
|
|
cmp /tmp/tc039-source-target /tmp/tc039-mount-target
|
|
test "$(wc -c < /tmp/tc039-mount-target)" -eq 74
|
|
cmp /tmp/repo22-g1/source/flat/very/long/path/to/a/deeply/nested/deterministic/target/directory/file.txt \
|
|
"$mnt/longlink"
|
|
sha256 "$mnt/longlink" \
|
|
/tmp/repo22-g1/source/flat/very/long/path/to/a/deeply/nested/deterministic/target/directory/file.txt
|
|
```
|
|
|
|
The `wc` count is 73 target bytes plus the output newline.
|
|
|
|
## Expected Results
|
|
|
|
- Source and mounted targets match exactly and exceed 60 bytes.
|
|
- The link follows to source-exact data with no truncation; cleanup succeeds.
|