Skip to content

Commit

Permalink
Merge pull request #8477 from zyga/fix/racy-pulseaudio-tests
Browse files Browse the repository at this point in the history
tests: fix racy pulseaudio tests (2.44)
  • Loading branch information
mvo5 committed Apr 10, 2020
2 parents 49a476e + b07a354 commit e7ca37a
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/main/interfaces-audio-playback-record/task.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@ environment:
EXFAIL: "ubuntu-1[468]"

prepare: |
# FIXME: This test is broken and should be ported to session-tool, systemd
# --user starts pulseaudio for us so we are always racing with it (whoever
# acquires the socket file wins).
#
# To prevent this from breaking this test mask pulseaudio.{socket,service}
# in all user sessions.
systemctl --user --global mask pulseaudio.{socket,service}
#shellcheck source=tests/lib/pkgdb.sh
. "$TESTSLIB"/pkgdb.sh
snap install --edge test-snapd-audio-record
Expand Down Expand Up @@ -36,6 +44,7 @@ restore: |
rm -rf /home/test/.config
mv /home/test/.config.spread /home/test/.config
fi
systemctl --user --global unmask pulseaudio.{socket,service}
execute: |
# we need -p so that XDG_RUNTIME_DIR is honored, but that preserves HOME,
Expand Down
10 changes: 10 additions & 0 deletions tests/main/interfaces-pulseaudio/task.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@ environment:
PA_TEST_LOG: /home/test/pulseaudio.log

prepare: |
# FIXME: This test is broken and should be ported to session-tool, systemd
# --user starts pulseaudio for us so we are always racing with it (whoever
# acquires the socket file wins).
#
# To prevent this from breaking this test mask pulseaudio.{socket,service}
# in all user sessions.
systemctl --user --global mask pulseaudio.{socket,service}
#shellcheck source=tests/lib/pkgdb.sh
. "$TESTSLIB"/pkgdb.sh
snap install --edge test-snapd-pulseaudio
Expand Down Expand Up @@ -57,6 +65,8 @@ restore: |
rm -f /run/user/12345/pulse/native
rm -f $PA_TEST_LOG
systemctl --user --global unmask pulseaudio.{socket,service}
debug: |
if [ -f $PA_TEST_LOG ]; then
cat $PA_TEST_LOG
Expand Down

0 comments on commit e7ca37a

Please sign in to comment.