diff options
| author | Paul Buetow <paul@buetow.org> | 2026-03-10 19:25:51 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-03-10 19:25:51 +0200 |
| commit | c43932b6eee8b8a964b9be7c21c42057f05456ba (patch) | |
| tree | 94a5a7ebeefdc79c106060c004b561985df69970 /internal/ior_mode_test.go | |
| parent | 70acff73c8d103ec68c575d3cac1bdd87c189cf0 (diff) | |
task 434: unify trace filter plumbing
Diffstat (limited to 'internal/ior_mode_test.go')
| -rw-r--r-- | internal/ior_mode_test.go | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/internal/ior_mode_test.go b/internal/ior_mode_test.go index 4140485..8fbc79c 100644 --- a/internal/ior_mode_test.go +++ b/internal/ior_mode_test.go @@ -461,11 +461,17 @@ func TestTuiTraceStarterFromRunTraceUsesContextFilters(t *testing.T) { if gotCfg.TidFilter != 3333 { t.Fatalf("expected tid filter from context, got %d", gotCfg.TidFilter) } - if gotCfg.CommFilter != "nginx" { - t.Fatalf("expected comm filter from context, got %q", gotCfg.CommFilter) + if gotCfg.CommFilter != "" { + t.Fatalf("expected legacy comm filter to remain unused, got %q", gotCfg.CommFilter) } - if gotCfg.PathFilter != "/var/log" { - t.Fatalf("expected path filter from context, got %q", gotCfg.PathFilter) + if gotCfg.PathFilter != "" { + t.Fatalf("expected legacy path filter to remain unused, got %q", gotCfg.PathFilter) + } + if gotCfg.GlobalFilter.Comm == nil || gotCfg.GlobalFilter.Comm.Pattern != "nginx" { + t.Fatalf("expected comm preserved in global filter payload, got %+v", gotCfg.GlobalFilter.Comm) + } + if gotCfg.GlobalFilter.File == nil || gotCfg.GlobalFilter.File.Pattern != "/var/log" { + t.Fatalf("expected file preserved in global filter payload, got %+v", gotCfg.GlobalFilter.File) } if gotCfg.GlobalFilter.Syscall == nil || gotCfg.GlobalFilter.Syscall.Pattern != "read" { t.Fatalf("expected syscall preserved in global filter payload, got %+v", gotCfg.GlobalFilter.Syscall) |
