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/initmkdir.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'container/initmkdir.go') diff --git a/container/initmkdir.go b/container/initmkdir.go index 54aa4f7b..2f77a526 100644 --- a/container/initmkdir.go +++ b/container/initmkdir.go @@ -20,10 +20,10 @@ type MkdirOp struct { Perm os.FileMode } -func (m *MkdirOp) Valid() bool { return m != nil && m.Path != nil } -func (m *MkdirOp) early(*setupState) error { return nil } -func (m *MkdirOp) apply(*setupState) error { - return wrapErrSelf(os.MkdirAll(toSysroot(m.Path.String()), m.Perm)) +func (m *MkdirOp) Valid() bool { return m != nil && m.Path != nil } +func (m *MkdirOp) early(*setupState, syscallDispatcher) error { return nil } +func (m *MkdirOp) apply(_ *setupState, k syscallDispatcher) error { + return wrapErrSelf(k.mkdirAll(toSysroot(m.Path.String()), m.Perm)) } func (m *MkdirOp) Is(op Op) bool { -- cgit v1.3.1