diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-08-21 21:59:07 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-08-22 19:27:31 +0900 |
| commit | 09d284498109b847da0da1e2c5f883268a7f2d46 (patch) | |
| tree | 3784dee4b4e4ec97a95cb222c70d05463ae640ef /container/initremount_test.go | |
| parent | d500d6e55917e12a3f98b39cf0d29b6c96de9667 (diff) | |
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 <cat@gensokyo.uk>
Diffstat (limited to 'container/initremount_test.go')
| -rw-r--r-- | container/initremount_test.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/container/initremount_test.go b/container/initremount_test.go index db5476ec..22c978fc 100644 --- a/container/initremount_test.go +++ b/container/initremount_test.go @@ -6,6 +6,15 @@ import ( ) func TestRemountOp(t *testing.T) { + checkOpBehaviour(t, []opBehaviourTestCase{ + {"success", new(Params), &RemountOp{ + Target: MustAbs("/"), + Flags: syscall.MS_RDONLY, + }, nil, nil, []kexpect{ + {"remount", expectArgs{"/sysroot", uintptr(1)}, nil, nil}, + }, nil}, + }) + checkOpsValid(t, []opValidTestCase{ {"nil", (*RemountOp)(nil), false}, {"zero", new(RemountOp), false}, |
