From 3f70c90d7a732a37fa5bde009bf013e2e83a9bf7 Mon Sep 17 00:00:00 2001 From: Scott Worley Date: Sat, 22 Jan 2022 18:18:08 -0800 Subject: [PATCH] nixos/tests/installer: Fix race in bcache test It looks like "make-bcache" also registers the devices, so the separate registration afterwords is unnecessary. Previously, the separate registration right afterwords didn't cause a problem, presumably because it won the race with make-bcache's registration. After 1640359f333d8af40bf1f3e7961943ea04c6d1a1 slightly changed the timing of command execution in tests, the separate registration often fails with the error message "device already registered", stopping the test. --- nixos/tests/installer.nix | 2 -- 1 file changed, 2 deletions(-) diff --git a/nixos/tests/installer.nix b/nixos/tests/installer.nix index cf00bcafe4f1..7c7eb004e550 100644 --- a/nixos/tests/installer.nix +++ b/nixos/tests/installer.nix @@ -671,8 +671,6 @@ in { "modprobe bcache", "udevadm settle", "make-bcache -B /dev/vda4 -C /dev/vda3", - "echo /dev/vda3 > /sys/fs/bcache/register", - "echo /dev/vda4 > /sys/fs/bcache/register", "udevadm settle", "mkfs.ext3 -L nixos /dev/bcache0", "mount LABEL=nixos /mnt",