Skip to content

Commit

Permalink
tests: fix snap-run failure (canonical#14599)
Browse files Browse the repository at this point in the history
* tests: search for exec word in stderr instead of expecting it to be empty

* Add line break in comment

Co-authored-by: Maciej Borzecki <[email protected]>

---------

Co-authored-by: Maciej Borzecki <[email protected]>
  • Loading branch information
maykathm and bboozzoo authored Oct 16, 2024
1 parent 1350181 commit b71b47e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/main/snap-run/task.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b71b47e

Please sign in to comment.