diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-09-06 19:47:58 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-09-06 19:47:58 +0900 |
| commit | 6cc2b406a45dee7c3fcb686036efdccc1776368d (patch) | |
| tree | bc05b1f63856841802d1dc4544ef26e633919c93 /system/dispatcher_test.go | |
| parent | fcd0f2ede7e51b92ffbc91e57f6096e29b3b5b7d (diff) | |
system/link: use syscall dispatcher
This enables hardlink op methods to be instrumented.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'system/dispatcher_test.go')
| -rw-r--r-- | system/dispatcher_test.go | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/system/dispatcher_test.go b/system/dispatcher_test.go index c23c6c58..c459de4b 100644 --- a/system/dispatcher_test.go +++ b/system/dispatcher_test.go @@ -192,6 +192,19 @@ type kstub struct{ *stub.Stub[syscallDispatcher] } func (k *kstub) new(f func(k syscallDispatcher)) { k.Helper(); k.New(f) } +func (k *kstub) link(oldname, newname string) error { + k.Helper() + return k.Expects("link").Error( + stub.CheckArg(k.Stub, "oldname", oldname, 0), + stub.CheckArg(k.Stub, "newname", newname, 1)) +} + +func (k *kstub) remove(name string) error { + k.Helper() + return k.Expects("remove").Error( + stub.CheckArg(k.Stub, "name", name, 0)) +} + func (k *kstub) aclUpdate(name string, uid int, perms ...acl.Perm) error { k.Helper() return k.Expects("aclUpdate").Error( |
