diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-09-28 21:51:10 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-09-28 21:51:10 +0900 |
| commit | e55822c62f7287698a683e6e7e40aa9a992b5585 (patch) | |
| tree | 19f5e8e2614c86c9a79f8264b49a2b48e13fabee /container/mount_test.go | |
| parent | 802e6afa34de7f6124157153b0bde4ac25d7b363 (diff) | |
container/init: reduce verbose noise
This makes it possible to optionally omit the identifying verbose message, for when the Op implementation can provide a much more useful message in its case, using information not yet available to the String method.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'container/mount_test.go')
| -rw-r--r-- | container/mount_test.go | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/container/mount_test.go b/container/mount_test.go index 4bb024bf..5d274e26 100644 --- a/container/mount_test.go +++ b/container/mount_test.go @@ -12,24 +12,21 @@ import ( func TestBindMount(t *testing.T) { checkSimple(t, "bindMount", []simpleTestCase{ {"mount", func(k syscallDispatcher) error { - return newProcPaths(k, hostPath).bindMount("/host/nix", "/sysroot/nix", syscall.MS_RDONLY, true) + return newProcPaths(k, hostPath).bindMount("/host/nix", "/sysroot/nix", syscall.MS_RDONLY) }, stub.Expect{Calls: []stub.Call{ - call("verbosef", stub.ExpectArgs{"resolved %q flags %#x", []any{"/sysroot/nix", uintptr(1)}}, nil, nil), call("mount", stub.ExpectArgs{"/host/nix", "/sysroot/nix", "", uintptr(0x9000), ""}, nil, stub.UniqueError(0xbad)), }}, stub.UniqueError(0xbad)}, {"success ne", func(k syscallDispatcher) error { - return newProcPaths(k, hostPath).bindMount("/host/nix", "/sysroot/.host-nix", syscall.MS_RDONLY, false) + return newProcPaths(k, hostPath).bindMount("/host/nix", "/sysroot/.host-nix", syscall.MS_RDONLY) }, stub.Expect{Calls: []stub.Call{ - call("verbosef", stub.ExpectArgs{"resolved %q on %q flags %#x", []any{"/host/nix", "/sysroot/.host-nix", uintptr(1)}}, nil, nil), call("mount", stub.ExpectArgs{"/host/nix", "/sysroot/.host-nix", "", uintptr(0x9000), ""}, nil, nil), call("remount", stub.ExpectArgs{"/sysroot/.host-nix", uintptr(1)}, nil, nil), }}, nil}, {"success", func(k syscallDispatcher) error { - return newProcPaths(k, hostPath).bindMount("/host/nix", "/sysroot/nix", syscall.MS_RDONLY, true) + return newProcPaths(k, hostPath).bindMount("/host/nix", "/sysroot/nix", syscall.MS_RDONLY) }, stub.Expect{Calls: []stub.Call{ - call("verbosef", stub.ExpectArgs{"resolved %q flags %#x", []any{"/sysroot/nix", uintptr(1)}}, nil, nil), call("mount", stub.ExpectArgs{"/host/nix", "/sysroot/nix", "", uintptr(0x9000), ""}, nil, nil), call("remount", stub.ExpectArgs{"/sysroot/nix", uintptr(1)}, nil, nil), }}, nil}, |
