Commit Graph
980827 Commits
Author SHA1 Message Date
Jacek GalowiczandGitHub b9ca7eaae0 nixos/test-driver: Hide vde switch log messages (#509488) 2026-04-15 18:20:27 +00:00
Jacek GalowiczandGitHub ea044acd82 nixos/test-driver: use vhost-device-vsock for SSH backdoor (#453305) 2026-04-15 18:15:52 +00:00
Michael Schneider b787cf0ca3 nixos/test-driver: Hide vde switch log messages 2026-04-15 18:43:50 +01:00
Maximilian Bosch 1987c483d8 nixos/test-driver: use vhost-device-vsock for SSH backdoor
`vhost-device-vsock`[1] is a custom implementation of AF_VSOCK, but the
application on the host-side uses a UNIX domain-socket. This gives us
the following nice properties:

* We don't need to do `--arg sandbox-paths /dev/vhost-vsock` anymore for
  debugging builds within the sandbox. That means, untrusted users can
  also debug these kinds of tests now.

* This prevents CID conflicts on the host-side, i.e. there's no need for
  using `sshBackdoor.vsockOffset` for tests anymore.

A big shout-out goes to Allison Karlitskaya, the developer of test.thing[2]
who talked about this approach to do AF_VSOCK on All Systems Go 2025.

This patch requires systemd 258[3] because this contains `vhost-mux` in
its SSH config which is needed to connect to the VMs from now on.

To not blow up the patches even more, this only uses AF_VSOCK for the
debugger. A potential follow-up for the future would be a removal of the
current `backdoor.service` and replace it entirely by this
functionality.

The internal implementation tries to be consistent with how VLANs and
machines are handled, i.e. the processes are started when the Driver's
context is entered and cleaned up in __exit__().

I decided to push the process management and creation of sockets for
vhost-device-vsock into its own class, that's an implementation detail
and not a concern for the test-driver. In fact, `vhost-device-vsock` is
something we can drop once QEMU implements native support for using
AF_UNIX on the host-side[4]. `VsockPair` is its own class since
returning e.g. a triple of `(Path, Path, Int)` would be ambiguous in
what is the guest and what the host path (and frankly, I found it hard
to distinguish the two when reading the docs of `vhost-device-vsock`
initially).

Finally, now that we can do the SSH backdoor without adding additional
devices to the sandbox, I figured, it's time to write a test-case for
it.

[1] https://github.com/rust-vmm/vhost-device/blob/main/vhost-device-vsock/README.md
[2] https://codeberg.org/lis/test.thing
[3] https://github.com/NixOS/nixpkgs/pull/427968
[4] https://gitlab.com/qemu-project/qemu/-/issues/2095
2026-04-15 15:45:33 +01:00
Maximilian Bosch 9dcf711303 nixos/test-driver: push allocation into the context-manager
The context manager's purpose is to allocate its resources in `__enter__` and
release them again in `__exit__`.

Right now, the approach is merely a hack since we allocate everything in
the constructor, but use the context-manager protocol as way to reliably
terminate everything.

This isn't a functional change, but merely a correctness change by using
the methods the way they were intended.
2026-04-15 15:45:33 +01:00
Maximilian Bosch d406be44b9 nixos/qemu-vm: add enableSharedMemory option
This option configures a memfd backend for the VM's memory with the size
of `virtualisation.memorySize` and uses that as default memory backend.

This is required for e.g. vhost-device-vsock.

The motivation for making this an option is that I decided to enable
this by default for all NixOS tests to avoid changing essential QEMU
options based on whether or not debugging is enabled. However, there
should be an easy way to turn it off which is what this option provides.
2026-04-15 15:45:33 +01:00
Maximilian Bosch 28a450372a nixos/testing: allow setting test-wide warnings and assertions
This allows us to e.g. use `mkRemovedOptionModule` which will come in
handy in the upcoming commits.
2026-04-15 15:45:32 +01:00
Maximilian Bosch 1087cdd48b vhost-device-vsock: init at 0.3.0 2026-04-15 15:45:32 +01:00
Jacek GalowiczandGitHub c17bc0e1d2 nixos/test-driver: add option to force kvm use (#509553) 2026-04-15 13:31:34 +00:00
nixpkgs-ci[bot]andGitHub 111fe9d770 Merge master into staging-nixos 2026-04-15 12:23:30 +00:00
SandroandGitHub 18429b1845 lutris-unwrapped: 0.5.20 -> 0.5.22 (#495418) 2026-04-15 12:18:28 +00:00
SandroandGitHub ee7c74b78c buildbox: 1.3.54 -> 1.4.3 (#500770) 2026-04-15 12:17:25 +00:00
Vladimír ČunátandGitHub 389024e9fa xorg-server: 21.1.21 -> 21.1.22 (#510184) 2026-04-15 12:11:24 +00:00
Vladimír ČunátandGitHub 382a29b89e thunderbird: 148.0.1 -> 149.0.2 (#509491) 2026-04-15 12:08:42 +00:00
SandroandGitHub acfb9c45cd openthread-border-router: init at 0-unstable-2025-06-12 (#502388) 2026-04-15 12:07:23 +00:00
c652ef26f9 xorg-server: comment on xvfb and mass rebuilds
Co-authored-by: whispers <whispersofthedawn@duck.com>
2026-04-15 14:06:28 +02:00
nixpkgs-ci[bot]andGitHub c466c77a13 wayscriber: 0.9.13 -> 0.9.16 (#510273) 2026-04-15 12:05:50 +00:00
SandroandGitHub 96335556a9 obs-backgroundremoval: 1.1.13 -> 1.3.7 (#502950) 2026-04-15 12:05:32 +00:00
Matteo PaciniandGitHub 2b745867d1 gdevelop: 5.6.265 -> 5.6.266 (#510052) 2026-04-15 12:00:02 +00:00
Matteo PaciniandGitHub 51fed5f459 _2ship2harkinian: darwin support, add maintainer (#510205) 2026-04-15 11:57:32 +00:00
Azat BahawiandGitHub 9fb93e1397 tbls: 1.94.2 -> 1.94.4 (#510261) 2026-04-15 11:46:08 +00:00
Azat BahawiandGitHub ceb40c3c32 mold-unwrapped: 2.40.4 -> 2.41.0 (#510009) 2026-04-15 11:45:32 +00:00
SandroandGitHub 6ec42e52df mfcl8690cdw: 1.3.0-0 -> 1.5.0-3 (#498450) 2026-04-15 11:41:34 +00:00
nixpkgs-ci[bot]andGitHub b8c0de66d7 llmfit: 0.9.1 -> 0.9.8 (#510216) 2026-04-15 11:38:35 +00:00
nixpkgs-ci[bot]andGitHub 30bf82e3ac goshs: 2.0.0-beta.5 -> 2.0.1 (#510208) 2026-04-15 11:38:32 +00:00
nixpkgs-ci[bot]andGitHub 5ec4cc8238 cargo-nextest: 0.9.132 -> 0.9.133 (#510182) 2026-04-15 11:38:31 +00:00
RamsesandGitHub 9092adab5e rollo-printer: init at 1.8.4 (#464258) 2026-04-15 11:33:41 +00:00
Vincent LaporteandGitHub be9d1704d9 ocamlPackages.ppx_mikmatch: init at 1.3 (#474702) 2026-04-15 11:29:39 +00:00
R. Ryantm bfe65f3e61 wayscriber: 0.9.13 -> 0.9.16 2026-04-15 11:24:01 +00:00
SandroandGitHub 89ddb0f44b zrythm: upgrade to KDE6 Package set, hardcode pname (#501333) 2026-04-15 11:22:38 +00:00
Michael Schneider 5f5734db9d nixos/test-driver: add option to force kvm use 2026-04-15 12:15:00 +01:00
Jacek GalowiczandMichael Schneider bffdf7c2a8 nixos-test-driver: Use ty instead of mypy for test driver package 2026-04-15 12:13:45 +01:00
Volker Diels-Grabsch 2234319e75 ocamlPackages.ppx_mikmatch: init at 1.3 2026-04-15 13:13:43 +02:00
kirillrdyandGitHub 1ba325b65d mujoco: 3.6.0 -> 3.7.0 (#510088) 2026-04-15 11:04:30 +00:00
Vincent LaporteandGitHub 729e5df34b coqPackages.jasmin: 2025.06.1 → 2026.03.1 (#509942) 2026-04-15 11:03:30 +00:00
r-vdp 6f33da558e rollo-printer: use pkg-config instead of native cups
configure looks for CUPS via pkg-config first and only falls back to
cups-config. With strictDeps the build-platform cups-config leaks
build-platform -I/-L flags into the cross build (ld warns about
"skipping incompatible libcups.so" and only links because the cc-wrapper
adds the host cups via NIX_LDFLAGS). The cross-aware pkg-config wrapper
picks up the host cups.pc directly, so cups no longer needs to be a
native input.
2026-04-15 12:56:11 +02:00
Ulrik StridandGitHub 0bf587f3c6 microsoft-edge: 146.0.3856.97 -> 147.0.3912.60 (#510204) 2026-04-15 10:55:22 +00:00
Felix BargfeldtandGitHub a823321be7 python3Packages.symbolic: 12.17.3 -> 12.18.0 (#510163) 2026-04-15 10:47:29 +00:00
R. Ryantm 52173fe345 tbls: 1.94.2 -> 1.94.4 2026-04-15 10:46:07 +00:00
nixpkgs-ci[bot]andGitHub 86e2c69338 rumdl: 0.1.67 -> 0.1.72 (#510239) 2026-04-15 10:40:06 +00:00
nixpkgs-ci[bot]andGitHub cbbab7b055 qidi-studio: 2.05.01.52 -> 2.05.01.53 (#510170) 2026-04-15 10:39:52 +00:00
nixpkgs-ci[bot]andGitHub adcec1ec3b evil-winrm-py: 1.5.0 -> 1.6.0 (#510168) 2026-04-15 10:39:50 +00:00
nixpkgs-ci[bot]andGitHub 78a4a94f76 sniffnet: 1.4.2 -> 1.5.0 (#509961) 2026-04-15 10:39:48 +00:00
Stanisław PituchaandGitHub 0400f76dbb afsctool: fix build with CMake 4.x (#510234) 2026-04-15 10:38:54 +00:00
nixpkgs-ci[bot]andGitHub ae012bdd40 Merge master into staging-nixos 2026-04-15 10:38:21 +00:00
K900andGitHub e280fbc426 livekit: 1.10.0 -> 1.10.1 (#505884) 2026-04-15 10:31:19 +00:00
j-kandGitHub bfb178bc1a nono: 0.5.0 -> 0.35.0 (#509106) 2026-04-15 10:23:24 +00:00
Vincent LaporteandGitHub 603e780dad jasmin-compiler: 2026.03.0 → 2026.03.1 (#509956) 2026-04-15 10:00:37 +00:00
RamsesandGitHub ddbc31ef1d nixos/network-interfaces: don't write net.ipv4.conf.all.forwarding=0 (#509648) 2026-04-15 09:51:56 +00:00
Ilan JoselevichandGitHub 3899fb5411 usbvfiod: init at 0.1.0 (#509586) 2026-04-15 09:34:58 +00:00