nixpkgs/nixos/lib
Maximilian Bosch b210d55d48 nixos/lib/test-driver: try using XDG_RUNTIME_DIR if available
At work we have the use-case that several people connect to a large
Linux box to run tests and debug those interactively.

All tests write their state into a global `/tmp` -- e.g. the vde1 socket
and the VMs' state. This leads to conflicts when multiple people are
doing this.

This change tries to use XDG_RUNTIME_DIR before using Python's detection
of a global temp directory: when connecting, this requires a working
user session, but then we get working directories per user. This is
preferable over doing something like `mktemp -d` per run since that
would break use-cases where you want to keep the VMs' state across
multiple sessions (`--keep-vm-state`).

(cherry picked from commit 59b4d0de90)
2025-07-28 09:03:14 +00:00
..
make-options-doc tests.nixosOptionsDoc: init 2025-01-02 22:42:05 +01:00
test-driver nixos/lib/test-driver: try using XDG_RUNTIME_DIR if available 2025-07-28 09:03:14 +00:00
testing treewide: run nixfmt 1.0.0 2025-07-24 14:58:18 +02:00
default.nix treewide: format all inactive Nix files 2024-12-10 20:26:33 +01:00
eval-cacheable-options.nix treewide: format all inactive Nix files 2024-12-10 20:26:33 +01:00
eval-config-minimal.nix treewide: run nixfmt 1.0.0 2025-07-24 14:58:18 +02:00
eval-config.nix treewide: Format all Nix files 2025-04-01 20:10:43 +02:00
from-env.nix treewide: format all inactive Nix files 2024-12-10 20:26:33 +01:00
make-btrfs-fs.nix treewide: run nixfmt 1.0.0 2025-07-24 14:58:18 +02:00
make-channel.nix treewide: format all inactive Nix files 2024-12-10 20:26:33 +01:00
make-disk-image.nix treewide: drop copumpkin from maintainers (#392486) 2025-04-18 19:00:51 +08:00
make-ext4-fs.nix treewide: run nixfmt 1.0.0 2025-07-24 14:58:18 +02:00
make-iso9660-image.nix treewide: run nixfmt 1.0.0 2025-07-24 14:58:18 +02:00
make-iso9660-image.sh
make-multi-disk-zfs-image.nix nixos/lib/make-*-disk-zfs-image: fix build 2025-02-02 21:51:07 +01:00
make-single-disk-zfs-image.nix nixos/lib/make-*-disk-zfs-image: fix build 2025-02-02 21:51:07 +01:00
make-squashfs.nix treewide: run nixfmt 1.0.0 2025-07-24 14:58:18 +02:00
make-system-tarball.nix treewide: format all inactive Nix files 2024-12-10 20:26:33 +01:00
make-system-tarball.sh treewide: load structured attributes in all bash builders consistently 2024-12-29 18:36:47 +01:00
qemu-common.nix treewide: format all inactive Nix files 2024-12-10 20:26:33 +01:00
systemd-lib.nix treewide: run nixfmt 1.0.0 2025-07-24 14:58:18 +02:00
systemd-network-units.nix treewide: format all inactive Nix files 2024-12-10 20:26:33 +01:00
systemd-types.nix treewide: format all inactive Nix files 2024-12-10 20:26:33 +01:00
systemd-unit-options.nix nixos/lib: fix typo in documentation for systemd 2025-05-09 20:25:34 +02:00
test-script-prepend.py nixos/test-driver: integrate Python unittest assertions 2025-03-20 12:30:58 +00:00
testing-python.nix nixos/test-driver: printout instructions on how to connect via AF_VSOCK 2025-05-08 10:51:39 +02:00
utils.nix fix(utils): remove unnecessary $ from variable in arithmetic 2025-02-08 23:07:10 -05:00