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/path.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'container/path.go') diff --git a/container/path.go b/container/path.go index 8a01c932..be3cd384 100644 --- a/container/path.go +++ b/container/path.go @@ -151,8 +151,7 @@ func (p *procPaths) mountinfo(f func(d *vfs.MountInfoDecoder) error) error { d := vfs.NewMountInfoDecoder(r) err0 := f(d) if err = r.Close(); err != nil { - return wrapErrSuffix(err, - "cannot close mountinfo:") + return wrapErrSelf(err) } else if err = d.Err(); err != nil { return wrapErrSuffix(err, "cannot parse mountinfo:") -- cgit v1.3.1