From 91cc1212bdd33b5917f89663c0ae117c026c8d5e Mon Sep 17 00:00:00 2001 From: Alessio Greggi Date: Mon, 19 Aug 2024 23:13:07 +0200 Subject: [PATCH] test: add strace function Signed-off-by: Alessio Greggi --- utils.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/utils.go b/utils.go index ebfa69e..a47fbf9 100644 --- a/utils.go +++ b/utils.go @@ -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 {