From e55822c62f7287698a683e6e7e40aa9a992b5585 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Sun, 28 Sep 2025 21:51:10 +0900 Subject: 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 --- container/mount_test.go | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'container/mount_test.go') 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}, -- cgit v1.3.1