summary refs log tree commit diff
path: root/release/checks
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2023-12-16 20:15:11 +0100
committerAlyssa Ross <hi@alyssa.is>2023-12-16 23:45:59 +0100
commit8af86fe4f1ce32b34c434f236ff9cca0f58e6292 (patch)
tree136cd77b800a2773602a71e142cc855960a628d6 /release/checks
parent715033d0c5d2be16a6d55f83588922be47eb54eb (diff)
downloadspectrum-8af86fe4f1ce32b34c434f236ff9cca0f58e6292.tar
spectrum-8af86fe4f1ce32b34c434f236ff9cca0f58e6292.tar.gz
spectrum-8af86fe4f1ce32b34c434f236ff9cca0f58e6292.tar.bz2
spectrum-8af86fe4f1ce32b34c434f236ff9cca0f58e6292.tar.lz
spectrum-8af86fe4f1ce32b34c434f236ff9cca0f58e6292.tar.xz
spectrum-8af86fe4f1ce32b34c434f236ff9cca0f58e6292.tar.zst
spectrum-8af86fe4f1ce32b34c434f236ff9cca0f58e6292.zip
release/checks/wayland: fix false positives
Sometimes the application running inside the crosvm VM can commit
between wc exiting and the VM being stopped.  If this happens,
there'll be an extra byte in the fifo, which will interfere with the
second test.  To fix this, recreate the fifo to ensure it's empty at
the start of the Cloud Hypervisor test.

Fixes: 5a5f892 ("release/checks/wayland: also test cloud-hypervisor")
Signed-off-by: Alyssa Ross <hi@alyssa.is>
Diffstat (limited to 'release/checks')
-rw-r--r--release/checks/wayland/default.nix5
1 files changed, 4 insertions, 1 deletions
diff --git a/release/checks/wayland/default.nix b/release/checks/wayland/default.nix
index 5c430d5..371760d 100644
--- a/release/checks/wayland/default.nix
+++ b/release/checks/wayland/default.nix
@@ -50,13 +50,14 @@ nixosTest ({ lib, pkgs, ... }: {
 
     systemd.services.surface-notify-socket = {
       serviceConfig.ExecStart = "${pkgs.coreutils}/bin/mkfifo /run/surface-notify";
+      serviceConfig.ExecStop = "${pkgs.coreutils}/bin/rm -f /run/surface-notify";
       serviceConfig.RemainAfterExit = true;
       serviceConfig.Type = "oneshot";
     };
 
     systemd.services.weston = {
       after = [ "surface-notify-socket.service" ];
-      requires = [ "surface-notify-socket.service" ];
+      wants = [ "surface-notify-socket.service" ];
       environment.XDG_RUNTIME_DIR = "/run";
       environment.WAYLAND_DEBUG = "server";
       serviceConfig.ExecStart = "${lib.getExe pkgs.westonLite} --modules ${surface-notify}/lib/weston/surface-notify.so,systemd-notify.so";
@@ -75,6 +76,8 @@ nixosTest ({ lib, pkgs, ... }: {
     machine.stop_job('crosvm-gpu.service')
     machine.stop_job('crosvm.service')
 
+    machine.systemctl('restart surface-notify-socket')
+    machine.wait_for_unit('surface-notify-socket')
     machine.start_job('cloud-hypervisor.service')
     machine.succeed('test "$(wc -c /run/surface-notify)" = "1 /run/surface-notify"', timeout=180)
     machine.screenshot('cloud-hypervisor')