test code v1

This commit is contained in:
2026-08-13 10:44:59 +02:00
commit f3b1165f19
301 changed files with 37885 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
# Test Case: Broken Symlink
**Test ID**: TC040-symlink-broken
## Objective
Verify `readlink(2)` succeeds for a deterministic broken link while following
the target fails with exact `ENOENT`.
## Fixture
Use `images/inline.erofs` and `source/inline/brokenlink`. Evidence asserts
symlink mode, layout 2, and target length 29.
## Procedure
```sh
test -L "$mnt/brokenlink"
readlink /tmp/repo22-g1/source/inline/brokenlink > /tmp/tc040-source-target
readlink "$mnt/brokenlink" > /tmp/tc040-mount-target
cmp /tmp/tc040-source-target /tmp/tc040-mount-target
./read_probe expect-error "$mnt/brokenlink" 2
./read_probe expect-error "$mnt/brokenlink" 2
```
## Expected Results
- Both `readlink` targets equal `/nonexistent/repo22-g1-target`.
- Both follow attempts return errno 2 (`ENOENT`), while the symlink itself
remains visible; no kernel error or cleanup failure occurs.