[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PULL v4 00/35] Misc patches for 2018-12-21
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PULL v4 00/35] Misc patches for 2018-12-21 |
Date: |
Sat, 22 Dec 2018 09:41:19 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.1 |
On 21/12/18 22:09, Peter Maydell wrote:
> I don't really understand what's going on here, or why
> it only happens with this one system (my main x86-64
> Linux Ubuntu 16.04.5 box) and not the various others I'm
> running test builds on. But it does seem to be 100%
> reliable with any of these pullreqs with the new test
> driver in them :-(
I'm afraid something in your setup is causing make's stdout to have
O_NONBLOCK set. Make doesn't use O_NONBLOCK at all, so it must be
something above it. I also checked Perl with strace and, at least here,
it doesn't set O_NONBLOCK.
So here are some ideas... First, can you try applying something like
this to reproduce?
--- a/Makefile
+++ b/Makefile
@@ -17,9 +17,13 @@ print-%:
# All following code might depend on configuration variables
ifneq ($(wildcard config-host.mak),)
# Put the all: rule here so that config-host.mak can contain dependencies.
-all:
+all: lotsofoutput
include config-host.mak
+.PHONY: lotsofoutput
+lotsofoutput:
+ yes 1234567890 | head -n 10000
+
git-submodule-update:
.PHONY: git-submodule-update
And please try applying this, which is a bit of a shot in the dark but
1) it is a good idea anyway; 2) it may help, if not alone, together with
the workarounds below:
diff --git a/scripts/tap-driver.pl b/scripts/tap-driver.pl
index 5e59b5db49..6621a5cd67 100755
--- a/scripts/tap-driver.pl
+++ b/scripts/tap-driver.pl
@@ -313,6 +313,7 @@ sub main ()
my $iterator = TAP::Parser::Iterator::Stream->new(\*STDIN);
my $parser = TAP::Parser->new ({iterator => $iterator });
+ STDOUT->autoflush(1);
while (defined (my $cur = $parser->next))
{
# Parsing of TAP input should stop after a "Bail out!" directive.
diff --git a/scripts/tap-merge.pl b/scripts/tap-merge.pl
index 59e3fa5007..10ccf57bb2 100755
--- a/scripts/tap-merge.pl
+++ b/scripts/tap-merge.pl
@@ -53,6 +53,7 @@ sub main ()
my $testno = 0; # Number of test results seen so far.
my $bailed_out = 0; # Whether a "Bail out!" directive has been seen.
+ STDOUT->autoflush(1);
while (defined (my $cur = $parser->next))
{
if ($cur->is_bailout)
Possible workarounds include:
- using "make -Oline" or "make -Onone" (for -Oline, it may require the
above autoflush patch).
- running this Python script before invoking make
import os
from fcntl import *
fcntl(1, F_SETFL, fcntl(1, F_GETFL) & ~os.O_NONBLOCK)
Paolo