Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
L
libapp-termcast-perl
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Debian Perl Group
modules
packages
libapp-termcast-perl
Commits
fa76f04c
Commit
fa76f04c
authored
8 years ago
by
Niko Tyni
Browse files
Options
Downloads
Patches
Plain Diff
Patch t/read-write.t to work around a race condition
Closes: #848408
parent
00854e75
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
debian/patches/0001-Work-around-a-race-condition-in-t-read-write.t.patch
+34
-0
34 additions, 0 deletions
...0001-Work-around-a-race-condition-in-t-read-write.t.patch
debian/patches/series
+1
-0
1 addition, 0 deletions
debian/patches/series
with
35 additions
and
0 deletions
debian/patches/0001-Work-around-a-race-condition-in-t-read-write.t.patch
0 → 100644
+
34
−
0
View file @
fa76f04c
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
This diff is collapsed.
Click to expand it.
debian/patches/series
0 → 100644
+
1
−
0
View file @
fa76f04c
0001-Work-around-a-race-condition-in-t-read-write.t.patch
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment