Skip to content

Commit

Permalink
roachtest: log stdout and stderr in sstable corruption test
Browse files Browse the repository at this point in the history
To aid in debugging cockroachdb#77321, log the contents stdout and stderr if the
manifest dump command fails.

Release justification: Tests only.

Release note: None.
  • Loading branch information
nicktrav committed Mar 3, 2022
1 parent d075b79 commit 15e2f4d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/cmd/roachtest/tests/sstable_corruption.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func runSSTableCorruption(ctx context.Context, t test.Test, c cluster.Cluster) {
result, err := c.RunWithDetailsSingleNode(ctx, t.L(), c.Node(node),
"./cockroach debug pebble manifest dump {store-dir}/MANIFEST-* | grep -v added | grep -v deleted | grep \"\\[/Table\"")
if err != nil {
t.Fatal(err)
t.Fatalf("could not find tables to corrupt: %s\nstdout: %s\nstderr: %s", err, result.Stdout, result.Stderr)
}
tableSSTs := strings.Split(result.Stdout, "\n")
if len(tableSSTs) == 0 {
Expand Down

0 comments on commit 15e2f4d

Please sign in to comment.