From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?q?Radim=20Kr=C4=8Dm=C3=A1=C5=99?= 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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Paolo Bonzini , Andrew Jones To: kvm@vger.kernel.org Return-path: 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) Sender: kvm-owner@vger.kernel.org List-ID: Not doing so hid stderr output when the test was stuck and subsequently killed with ^C. Signed-off-by: Radim Krčmář --- 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") -- 2.10.1