diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-10-09 05:04:08 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-10-09 05:18:19 +0900 |
| commit | 87b5c30ef6d5b7b8a10d6a5a8610054c403923e6 (patch) | |
| tree | 805116c39a623bb30fc532af47ea3ed78b7304c0 /container/dispatcher_test.go | |
| parent | df9b77b077d967d35082adb8ab3b00dd67d7bc97 (diff) | |
message: relocate from container
This package is quite useful. This change allows it to be imported without importing container.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'container/dispatcher_test.go')
| -rw-r--r-- | container/dispatcher_test.go | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/container/dispatcher_test.go b/container/dispatcher_test.go index 2a2685fd..4e6ee76f 100644 --- a/container/dispatcher_test.go +++ b/container/dispatcher_test.go @@ -18,6 +18,7 @@ import ( "hakurei.app/container/seccomp" "hakurei.app/container/stub" + "hakurei.app/message" ) type opValidTestCase struct { @@ -329,7 +330,7 @@ func (k *kstub) setDumpable(dumpable uintptr) error { } func (k *kstub) setNoNewPrivs() error { k.Helper(); return k.Expects("setNoNewPrivs").Err } -func (k *kstub) lastcap(msg Msg) uintptr { +func (k *kstub) lastcap(msg message.Msg) uintptr { k.Helper() k.checkMsg(msg) return k.Expects("lastcap").Ret.(uintptr) @@ -409,7 +410,7 @@ func (k *kstub) receive(key string, e any, fdp *uintptr) (closeFunc func() error return } -func (k *kstub) bindMount(msg Msg, source, target string, flags uintptr) error { +func (k *kstub) bindMount(msg message.Msg, source, target string, flags uintptr) error { k.Helper() k.checkMsg(msg) return k.Expects("bindMount").Error( @@ -418,7 +419,7 @@ func (k *kstub) bindMount(msg Msg, source, target string, flags uintptr) error { stub.CheckArg(k.Stub, "flags", flags, 2)) } -func (k *kstub) remount(msg Msg, target string, flags uintptr) error { +func (k *kstub) remount(msg message.Msg, target string, flags uintptr) error { k.Helper() k.checkMsg(msg) return k.Expects("remount").Error( @@ -702,7 +703,7 @@ func (k *kstub) wait4(pid int, wstatus *syscall.WaitStatus, options int, rusage return } -func (k *kstub) printf(_ Msg, format string, v ...any) { +func (k *kstub) printf(_ message.Msg, format string, v ...any) { k.Helper() if k.Expects("printf").Error( stub.CheckArg(k.Stub, "format", format, 0), @@ -711,7 +712,7 @@ func (k *kstub) printf(_ Msg, format string, v ...any) { } } -func (k *kstub) fatal(_ Msg, v ...any) { +func (k *kstub) fatal(_ message.Msg, v ...any) { k.Helper() if k.Expects("fatal").Error( stub.CheckArgReflect(k.Stub, "v", v, 0)) != nil { @@ -720,7 +721,7 @@ func (k *kstub) fatal(_ Msg, v ...any) { panic(stub.PanicExit) } -func (k *kstub) fatalf(_ Msg, format string, v ...any) { +func (k *kstub) fatalf(_ message.Msg, format string, v ...any) { k.Helper() if k.Expects("fatalf").Error( stub.CheckArg(k.Stub, "format", format, 0), @@ -730,7 +731,7 @@ func (k *kstub) fatalf(_ Msg, format string, v ...any) { panic(stub.PanicExit) } -func (k *kstub) checkMsg(msg Msg) { +func (k *kstub) checkMsg(msg message.Msg) { k.Helper() var target *kstub |
