From: Andrew Jones Subject: [PATCH kvm-unit-tests] arch-run: fix terminal issues without stty Date: Wed, 11 Jan 2017 15:19:04 +0100 Message-ID: <20170111141904.4797-1-drjones@redhat.com> Cc: rkrcmar@redhat.com, pbonzini@redhat.com To: kvm@vger.kernel.org Return-path: Received: from mx1.redhat.com ([209.132.183.28]:37170 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751398AbdAKOTH (ORCPT ); Wed, 11 Jan 2017 09:19:07 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (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 1D6CB61B90 for ; Wed, 11 Jan 2017 14:19:08 +0000 (UTC) Sender: kvm-owner@vger.kernel.org List-ID: This patch reverts the stty parts of 8727c886 "runtime: better handling of QEMU aborts", as we can more robustly fix the same issue by simply redirecting /dev/null into qemu's stdin. The obvious side effect of this is that serial input will no longer be wired up to the tty (or any other input file descriptor), but unit tests do not, and should not, be reading from the serial port anyway. Signed-off-by: Andrew Jones --- scripts/arch-run.bash | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/scripts/arch-run.bash b/scripts/arch-run.bash index 92fac8cf5f96..1610f3b2e6a6 100644 --- a/scripts/arch-run.bash +++ b/scripts/arch-run.bash @@ -26,15 +26,13 @@ ############################################################################## run_qemu () { - local stdout errors ret sig tty + local stdout errors ret sig # stdout to {stdout}, stderr to $errors and stderr - tty=$(stty -g) exec {stdout}>&1 - errors=$("${@}" 2> >(tee /dev/stderr) > /dev/fd/$stdout) + errors=$("${@}" >(tee /dev/stderr) > /dev/fd/$stdout) ret=$? exec {stdout}>&- - stty "$tty" [ $ret -eq 134 ] && echo "QEMU Aborted" >&2 -- 2.9.3