From 90148d6fd12b51d842714be86739343d27c00131 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 16 Jul 2013 15:04:32 +0200 Subject: [PATCH] Work around "Input/output error" opening /dev/ttyS0 E.g. http://hydra.nixos.org/build/5541847 This is a random occurence, maybe due to a race with something else. So just retry until it works. --- modules/testing/test-instrumentation.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/testing/test-instrumentation.nix b/modules/testing/test-instrumentation.nix index 9c36ac2bbdd..28494e1c7b2 100644 --- a/modules/testing/test-instrumentation.nix +++ b/modules/testing/test-instrumentation.nix @@ -22,7 +22,8 @@ let kernel = config.boot.kernelPackages.kernel; in export DISPLAY=:0.0 source /etc/profile cd /tmp - exec < /dev/hvc0 > /dev/hvc0 2> /dev/ttyS0 + exec < /dev/hvc0 > /dev/hvc0 + while ! exec 2> /dev/ttyS0; do sleep 0.1; done echo "connecting to host..." >&2 stty -F /dev/hvc0 raw -echo # prevent nl -> cr/nl conversion echo