From patchwork Wed Nov 2 20:50:29 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?UmFkaW0gS3LEjW3DocWZ?= X-Patchwork-Id: 9409831 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5E954601C2 for ; Wed, 2 Nov 2016 20:50:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4F81C2A5B0 for ; Wed, 2 Nov 2016 20:50:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4383B2A5B2; Wed, 2 Nov 2016 20:50:53 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D58512A5B0 for ; Wed, 2 Nov 2016 20:50:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756576AbcKBUuu (ORCPT ); Wed, 2 Nov 2016 16:50:50 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37006 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756290AbcKBUut (ORCPT ); Wed, 2 Nov 2016 16:50:49 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 478DAC062CEA for ; Wed, 2 Nov 2016 20:50:49 +0000 (UTC) Received: from potion (dhcp-1-247.brq.redhat.com [10.34.1.247]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id uA2KolOq026369; Wed, 2 Nov 2016 16:50:47 -0400 Received: by potion (sSMTP sendmail emulation); Wed, 02 Nov 2016 21:50:46 +0100 From: =?UTF-8?q?Radim=20Kr=C4=8Dm=C3=A1=C5=99?= To: kvm@vger.kernel.org Cc: Paolo Bonzini , Andrew Jones Subject: [kvm-unit-tests PATCH] scripts/arch-run: print stderr immediately Date: Wed, 2 Nov 2016 21:50:29 +0100 Message-Id: <20161102205029.880-1-rkrcmar@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Wed, 02 Nov 2016 20:50:49 +0000 (UTC) Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Not doing so hid stderr output when the test was stuck and subsequently killed with ^C. Signed-off-by: Radim Krčmář Reviewed-by: Andrew Jones --- scripts/arch-run.bash | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/arch-run.bash b/scripts/arch-run.bash index 8e75c6ed6e17..326f59484e2b 100644 --- a/scripts/arch-run.bash +++ b/scripts/arch-run.bash @@ -30,12 +30,11 @@ run_qemu () # stdout to {stdout}, stderr to $errors exec {stdout}>&1 - errors=$("${@}" 2>&1 1>&${stdout}) + errors=$("${@}" 2> >(tee >(cat) >&2) 1>&${stdout}) ret=$? exec {stdout}>&- if [ "$errors" ]; then - printf "%s\n" "$errors" >&2 sig=$(grep 'terminating on signal' <<<"$errors") if [ "$sig" ]; then sig=$(sed 's/.*terminating on signal \([0-9][0-9]*\).*/\1/' <<<"$sig")