Skip to content

Commit

Permalink
test: add strace function
Browse files Browse the repository at this point in the history
Signed-off-by: Alessio Greggi <[email protected]>
  • Loading branch information
alegrey91 committed Aug 19, 2024
1 parent 64d23bb commit 91cc121
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,9 @@ func strace(ts *testscript.TestScript, neg bool, args []string) {

syscalls := processStraceOutput(stderrBuf.String())
if err := os.WriteFile(outputFile, []byte(syscalls), 0644); err != nil {
ts.Logf("strace output saved to %s", outputFile)
ts.Fatalf("error saving strace output to %s", outputFile)
}
ts.Logf("strace output saved to %s", outputFile)
}

func processStraceOutput(output string) string {
Expand Down

0 comments on commit 91cc121

Please sign in to comment.