From 09d284498109b847da0da1e2c5f883268a7f2d46 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Thu, 21 Aug 2025 21:59:07 +0900 Subject: container/init: wrap syscall helper functions This allows tests to stub all kernel behaviour, enabling measurement of all function call arguments and error injection. Signed-off-by: Ophestra --- container/initremount.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'container/initremount.go') diff --git a/container/initremount.go b/container/initremount.go index 74bea097..af58c740 100644 --- a/container/initremount.go +++ b/container/initremount.go @@ -19,10 +19,10 @@ type RemountOp struct { Flags uintptr } -func (r *RemountOp) Valid() bool { return r != nil && r.Target != nil } -func (*RemountOp) early(*setupState) error { return nil } -func (r *RemountOp) apply(*setupState) error { - return wrapErrSuffix(hostProc.remount(toSysroot(r.Target.String()), r.Flags), +func (r *RemountOp) Valid() bool { return r != nil && r.Target != nil } +func (*RemountOp) early(*setupState, syscallDispatcher) error { return nil } +func (r *RemountOp) apply(_ *setupState, k syscallDispatcher) error { + return wrapErrSuffix(k.remount(toSysroot(r.Target.String()), r.Flags), fmt.Sprintf("cannot remount %q:", r.Target)) } -- cgit v1.3.1