From ead87172ebe275c72326a00a21417b854ee040e8 Mon Sep 17 00:00:00 2001 From: ghpzin Date: Mon, 9 Sep 2024 09:56:42 +0300 Subject: [PATCH] nixos/tests/non-default-filesystems: fix btrfs mount regex - fix regex checking mount to handle other mount options - add output from /proc/mounts with '/dev/vda' for debug purposes --- nixos/tests/non-default-filesystems.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nixos/tests/non-default-filesystems.nix b/nixos/tests/non-default-filesystems.nix index 08a17107dd2f..98abe1cbc175 100644 --- a/nixos/tests/non-default-filesystems.nix +++ b/nixos/tests/non-default-filesystems.nix @@ -82,8 +82,9 @@ with pkgs.lib; machine.wait_for_unit("multi-user.target") with subtest("BTRFS filesystems are mounted correctly"): - machine.succeed("grep -E '/dev/vda / btrfs rw,relatime,space_cache=v2,subvolid=[0-9]+,subvol=/root 0 0' /proc/mounts") - machine.succeed("grep -E '/dev/vda /home btrfs rw,relatime,space_cache=v2,subvolid=[0-9]+,subvol=/home 0 0' /proc/mounts") + print("output of \"grep -E '/dev/vda' /proc/mounts\":\n" + machine.execute("grep -E '/dev/vda' /proc/mounts")[1]) + machine.succeed("grep -E '/dev/vda / btrfs rw,.*subvolid=[0-9]+,subvol=/root 0 0' /proc/mounts") + machine.succeed("grep -E '/dev/vda /home btrfs rw,.*subvolid=[0-9]+,subvol=/home 0 0' /proc/mounts") ''; };