From 6cc2b406a45dee7c3fcb686036efdccc1776368d Mon Sep 17 00:00:00 2001 From: Ophestra Date: Sat, 6 Sep 2025 19:47:58 +0900 Subject: system/link: use syscall dispatcher This enables hardlink op methods to be instrumented. Signed-off-by: Ophestra --- system/dispatcher_test.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'system/dispatcher_test.go') 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( -- cgit v1.3.1