container/initsymlink: unwrap mount errors
All checks were successful
Test / Create distribution (push) Successful in 34s
Test / Sandbox (push) Successful in 1m49s
Test / Hakurei (push) Successful in 3m17s
Test / Hpkg (push) Successful in 3m42s
Test / Sandbox (race detector) (push) Successful in 4m10s
Test / Hakurei (race detector) (push) Successful in 5m18s
Test / Flake checks (push) Successful in 1m38s
All checks were successful
Test / Create distribution (push) Successful in 34s
Test / Sandbox (push) Successful in 1m49s
Test / Hakurei (push) Successful in 3m17s
Test / Hpkg (push) Successful in 3m42s
Test / Sandbox (race detector) (push) Successful in 4m10s
Test / Hakurei (race detector) (push) Successful in 5m18s
Test / Flake checks (push) Successful in 1m38s
The mount function now wraps its own errors in a much more descriptive type with proper message formatting. Wrapping them no longer makes any sense. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -377,7 +377,7 @@ func TestInitEntrypoint(t *testing.T) {
|
||||
},
|
||||
}, nil},
|
||||
|
||||
{"apply", func(k syscallDispatcher) error { initEntrypoint(k, assertPrefix, assertVerboseTrue); return nil }, [][]kexpect{
|
||||
{"early unhandled error", func(k syscallDispatcher) error { initEntrypoint(k, assertPrefix, assertVerboseTrue); return nil }, [][]kexpect{
|
||||
{
|
||||
{"lockOSThread", expectArgs{}, nil, nil},
|
||||
{"getpid", expectArgs{}, 1, nil},
|
||||
@@ -759,10 +759,8 @@ func TestInitEntrypoint(t *testing.T) {
|
||||
{"bindMount", expectArgs{"/host", "/sysroot", uintptr(0x4001), false}, nil, nil},
|
||||
{"verbosef", expectArgs{"%s %s", []any{"mounting", &MountProcOp{Target: MustAbs("/proc/")}}}, nil, nil},
|
||||
{"mkdirAll", expectArgs{"/sysroot/proc", os.FileMode(0755)}, nil, nil},
|
||||
{"mount", expectArgs{"proc", "/sysroot/proc", "proc", uintptr(0xe), ""}, nil, errUnique},
|
||||
{"printBaseErr", expectArgs{wrapErrSuffix(errUnique, `cannot mount proc on "/proc/":`), "cannot apply op at index 1:"}, nil, nil},
|
||||
{"beforeExit", expectArgs{}, nil, nil},
|
||||
{"exit", expectArgs{1}, nil, nil},
|
||||
{"mount", expectArgs{"proc", "/sysroot/proc", "proc", uintptr(0xe), ""}, nil, &MountError{"proc", "/sysroot/proc", "proc", uintptr(0xe), "", syscall.ENOTRECOVERABLE}},
|
||||
{"fatal", expectArgs{[]any{"cannot mount proc on /sysroot/proc: state not recoverable"}}, nil, nil},
|
||||
/* end apply */
|
||||
},
|
||||
}, nil},
|
||||
|
||||
Reference in New Issue
Block a user