diff --git a/tests/main/snap-run/task.yaml b/tests/main/snap-run/task.yaml index 8c2a25c2880..d67475e9411 100644 --- a/tests/main/snap-run/task.yaml +++ b/tests/main/snap-run/task.yaml @@ -85,7 +85,9 @@ execute: | echo "Test snap run --strace with options works" snap run --strace="-V" test-snapd-sh.sh -c 'echo hello-world' >stdout 2>stderr MATCH "strace -- version" < stdout - [ ! -s stderr ] + # We don't want to test for an empty stderr should there be unrelated errors with + # strace. Instead we look for a keyword + NOMATCH 'exec' < stderr snap run --trace-exec test-snapd-sh.sh -c 'echo hello' 2> stderr MATCH "Slowest [0-9]+ exec calls during snap run" < stderr