From 04500a92433396ca17cb879f4a40e4399dc06ff9 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sat, 21 Feb 2026 21:16:01 +0200 Subject: Add negative integration tests for rename syscalls (task 348) - rename-enoent: rename nonexistent file via SYS_RENAME (ENOENT) - rename-noreplace: renameat2 with RENAME_NOREPLACE on existing target (EEXIST) Both verify ior captures tracepoints on entry even when syscall fails. Amp-Thread-ID: https://ampcode.com/threads/T-019c819e-cdae-7777-9be6-992ca8a7b96b Co-authored-by: Amp --- integrationtests/rename_test.go | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'integrationtests/rename_test.go') diff --git a/integrationtests/rename_test.go b/integrationtests/rename_test.go index 0ae1d47..50d80cb 100644 --- a/integrationtests/rename_test.go +++ b/integrationtests/rename_test.go @@ -34,3 +34,25 @@ func TestRenameRenameat2(t *testing.T) { }, }) } + +func TestRenameEnoent(t *testing.T) { + runScenario(t, "rename-enoent", []ExpectedEvent{ + { + PathContains: "rename-enoent-missing.txt", + Tracepoint: "enter_rename", + Comm: "ioworkload", + MinCount: 1, + }, + }) +} + +func TestRenameNoreplace(t *testing.T) { + runScenario(t, "rename-noreplace", []ExpectedEvent{ + { + PathContains: "noreplace-dst.txt", + Tracepoint: "enter_renameat2", + Comm: "ioworkload", + MinCount: 1, + }, + }) +} -- cgit v1.2.3