summaryrefslogtreecommitdiff
path: root/internal/ior_mode_test.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-05-19 09:47:09 +0300
committerPaul Buetow <paul@buetow.org>2026-05-19 09:47:09 +0300
commit5bd44dcb1e588fd5df8c02aec58353f7aa8f7d13 (patch)
treed4059fce1d43a1f0f0815d753b627802e7599b13 /internal/ior_mode_test.go
parentd699ef44a9ded5d419a470a4f6715ecff7f0fcd1 (diff)
t6 stabilize family recording integration
Diffstat (limited to 'internal/ior_mode_test.go')
-rw-r--r--internal/ior_mode_test.go17
1 files changed, 12 insertions, 5 deletions
diff --git a/internal/ior_mode_test.go b/internal/ior_mode_test.go
index 526b9af..8a152cc 100644
--- a/internal/ior_mode_test.go
+++ b/internal/ior_mode_test.go
@@ -446,11 +446,18 @@ func TestValidateRunConfigRejectsParquetWithContentFilters(t *testing.T) {
if err == nil {
t.Fatalf("expected error for -parquet with content filters")
}
- if err.Error() != "-parquet cannot be combined with content filters (-comm, -path, -pid, -tid)" {
+ if err.Error() != "-parquet cannot be combined with content filters (-comm, -path, -tid)" {
t.Fatalf("unexpected error: %v", err)
}
}
+func TestValidateRunConfigAllowsParquetWithPIDFilter(t *testing.T) {
+ cfg := flags.Config{ParquetPath: "trace.parquet", PidFilter: 42}
+ if err := validateRunConfig(cfg); err != nil {
+ t.Fatalf("expected -parquet with -pid to be accepted, got %v", err)
+ }
+}
+
func TestValidateRunConfigRejectsParquetWithGlobalFilter(t *testing.T) {
cfg := flags.Config{
ParquetPath: "trace.parquet",
@@ -462,7 +469,7 @@ func TestValidateRunConfigRejectsParquetWithGlobalFilter(t *testing.T) {
if err == nil {
t.Fatalf("expected error for -parquet with global filter")
}
- if err.Error() != "-parquet cannot be combined with content filters (-comm, -path, -pid, -tid)" {
+ if err.Error() != "-parquet cannot be combined with content filters (-comm, -path, -tid)" {
t.Fatalf("unexpected error: %v", err)
}
}
@@ -664,7 +671,7 @@ func TestTuiTraceStarterFromRunTraceRespectsCancel(t *testing.T) {
}
}
-func TestHeadlessParquetTraceConfigClearsContentFilters(t *testing.T) {
+func TestHeadlessParquetTraceConfigPreservesPIDAndClearsContentFilters(t *testing.T) {
cfg := flags.Config{
ParquetPath: "trace.parquet",
PidFilter: 1234,
@@ -677,8 +684,8 @@ func TestHeadlessParquetTraceConfigClearsContentFilters(t *testing.T) {
}
got := headlessParquetTraceConfig(cfg)
- if got.PidFilter != -1 || got.TidFilter != -1 {
- t.Fatalf("pid/tid filters = %d/%d, want -1/-1", got.PidFilter, got.TidFilter)
+ if got.PidFilter != 1234 || got.TidFilter != -1 {
+ t.Fatalf("pid/tid filters = %d/%d, want 1234/-1", got.PidFilter, got.TidFilter)
}
if got.CommFilter != "" || got.PathFilter != "" {
t.Fatalf("comm/path filters = %q/%q, want empty", got.CommFilter, got.PathFilter)