qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PULL v4 00/35] Misc patches for 2018-12-21
Date: Sat, 22 Dec 2018 09:41:19 +0100	[thread overview]
Message-ID: <42d8a1b8-6c33-8e22-b5d9-35f42f6b928e@redhat.com> (raw)
In-Reply-To: <CAFEAcA9FwFg9zsg3xLhOs9C=XJHjAo+ACd1=g22YtPaax6N0YQ@mail.gmail.com>

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

  reply	other threads:[~2018-12-22  8:41 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-21 12:36 [Qemu-devel] [PULL v4 00/35] Misc patches for 2018-12-21 Paolo Bonzini
2018-12-21 12:36 ` [Qemu-devel] [PULL 22/35] test: execute g_test_run when tests are skipped Paolo Bonzini
2018-12-21 12:36 ` [Qemu-devel] [PULL 23/35] test: replace gtester with a TAP driver Paolo Bonzini
2018-12-21 21:09 ` [Qemu-devel] [PULL v4 00/35] Misc patches for 2018-12-21 Peter Maydell
2018-12-22  8:41   ` Paolo Bonzini [this message]
2018-12-22 11:26     ` Peter Maydell
2019-01-03 18:37     ` Peter Maydell
2019-01-04  7:59       ` Paolo Bonzini
2019-01-04 10:06         ` Peter Maydell
2019-01-04 11:01           ` Paolo Bonzini
2019-01-04 11:31             ` Peter Maydell
2019-01-04 12:59               ` Paolo Bonzini
2019-01-04 13:03         ` Peter Maydell
2019-01-04 13:34           ` Paolo Bonzini
2019-01-04 13:45           ` Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=42d8a1b8-6c33-8e22-b5d9-35f42f6b928e@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).