Open benaryorg opened 1 day ago
Known issue, the test really doesn't like running in a VM, and we currently don't have a good way to skip it, because the test runner doesn't provide one.
Known issue
Ah, sorry if I just opened a duplicate, I just haven't found any info on that (may not have used the right keywords).
we currently don't have a good way to skip it
Wouldn't it be pretty easy (and not too hacky IMHO) to rm
the offending test in preInstallPhase
or something?
Alternatively, providing the testConfig parameter in the test definition to set services.pipewire.alsa.enable = true
might work (currently testing that).
Yeah, this here gets the plugins to load but then it still fails with audio open error: Host is down:
diff --git a/nixos/tests/installed-tests/pipewire.nix b/nixos/tests/installed-tests/pipewire.nix
index 6e69ada8612f..287d5ce86765 100644
--- a/nixos/tests/installed-tests/pipewire.nix
+++ b/nixos/tests/installed-tests/pipewire.nix
@@ -1,5 +1,14 @@
{ pkgs, makeInstalledTest, ... }:
-makeInstalledTest {
+makeInstalledTest rec {
tested = pkgs.pipewire;
+ # required for the pipewire alsa plugins
+ testConfig = {
+ virtualisation.qemu.options = [ "-audio driver=none,model=virtio" ];
+ services.pipewire = {
+ enable = true;
+ package = tested;
+ alsa.enable = true;
+ };
+ };
}
(note: given that it always uses the pkgs.pipewire for tested anyway I don't think that tests would've worked with override anyway, so the test always tests the default pipewire provided by nixpkgs I think, which makes the package definition woefully redundant)
Looking at aplay -l
I can definitely see an audio device, which means something else is going wrong here, so at least this isn't a simple fix, explaining why it's a known issue.
Just leaving this here so that someone in the future might use this to get the tests working, but I'm a bit lost here so it's probably not me who's gonna do that.
Describe the bug
The nixos.tests.installed-tests.pipewire.x86_64-linux test currently fails on master. After some debugging I think the ALSA plugins are probably be missing.
way of reproducing the environment with strace
Grab the *nixos-test-driver* (in my case `/nix/store/z0w2d8cqjgg8fkcwad40midd3qx7fh12-nixos-test-driver-pipewire-1.2.5/bin/nixos-test-driver`) and run it with `--interactive`, then use `machine.shell_interact()` for a shell, and wait for everything to be up. Then hit Enter once for a proper prompt and run this (with appropriate paths for *strace* and the *installed-tests* of course): ```bash mkdir -p /tmp/foo/installed-tests/pipewire && sed -E "s#Exec=#Exec=/nix/store/f7fx11v29srmyzqyyj3zwsmv8k4szfm7-strace-6.11/bin/strace -fftts 8192 #" /nix/store/5g49ip9d87gb7kybaf8860va0zyv3lwy-pipewire-1.2.5-installedTests/share/installed-tests/pipewire-0.3/pw-test-pipewire-alsa-stress.test > /tmp/foo/installed-tests/pipewire/foo.test && gnome-desktop-testing-runner -d /tmp/foo ``` For me this yields *Unknown PCM pipewire*, and looking at the *open()* calls also does not include anything that looks even vaguely like [the pipewire ALSA plugin configuration](https://github.com/NixOS/nixpkgs/blob/dcccac396c976154f2e4e6e149ff7b79fc6a54f3/nixos/modules/services/desktops/pipewire/pipewire.nix#L382-L396). Said configuration also does not seem to be linked into */etc* on the test VM either.Steps To Reproduce
You will see something like this before the stacktrace:
Expected behavior
All tests pass.
This can either be solved by providing the ALSA plugin configuration, or by removing the test. Since people use those ALSA plugins I think it would be good to have them tested.
Metadata
"x86_64-linux"
Linux 6.6.59, NixOS, 24.05 (Uakari), 24.05
yes
yes
nix-env (Lix, like Nix) 2.91.1-pre20240926-4422a64 System type: x86_64-linux Additional system types: i686-linux, x86_64-v1-linux, x86_64-v2-linux, x86_64-v3-linux Features: gc, signed-caches System configuration file: /etc/nix/nix.conf User configuration files: /home/benaryorg/.config/nix/nix.conf:/etc/xdg/nix/nix.conf:/home/benaryorg/.nix-profile/etc/xdg/nix/nix.conf:/nix/profile/etc/xdg/nix/nix.conf:/home/benaryorg/.local/state/nix/profile/etc/xdg/nix/nix.conf:/etc/profiles/per-user/benaryorg/etc/xdg/nix/nix.conf:/nix/var/nix/profiles/default/etc/xdg/nix/nix.conf:/run/current-system/sw/etc/xdg/nix/nix.conf Store directory: /nix/store State directory: /nix/var/nix Data directory: /nix/store/bwrx2apv117ad62vd2ya0gc56jy0ak31-lix-2.91.1-pre20240926-4422a64/share
/nix/store/b309kyd5hrvrrf5z5xbqglmb1hhm8n6p-source
Notify maintainers
Note for maintainers: Please tag this issue in your PR.
Add a :+1: reaction to issues you find important.