From patchwork Sat Jun 6 19:18:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukas Straub X-Patchwork-Id: 11591341 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B08E1913 for ; Sat, 6 Jun 2020 19:27:22 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8771D2067B for ; Sat, 6 Jun 2020 19:27:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=web.de header.i=@web.de header.b="cckZBGoj" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8771D2067B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=web.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:49030 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jheTR-0003J7-M5 for patchwork-qemu-devel@patchwork.kernel.org; Sat, 06 Jun 2020 15:27:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40786) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jheL0-0004XM-3k for qemu-devel@nongnu.org; Sat, 06 Jun 2020 15:18:38 -0400 Received: from mout.web.de ([212.227.15.4]:40259) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jheKz-0005cA-6p for qemu-devel@nongnu.org; Sat, 06 Jun 2020 15:18:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=dbaedf251592; t=1591471084; bh=0U39OAVSTpeXgh0fl/DAwVKSc2A6a00gaGnzuby3zQE=; h=X-UI-Sender-Class:Date:From:To:Cc:Subject:In-Reply-To:References; b=cckZBGoj/TPhylmdUTHMIv8L5vVjtoaH+1hTXiSiPmD3hrtO4qi4GqU1kT2iU1gRi mLcJix7+YFnQjfzeH1BvEuBN+VAQFRaFF71ICpDPE6JDS+qGB0jmftSqld6BMHCmdK MhzMjUJ2uqnQe2diQ2JhgDMyrqdaYM8n4fNR1SQQ= X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9 Received: from luklap ([87.123.206.73]) by smtp.web.de (mrweb002 [213.165.67.108]) with ESMTPSA (Nemesis) id 0M8zdd-1jp2Ar1TRt-00CUIX; Sat, 06 Jun 2020 21:18:04 +0200 Date: Sat, 6 Jun 2020 21:18:01 +0200 From: Lukas Straub To: qemu-devel Subject: [PATCH v2 3/7] boot_linux.py: Use pick_qemu_util Message-ID: In-Reply-To: References: MIME-Version: 1.0 X-Provags-ID: V03:K1:Hcx8Dy03YirD70VwsHUFc/BZGxy7gkqrfgT7gcNvaQxkckUt4sn kUevlGqfz0f26Um3nUQ82u2ogH9YSC7YsRYSUFehBosjlVIsQo+Wy/GCg2oCh3aAXS04cBv 9vkecVhvy++wbNUiFZInBw1c71K60Sn3PLFGXp3Bu4OTBFKDhY4Vpn5n2Klf8v3NUbBD5FV ZLsys/GEknHcFBMIUjpPg== X-UI-Out-Filterresults: notjunk:1;V03:K0:esxYdt/sE2A=:Tip+3Rhj6Uw7a7OvTSEy50 uQ4SxEXYT6jhB0+yLpIWeDbv4w5E4gWmEDDmPfhncq4UUCh4gAemevbYi8fGSeftAMnOH1mqN rMAmvVu8sL8P2Y8TNK8L3xxC8bWaAaYWPkvQoXUupLs1g3AZHjJ7iQXOUou81TGg20kSXhqtl RygF5pzKRj+uT/KIwqA9lJKzbsAA9RG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received-SPF: pass client-ip=212.227.15.4; envelope-from=lukasstraub2@web.de; helo=mout.web.de X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/06 15:18:36 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Alberto Garcia , "Dr. David Alan Gilbert" , Wainer dos Santos Moschetta , Max Reitz , Zhang Chen , Cleber Rosa , Philippe =?utf-8?q?Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" Replace duplicate code with pick_qemu_util. Signed-off-by: Lukas Straub --- tests/acceptance/boot_linux.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) -- 2.20.1 diff --git a/tests/acceptance/boot_linux.py b/tests/acceptance/boot_linux.py index 075a386300..6b99112cad 100644 --- a/tests/acceptance/boot_linux.py +++ b/tests/acceptance/boot_linux.py @@ -44,15 +44,8 @@ class BootLinux(Test): def prepare_boot(self): self.log.debug('Looking for and selecting a qemu-img binary to be ' 'used to create the bootable snapshot image') - # If qemu-img has been built, use it, otherwise the system wide one - # will be used. If none is available, the test will cancel. - qemu_img = os.path.join(BUILD_DIR, 'qemu-img') - if not os.path.exists(qemu_img): - qemu_img = find_command('qemu-img', False) - if qemu_img is False: - self.cancel('Could not find "qemu-img", which is required to ' - 'create the bootable image') - vmimage.QEMU_IMG = qemu_img + + vmimage.QEMU_IMG = self.pick_qemu_util("qemu-img") self.log.info('Downloading/preparing boot image') # Fedora 31 only provides ppc64le images