diff --git a/debian/patches/0001-Work-around-a-race-condition-in-t-read-write.t.patch b/debian/patches/0001-Work-around-a-race-condition-in-t-read-write.t.patch new file mode 100644 index 0000000000000000000000000000000000000000..d8dfe835973972d72149986fc73270c399bab227 --- /dev/null +++ b/debian/patches/0001-Work-around-a-race-condition-in-t-read-write.t.patch @@ -0,0 +1,34 @@ +From 4be700470b199608dc67fdde506e14543270a8eb Mon Sep 17 00:00:00 2001 +From: Niko Tyni <ntyni@debian.org> +Date: Wed, 28 Dec 2016 11:53:15 +0200 +Subject: [PATCH] Work around a race condition in t/read-write.t + +If the script exits before IO::Pty::Easy has read its output, the final +newline gets lost. This seems to mostly happen on single-CPU hosts. + +Just sleeping long enough (at least 2.5 or so seconds) would make +IO::Pty::Easy kill the child when $pty goes out of scope, but waiting +one second before exiting should be enough. + +Bug-Debian: https://bugs.debian.org/848408 +Bug: https://github.com/doy/app-termcast/issues/3 +--- + t/read-write.t | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/t/read-write.t b/t/read-write.t +index fe945dc..7b70271 100644 +--- a/t/read-write.t ++++ b/t/read-write.t +@@ -35,7 +35,7 @@ test_tcp( + user => 'test', + password => 'tset', + ); +- \$tc->run(\$^X, '-ple', q[last if /^\$/]); ++ \$tc->run(\$^X, '-ple', q[sleep 1,last if /^\$/]); + EOF + my $pty = IO::Pty::Easy->new; + $pty->spawn($^X, (map {; '-I', $_ } @INC), '-e', $client_script); +-- +2.11.0 + diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000000000000000000000000000000000000..9a7f31bcfcd7c50525e9d08dd140abd5a01df128 --- /dev/null +++ b/debian/patches/series @@ -0,0 +1 @@ +0001-Work-around-a-race-condition-in-t-read-write.t.patch