From 6ec928d73d0580692e75c54c79a0f5a69c1edcf2 Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Mon, 12 Sep 2022 23:49:52 +0800 Subject: nixos/stratis: wait for devices to appear in tests --- nixos/tests/stratis/simple.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nixos/tests/stratis/simple.nix b/nixos/tests/stratis/simple.nix index 0878cb12d967a..7357d71fc52ba 100644 --- a/nixos/tests/stratis/simple.nix +++ b/nixos/tests/stratis/simple.nix @@ -23,11 +23,13 @@ import ../make-test-python.nix ({ pkgs, ... }: machine.succeed("stratis filesystem rename testpool testfs0 testfs1") # test snapshot machine.succeed("mkdir -p /mnt/testfs1 /mnt/testfs2") + machine.wait_for_file("/dev/stratis/testpool/testfs1") machine.succeed("mount /dev/stratis/testpool/testfs1 /mnt/testfs1") machine.succeed("echo test0 > /mnt/testfs1/test0") machine.succeed("echo test1 > /mnt/testfs1/test1") machine.succeed("stratis filesystem snapshot testpool testfs1 testfs2") machine.succeed("echo test2 > /mnt/testfs1/test1") + machine.wait_for_file("/dev/stratis/testpool/testfs2") machine.succeed("mount /dev/stratis/testpool/testfs2 /mnt/testfs2") assert "test0" in machine.succeed("cat /mnt/testfs1/test0") assert "test0" in machine.succeed("cat /mnt/testfs2/test0") -- cgit 1.4.1