container/init: unwrap path errors
Some checks failed
Test / Create distribution (push) Successful in 33s
Test / Flake checks (push) Has been cancelled
Test / Hakurei (race detector) (push) Has been cancelled
Test / Hakurei (push) Has been cancelled
Test / Sandbox (race detector) (push) Has been cancelled
Test / Hpkg (push) Has been cancelled
Test / Sandbox (push) Has been cancelled

These are also now handled by init properly, so wrapping them in self is meaningless and unreachable.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2025-08-29 02:04:09 +09:00
parent 5b3932ab65
commit ce5d773cd5
22 changed files with 243 additions and 117 deletions

View File

@@ -12,7 +12,7 @@ func TestSymlinkOp(t *testing.T) {
LinkName: "/etc/static/nixos",
}, nil, nil, []kexpect{
{"mkdirAll", expectArgs{"/sysroot/etc", os.FileMode(0700)}, nil, errUnique},
}, wrapErrSelf(errUnique)},
}, errUnique},
{"abs", &Params{ParentPerm: 0755}, &SymlinkOp{
Target: MustAbs("/etc/mtab"),
@@ -26,7 +26,7 @@ func TestSymlinkOp(t *testing.T) {
Dereference: true,
}, []kexpect{
{"readlink", expectArgs{"/etc/mtab"}, "/proc/mounts", errUnique},
}, wrapErrSelf(errUnique), nil, nil},
}, errUnique, nil, nil},
{"success noderef", &Params{ParentPerm: 0700}, &SymlinkOp{
Target: MustAbs("/etc/nixos"),