summaryrefslogtreecommitdiff
path: root/internal/generate/retclassify_test.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-05-29 17:31:03 +0300
committerPaul Buetow <paul@buetow.org>2026-05-29 17:31:03 +0300
commit372d01873ccdc7db9a076c12577d5b1ab6288d10 (patch)
tree352f6c5add860bf8d9644f533c25dc7624379ad0 /internal/generate/retclassify_test.go
parentb184674de2bc4f3cb27aaa31bcc64c3f3976ecff (diff)
test(syncfs): lock in FS family + fd kind classification
Audit of syncfs(2) confirmed the existing tracing is correct: single fd arg (fd=args[0], KindFd), FamilyFS like its fsync/fdatasync/ sync_file_range siblings, and an int 0/-1 return that stays Unclassified (plain ret_event). No code or generated artifacts changed. Add lock-in tests so a stray reclassification trips CI: - TestClassifySyncFamilyFdSyscallsByName: enter -> KindFd for the fsync/fdatasync/syncfs/sync_file_range group. - TestClassifyExitSyncfs: exit -> KindRet. - sync-family FamilyFS assertions in TestClassifySyncallFamily. - syncfs added to the ret-UNCLASSIFIED list. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Diffstat (limited to 'internal/generate/retclassify_test.go')
-rw-r--r--internal/generate/retclassify_test.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/internal/generate/retclassify_test.go b/internal/generate/retclassify_test.go
index 70ade1a..148c1e6 100644
--- a/internal/generate/retclassify_test.go
+++ b/internal/generate/retclassify_test.go
@@ -44,6 +44,10 @@ func TestClassifyRetUnclassified(t *testing.T) {
"openat", "close", "rename", "unlink", "fcntl", "dup", "dup2", "dup3",
"mkdir", "rmdir", "chmod", "chown", "chdir", "stat", "lseek",
"truncate", "fallocate", "mmap", "fsync", "flock", "recvmmsg", "sendmmsg",
+ // syncfs(2) returns int 0/-1 (no byte count); it commits the filesystem
+ // containing args[0]'s fd and transfers no bytes, so its exit must stay
+ // UNCLASSIFIED (plain ret_event), like its fsync/fdatasync siblings.
+ "syncfs",
// gettimeofday(2) returns int 0/-1 (no byte count); its exit carries a
// plain ret_event and must stay UNCLASSIFIED, not a read/write transfer.
"gettimeofday",