From mboxrd@z Thu Jan 1 00:00:00 1970 From: Radim =?utf-8?B?S3LEjW3DocWZ?= Subject: Re: [PATCH] scripts/runtime: Adjust the premature_failure check Date: Tue, 31 May 2016 17:37:47 +0200 Message-ID: <20160531153747.GB30930@potion> References: <1464692057-19348-1-git-send-email-ldoktor@redhat.com> <1464692057-19348-2-git-send-email-ldoktor@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: kvm@vger.kernel.org, drjones@redhat.com, pbonzini@redhat.com, lvivier@redhat.com To: =?utf-8?B?THVrw6HFoQ==?= Doktor Return-path: Received: from mx1.redhat.com ([209.132.183.28]:45344 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755040AbcEaPhw (ORCPT ); Tue, 31 May 2016 11:37:52 -0400 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (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 1D3E97DCEA for ; Tue, 31 May 2016 15:37:51 +0000 (UTC) Content-Disposition: inline In-Reply-To: <1464692057-19348-2-git-send-email-ldoktor@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: 2016-05-31 12:54+0200, Luk=C3=A1=C5=A1 Doktor: > The premature_failure check fails on qemu-system-ppc64 as it uses > different message. This patch modifies the condition so it works > (hopefully) for all archs. >=20 > Signed-off-by: Luk=C3=A1=C5=A1 Doktor > --- > scripts/runtime.bash | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/scripts/runtime.bash b/scripts/runtime.bash > index 6c4c800..886814b 100644 > --- a/scripts/runtime.bash > +++ b/scripts/runtime.bash > @@ -17,7 +17,7 @@ premature_failure() > local log=3D"$(eval $(get_cmdline _NO_FILE_4Uhere_) 2>&1)" > local last_line=3D$(tail -1 <<< "$log") > =20 > - echo "$last_line" | grep -qi "could not load kernel" && > + echo "$last_line" | grep "_NO_FILE_4Uhere_" | grep -qi "no such = file" && PPC uses "Could not open '_NO_FILE_4Uhere_': No such file [...]". The problem is that "No such file [...]" might be localized, so what about grep -qi "could not \(load kernel\|open\) '_NO_FILE_4Uhere_'" ? (A nicer, yet more complicated option would be to query the localized string that stands for "No such file or directory" with file, stat, or a dedicated utility for localized error messages.)