From 4df620818f603564b2e6f4def6052baa72b2fbb1 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Fri, 29 May 2026 17:22:56 +0300 Subject: utime/utimes: classify as FS family (fix Misc misclassification) utime(2) and utimes(2) change a file's access/modification times by a real filesystem path (filename at args[0]). The path was already captured (KindPathname), but both syscalls fell through to FamilyMisc instead of joining their siblings utimensat/futimesat in FamilyFS. Add them to fsSyscalls and regenerate; the only generated change is trace IDs 1034-1037 flipping FamilyMisc -> FamilyFS. Lock-in coverage: - family_test.go asserts utime/utimes/utimensat/futimesat are all FamilyFS. - classify_test.go + FormatUtime fixture assert utime is KindPathname with PathnameField "filename" (path captured even though it is a char* string, unlike domain/host name args). - New ioworkload scenarios utime-basic/utimes/enoent and integration tests TestUtimeBasic/Utimes/Enoent verify the path is captured at runtime, including on the ENOENT error path. Docs updated: moved utime/utimes from Misc to FS in docs/syscall-tracing-plan.md to keep the drift tests green. Co-Authored-By: Claude Opus 4.8 --- internal/generate/classify_test.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'internal/generate/classify_test.go') diff --git a/internal/generate/classify_test.go b/internal/generate/classify_test.go index dc265a6..768e367 100644 --- a/internal/generate/classify_test.go +++ b/internal/generate/classify_test.go @@ -88,6 +88,21 @@ func TestClassifyPathnameUnlink(t *testing.T) { } } +// TestClassifyPathnameUtime locks in that utime's args[0] "filename" is +// captured as a real path. utime(2) changes a file's access/modification +// times; its filename argument is a genuine filesystem path (not a +// domain/host name string), so it must classify as KindPathname with the +// path wired to the "filename" field — matching siblings utimensat/futimesat. +func TestClassifyPathnameUtime(t *testing.T) { + r := classifyFromData(t, FormatUtime) + if r.Kind != KindPathname { + t.Errorf("utime: got kind %d, want KindPathname", r.Kind) + } + if r.PathnameField != "filename" { + t.Errorf("utime: PathnameField = %q, want filename", r.PathnameField) + } +} + func TestClassifyNameRename(t *testing.T) { r := classifyFromData(t, FormatRename) if r.Kind != KindName { -- cgit v1.2.3