From patchwork Fri Jan 25 14:00:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 1031101 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="MTia070E"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43mLPP04nZz9s55 for ; Sat, 26 Jan 2019 01:04:41 +1100 (AEDT) Received: from localhost ([127.0.0.1]:45178 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gn262-00065B-Uf for incoming@patchwork.ozlabs.org; Fri, 25 Jan 2019 09:04:39 -0500 Received: from eggs.gnu.org ([209.51.188.92]:52122) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gn224-0003VR-Bb for qemu-devel@nongnu.org; Fri, 25 Jan 2019 09:00:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gn221-0000gH-RU for qemu-devel@nongnu.org; Fri, 25 Jan 2019 09:00:32 -0500 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]:33804) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gn21x-0000Wk-PO for qemu-devel@nongnu.org; Fri, 25 Jan 2019 09:00:26 -0500 Received: by mail-wm1-x32b.google.com with SMTP id y185so4875289wmd.1 for ; Fri, 25 Jan 2019 06:00:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=bxUP0EmjWdNe/Z6c4ssZEYQGbQgi4dh3F0CcYdKrEys=; b=MTia070ErakRFhvDKWf/2q6EJS6chcSzGc9d83k8wlN4PKzJs1syqWL50upvgrp0rb aMxcra8PN1pLjMk4dnLKcWZuGZR4S5k0nmsqgdvFh98JcvLydjYdPO0PyDcKy0YEULB1 WpnQL1tEmEzHUEDw4ZpwJePgTBXLzosg7ZTV0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=bxUP0EmjWdNe/Z6c4ssZEYQGbQgi4dh3F0CcYdKrEys=; b=hwDVzLqymu3hoEuePHisLAyrgRkAknkNOB+z9BtxmcWtDVwqsXW6o0vxrVog00+x3U K/HTVT6tIWpqpm1vgIr4PnatARqi3gopkMWELMa1zdWqJJG8PHhstgR0OITMlAU6pAwJ GQZZleNqxB4K4oUsWLg8hzsihU7mWFMqxwBwWBxYrIwjYH6FG1S5sG/9miFrxCtqxaCK VWTCfU2w0fWJlnxcj2TiFec+nnkYVP27rCyDsYELQkDNfIv9xaZQgsIN+Phlt5MKubKh e8Eb5RDLrDfQvxZIz0eO1mBAPcMKROaaglDzzrJlLdw3FGcN1uBcwdFhBQSBW3yY4SeO fqbg== X-Gm-Message-State: AJcUukeDSOqA0hG64uKyeXpMIb067D02mHFNwi6BNT9oldQ01JFvtNlp Vet0ZWFjkoPKC9beuiOpgYHCgw== X-Google-Smtp-Source: ALg8bN42Jw3uWLV4hYNDqUprBWAJ/u7Wz1NzajSbI50lD4Zl5BiBXgEnrETTQ2RNFkHodXMnlo0MKg== X-Received: by 2002:a1c:4681:: with SMTP id t123mr6937041wma.24.1548424818823; Fri, 25 Jan 2019 06:00:18 -0800 (PST) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id j8sm77200766wrt.40.2019.01.25.06.00.17 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 25 Jan 2019 06:00:17 -0800 (PST) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id A66D03E050B; Fri, 25 Jan 2019 14:00:17 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Fri, 25 Jan 2019 14:00:04 +0000 Message-Id: <20190125140017.6092-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190125140017.6092-1-alex.bennee@linaro.org> References: <20190125140017.6092-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::32b Subject: [Qemu-devel] [PATCH v1 01/14] .cirrus.yml: basic compile and test for FreeBSD X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Ed Maste , Li-Wen Hsu Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Ed Maste Signed-off-by: Ed Maste Signed-off-by: Alex Bennée --- .cirrus.yml | 16 ++++++++++++++++ MAINTAINERS | 8 ++++++++ 2 files changed, 24 insertions(+) create mode 100644 .cirrus.yml diff --git a/.cirrus.yml b/.cirrus.yml new file mode 100644 index 0000000000..303fe720d6 --- /dev/null +++ b/.cirrus.yml @@ -0,0 +1,16 @@ +freebsd_12_task: + freebsd_instance: + image: freebsd-12-0-release-amd64 + cpu: 8 + memory: 8G + env: + CIRRUS_CLONE_DEPTH: 1 + install_script: pkg install -y + bison curl cyrus-sasl git glib gmake gnutls + nettle perl5 pixman pkgconf png usbredir + script: + - mkdir build + - cd build + - ../configure || { cat config.log; exit 1; } + - gmake -j8 + - gmake -j8 V=1 check diff --git a/MAINTAINERS b/MAINTAINERS index fd3d4de3fa..2ddfb86bb2 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2483,6 +2483,14 @@ W: https://travis-ci.org/qemu/qemu W: https://app.shippable.com/github/qemu/qemu W: http://patchew.org/QEMU/ +FreeBSD Hosted Continuous Integration +M: Ed Maste +M: Li-Wen Hsu +L: qemu-devel@nongnu.org +S: Maintained +F: .cirrus.yml +W: https://cirrus-ci.com/github/qemu/qemu + Guest Test Compilation Support M: Alex Bennée R: Philippe Mathieu-Daudé From patchwork Fri Jan 25 14:00:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 1031095 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="LD1gUttS"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43mLKc6kcyz9s55 for ; Sat, 26 Jan 2019 01:01:24 +1100 (AEDT) Received: from localhost ([127.0.0.1]:45151 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gn22s-0003Xu-Sx for incoming@patchwork.ozlabs.org; Fri, 25 Jan 2019 09:01:22 -0500 Received: from eggs.gnu.org ([209.51.188.92]:52109) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gn224-0003VM-5j for qemu-devel@nongnu.org; Fri, 25 Jan 2019 09:00:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gn221-0000fz-QU for qemu-devel@nongnu.org; Fri, 25 Jan 2019 09:00:31 -0500 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]:45619) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gn21x-0000Xs-O0 for qemu-devel@nongnu.org; Fri, 25 Jan 2019 09:00:25 -0500 Received: by mail-wr1-x429.google.com with SMTP id t6so10367604wrr.12 for ; Fri, 25 Jan 2019 06:00:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=g7PhpgkcT440EVhWvZcdJfbDkDsvOhbiKNrj20tGnjc=; b=LD1gUttSc/gKiPOj2bH/LfxPvyu0FEBEYp+gD4KHo2ufAft/tMs90lMwTzUTS0bPx+ 5iiWqVhjBSeUf+dEBgKH0tKxy5R0DQsb0ZC0yG8H05QFrd1XZN4KKiaMCiirTg2rprbG bRzyCb7Xq9wUDx9PldWLzKzNVMhEyQ4NPbTCQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=g7PhpgkcT440EVhWvZcdJfbDkDsvOhbiKNrj20tGnjc=; b=Jva/SNvXqsfH2nLnvaOuamD8buWihcFfvoGa4v0RVZxdfFptVkaKE0fy9jnUdofrci BvTF/cOB6f357nF69Icu4SIASywc4DEdQ/1KpVois1Q008E0eWvwHw7Xyb6UaBLw0t9W 3HoS1rYe1i1PREyGv9iUHIRse6oh+9ulWt7vBx1PyzcN+zhbHew6umCPeGXQkFO+ip0C oFxu2AsAvlS8kPZn/UeuG1uyMj5VA90pC8rbKNBSKv94goUcapprAiN7iq+q62kHFugk M2sm+1KE+PjEE4Xvy3h8K39zqugcRijC550mBamaQ7Dq2+a3vTfmsecbzRK7mrl4iV74 27eA== X-Gm-Message-State: AJcUukeXh3+6Y+m9IP8XC1z2kLmdNQTLlRA5Oztr/SBHFfS6KWL/Twt4 OoAXmMUw2A4klWsKpK7VV6uGfA== X-Google-Smtp-Source: ALg8bN5VEg/VZXhTJm4zf5ilZg7kDmNGApuwMsbkEKu9Q6IFmlLThYXCjD6t7gexVne68rua/B+95Q== X-Received: by 2002:adf:e7d0:: with SMTP id e16mr12172767wrn.142.1548424821471; Fri, 25 Jan 2019 06:00:21 -0800 (PST) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id e27sm127471046wra.67.2019.01.25.06.00.18 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 25 Jan 2019 06:00:19 -0800 (PST) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id CF19F3E05C0; Fri, 25 Jan 2019 14:00:17 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Fri, 25 Jan 2019 14:00:06 +0000 Message-Id: <20190125140017.6092-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190125140017.6092-1-alex.bennee@linaro.org> References: <20190125140017.6092-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::429 Subject: [Qemu-devel] [PATCH v1 03/14] MAINTAINERS: Add an entry for scripts/archive-source.sh X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daudé The scripts/archive-source.sh is used by the VM tests, it makes sense to add it in the "Build and test automation" section. Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 2ddfb86bb2..f2f9a7b0c7 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2479,6 +2479,7 @@ F: scripts/travis/ F: .shippable.yml F: tests/docker/ F: tests/vm/ +F: scripts/archive-source.sh W: https://travis-ci.org/qemu/qemu W: https://app.shippable.com/github/qemu/qemu W: http://patchew.org/QEMU/ From patchwork Fri Jan 25 14:00:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 1031110 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="WE/ExaW3"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43mLbH0TD6z9s55 for ; Sat, 26 Jan 2019 01:13:15 +1100 (AEDT) Received: from localhost ([127.0.0.1]:45347 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gn2EK-00057J-Tv for incoming@patchwork.ozlabs.org; Fri, 25 Jan 2019 09:13:12 -0500 Received: from eggs.gnu.org ([209.51.188.92]:52195) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gn22A-0003c5-6p for qemu-devel@nongnu.org; Fri, 25 Jan 2019 09:00:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gn221-0000gc-VI for qemu-devel@nongnu.org; Fri, 25 Jan 2019 09:00:37 -0500 Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]:51953) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gn21x-0000Xy-U9 for qemu-devel@nongnu.org; Fri, 25 Jan 2019 09:00:29 -0500 Received: by mail-wm1-x343.google.com with SMTP id b11so6892049wmj.1 for ; Fri, 25 Jan 2019 06:00:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=E3PWT3vazvIE+W4glo9Q8IW64T+hdRvwUIylMnxBvdk=; b=WE/ExaW36AVRsx30/1FG04DV8ip8URjLGfd37ZL68r1E5TgawwCgnDSMO+uueSQf/B 1ABFxPWWcX8OorgKAMVSzHiZGO/Kg617KeVYFeuHWzl+UX7MJGh7YGquAHN2A1WmD2LG nb4VhccjPhaBUsaGLnRyFI1dnrwE9yod/8AK8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=E3PWT3vazvIE+W4glo9Q8IW64T+hdRvwUIylMnxBvdk=; b=F35AiXm7oDCDVFSZjVRtXXeBpz/S/BhaiNlfQm3Mo5bAgjkFu0z4CNkIJKg5p12Pt4 VUd0VKCMhqbJjkf5P8qt2iNKKfcDSi0HP3lDoKoo/9zooaKvQofB2CN9eUWMdoTF/dGJ xkT9YLclEoRaPI8/m43DEq5Ln7HxnIbH2sJ+Ot55cFS7n4Z/U5Io8DZh41CzL9cPbkT2 OaaD8458uyCm/OHq8iGBtAkgfdRcWJje7RtsQvxjN4DQUwabm6KDd/WKhcsePFoH5wmS iXXuwutqmN6fwvRKwB/PR9NplerOynzRCy9tqtKlBgGAfMs9z4FDL5ceiOWCHQT2xDQS i5ZQ== X-Gm-Message-State: AJcUukeF84a6RCKk15jzPAN/FK67Q3rbi5m+dRit8am2jFYRSl8hw/Iz BsIZbpxNGZHijg9TSVs3d8Z7FMuaUy0= X-Google-Smtp-Source: ALg8bN4j3zD49mtLpe0UGzK4XhUR7EfecG8KWrLG+eJ6Osl7HlP8NRT/wXxwX8w7UX5PrRwQKymp3g== X-Received: by 2002:a1c:6e01:: with SMTP id j1mr6863621wmc.103.1548424822027; Fri, 25 Jan 2019 06:00:22 -0800 (PST) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id n15sm83461888wrt.21.2019.01.25.06.00.18 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 25 Jan 2019 06:00:19 -0800 (PST) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id E27303E0625; Fri, 25 Jan 2019 14:00:17 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Fri, 25 Jan 2019 14:00:07 +0000 Message-Id: <20190125140017.6092-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190125140017.6092-1-alex.bennee@linaro.org> References: <20190125140017.6092-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::343 Subject: [Qemu-devel] [PATCH v1 04/14] archive-source.sh: Clone the submodules locally X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daudé We cloned the QEMU repository from the local storage. Since the submodules are also available there, clone them too. This is quicker and reduce network use. Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée --- scripts/archive-source.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/scripts/archive-source.sh b/scripts/archive-source.sh index 6eed2a29bd..ce31be67b0 100755 --- a/scripts/archive-source.sh +++ b/scripts/archive-source.sh @@ -38,6 +38,10 @@ else fi git clone --shared . "$vroot_dir" test $? -ne 0 && error "failed to clone into '$vroot_dir'" +for sm in $submodules; do + git clone --shared "$sm" "$vroot_dir/$sm" + test $? -ne 0 && error "failed to clone submodule $sm" +done cd "$vroot_dir" test $? -ne 0 && error "failed to change into '$vroot_dir'" @@ -45,11 +49,6 @@ test $? -ne 0 && error "failed to change into '$vroot_dir'" git checkout $HEAD test $? -ne 0 && error "failed to checkout $HEAD revision" -for sm in $submodules; do - git submodule update --init $sm - test $? -ne 0 && error "failed to init submodule $sm" -done - if test -n "$submodules"; then { git ls-files || error "git ls-files failed" From patchwork Fri Jan 25 14:00:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 1031104 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="gDrSKIYE"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43mLSx4Zxyz9s7h for ; Sat, 26 Jan 2019 01:07:45 +1100 (AEDT) Received: from localhost ([127.0.0.1]:45235 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gn291-0000Hx-Gx for incoming@patchwork.ozlabs.org; Fri, 25 Jan 2019 09:07:43 -0500 Received: from eggs.gnu.org ([209.51.188.92]:52110) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gn224-0003VN-5h for qemu-devel@nongnu.org; Fri, 25 Jan 2019 09:00:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gn221-0000gM-Rk for qemu-devel@nongnu.org; Fri, 25 Jan 2019 09:00:31 -0500 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]:44003) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gn21x-0000bZ-Pe for qemu-devel@nongnu.org; Fri, 25 Jan 2019 09:00:26 -0500 Received: by mail-wr1-x444.google.com with SMTP id r10so10385072wrs.10 for ; Fri, 25 Jan 2019 06:00:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=/7IY9oB9LXJNCD05eCO3xfXmxlWfjDn63spdbsPLoIg=; b=gDrSKIYEh6MeLt4JjK3a924YPD9TTv6dyhp6IvUBq3D3Jssy7S9mlYX4Vd1SxLqayz MBpSTRb8FVQ7/1/sh6m8935uyBdmhngNjmlBVLVCd+oRPRHiyPpWIjDlHSKQm/OvC8tb gof5rxP0Pv2wN10dVzvseAxxDkmzGC5D6risg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=/7IY9oB9LXJNCD05eCO3xfXmxlWfjDn63spdbsPLoIg=; b=ePqKT4ymiu006Ed+/B+o+u38SDU1hQWOJqvQqe36RzSlzZfkUezDuYEHh7uuSoWqQ3 F+VeGA2ibEUfQxD4QczhU+YfzZUqNadfMSPY/TxH45+1InxlDyAKOFwnZqLDPfNhUYQw zNENLYDr/725VncRYSgI4tkzMaMzLH7WR86b3CWctciRFt2mZpdnhYpPenwPfTF6zrjb 68T5F/dbFmMpXPb/AXTGV80jyzjLr4fsvt+od7gtDnYWFzCxLoQeNJUixiHVdoV25oF0 MYqZTitAwPihOyf6VPHlOAIIdilXDMs5VyaRAhqaHZAvcsi3y2AJzd2MTp3YQ0i7TtKJ oRgA== X-Gm-Message-State: AJcUukf9y3iM4uxnQfcaNWQyo0a7Qnt9edA93ERYA2v72X7vl7TERwcT hq0CLLm2rh+jxBAfUBXFMkaZpA== X-Google-Smtp-Source: ALg8bN5NOYxhx+oB1jsXQqKSBDy1UxEMtmQ+ZmKN7b6CXSFEXeFqlZEYxvAoa9/wdq57efLYEANmPg== X-Received: by 2002:adf:92a4:: with SMTP id 33mr11534959wrn.11.1548424823613; Fri, 25 Jan 2019 06:00:23 -0800 (PST) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id t70sm101265303wmd.36.2019.01.25.06.00.19 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 25 Jan 2019 06:00:19 -0800 (PST) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 03FAC3E0642; Fri, 25 Jan 2019 14:00:18 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Fri, 25 Jan 2019 14:00:08 +0000 Message-Id: <20190125140017.6092-6-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190125140017.6092-1-alex.bennee@linaro.org> References: <20190125140017.6092-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::444 Subject: [Qemu-devel] [PATCH v1 05/14] docker: disable Xen on CentOS 7 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Paolo Bonzini , =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Paolo Bonzini The Xen repository is failing to install, disable it. Signed-off-by: Paolo Bonzini Signed-off-by: Alex Bennée --- tests/docker/dockerfiles/centos7.docker | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/docker/dockerfiles/centos7.docker b/tests/docker/dockerfiles/centos7.docker index e0f18f5a41..e6fcbf4bcd 100644 --- a/tests/docker/dockerfiles/centos7.docker +++ b/tests/docker/dockerfiles/centos7.docker @@ -1,5 +1,5 @@ FROM centos:7 -RUN yum install -y epel-release centos-release-xen +RUN yum install -y epel-release RUN yum -y update ENV PACKAGES \ bison \ @@ -8,7 +8,7 @@ ENV PACKAGES \ ccache \ csnappy-devel \ flex \ - g++ \ + gcc-c++ \ gcc \ gettext \ git \ @@ -29,7 +29,6 @@ ENV PACKAGES \ spice-server-devel \ tar \ vte-devel \ - xen-devel \ zlib-devel RUN yum install -y $PACKAGES RUN rpm -q $PACKAGES | sort > /packages.txt From patchwork Fri Jan 25 14:00:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 1031102 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="B8DBtZJT"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43mLPX0kpRz9s55 for ; Sat, 26 Jan 2019 01:04:48 +1100 (AEDT) Received: from localhost ([127.0.0.1]:45184 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gn269-0006EC-W9 for incoming@patchwork.ozlabs.org; Fri, 25 Jan 2019 09:04:46 -0500 Received: from eggs.gnu.org ([209.51.188.92]:52197) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gn22A-0003c9-6u for qemu-devel@nongnu.org; Fri, 25 Jan 2019 09:00:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gn222-0000gs-4Q for qemu-devel@nongnu.org; Fri, 25 Jan 2019 09:00:37 -0500 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]:51178) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gn221-0000Zm-PM for qemu-devel@nongnu.org; Fri, 25 Jan 2019 09:00:29 -0500 Received: by mail-wm1-x333.google.com with SMTP id n190so6893197wmd.0 for ; Fri, 25 Jan 2019 06:00:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=wsBjSZZmNHXCqkh57UmQuWi2mMRlT52ALUyhq1If/0w=; b=B8DBtZJT/5oXNAH0AqU9SCuoFMDXaJ4JOnmNQciQRA0mE5rcmJT2nsg+JzFokQstFg bnirXsqV6UZSzjjF4CLq9lkOc3VMQDEMZ/lVF2eHWnH9p/JyKQOb9GKJeb2J7e9uIySu dLHgij/K7BaoTjqjMN2CQ2lq7XebA6S9D9DLk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=wsBjSZZmNHXCqkh57UmQuWi2mMRlT52ALUyhq1If/0w=; b=qji/PPp+d0TsdmAWYC6V+gjTdju1LlmrAc8rTNKqaBaItC/sTn3HgSCaKgw1MKzwNt kA3fwclN64r7lIJ5/Ug2e+vh73i8hKtCLx7u92bizOGuoyPAGady8atRiqUlW9w6AenL wcRyczQL93seuS/Ded8xgmWKWxBB4ZvunucE0MR9UJ0+2mdbFy9Jip/nOSo975H6PV5T D9haalroQhlGYMcFmRStVcS/xxTwRTTvWxM12dM2YCsP4epCkQLxlwFavoR9T3a9j2Se mGl2GylMvPRJXv56vQFWcHJOijIT/V6D3bMbVDKLsbeFfjSfk8OhWcUqiWEMSf+Gnxc/ 64nw== X-Gm-Message-State: AJcUukeOBSn49cwDKiIM2LyTnH3e2Os493gffKsmwK+XoI31ZmSG95OD fobOE+e7y2tO0pnFDNHDuFkX0Q== X-Google-Smtp-Source: ALg8bN6ITfDlXYuCsVFbDpPKDubq0kw/vfCAfkRbyxlJ4ye3qKoqS89Kr5FQmf6fdXUyCvdG/LCEFA== X-Received: by 2002:a1c:384:: with SMTP id 126mr6948241wmd.26.1548424822969; Fri, 25 Jan 2019 06:00:22 -0800 (PST) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id o64sm58552780wmo.47.2019.01.25.06.00.19 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 25 Jan 2019 06:00:19 -0800 (PST) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 1921B3E0670; Fri, 25 Jan 2019 14:00:18 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Fri, 25 Jan 2019 14:00:09 +0000 Message-Id: <20190125140017.6092-7-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190125140017.6092-1-alex.bennee@linaro.org> References: <20190125140017.6092-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::333 Subject: [Qemu-devel] [PATCH v1 06/14] tests: make docker.py update use configured binfmt path X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" When copying a QEMU binary into a linux-user docker image we should check what the current configured binfmt_misc path is rather than just assuming "/usr/bin/qemu-bin". Obviously if the user changes the configuration afterwards they will break their images again. Signed-off-by: Alex Bennée --- tests/docker/docker.py | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/tests/docker/docker.py b/tests/docker/docker.py index 02d8a83847..30f463af9f 100755 --- a/tests/docker/docker.py +++ b/tests/docker/docker.py @@ -123,17 +123,17 @@ def _check_binfmt_misc(executable): if not os.path.exists(binfmt_entry): print ("No binfmt_misc entry for %s" % (binary)) - return False + return None with open(binfmt_entry) as x: entry = x.read() - qpath = "/usr/bin/%s" % (binary) - if not re.search("interpreter %s\n" % (qpath), entry): - print ("binfmt_misc for %s does not point to %s" % (binary, qpath)) - return False - - return True + m = re.search("interpreter (\S+)\n", entry) + interp = m.group(1) + if interp and interp != executable: + print("binfmt_misc for %s does not point to %s, using %s" % + (binary, executable, interp)) + return interp def _read_qemu_dockerfile(img_name): # special case for Debian linux-user images @@ -394,9 +394,14 @@ class UpdateCommand(SubCommand): tmp = tempfile.NamedTemporaryFile(suffix="dckr.tar.gz") tmp_tar = TarFile(fileobj=tmp, mode='w') - # Add the executable to the tarball - bn = os.path.basename(args.executable) - ff = "/usr/bin/%s" % bn + # Add the executable to the tarball, using the current + # configured binfmt_misc path. + ff = _check_binfmt_misc(args.executable) + if not ff: + bn = os.path.basename(args.executable) + ff = "/usr/bin/%s" % bn + print ("No binfmt_misc configured: copied to %s" % (ff)) + tmp_tar.add(args.executable, arcname=ff) # Add any associated libraries From patchwork Fri Jan 25 14:00:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 1031099 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="Yk+CLzd2"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43mLPP6nKzz9s9h for ; Sat, 26 Jan 2019 01:04:41 +1100 (AEDT) Received: from localhost ([127.0.0.1]:45180 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gn263-00065h-S0 for incoming@patchwork.ozlabs.org; Fri, 25 Jan 2019 09:04:39 -0500 Received: from eggs.gnu.org ([209.51.188.92]:52162) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gn225-0003WQ-Du for qemu-devel@nongnu.org; Fri, 25 Jan 2019 09:00:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gn224-0000iP-07 for qemu-devel@nongnu.org; Fri, 25 Jan 2019 09:00:33 -0500 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]:33769) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gn221-0000eQ-Tj for qemu-devel@nongnu.org; Fri, 25 Jan 2019 09:00:30 -0500 Received: by mail-wm1-x333.google.com with SMTP id r24so4879093wmh.0 for ; Fri, 25 Jan 2019 06:00:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=LFFOZDq0lluE/cgAdvtQnrwEFnFbXn1gYJK5UE66RIE=; b=Yk+CLzd28oxQhF5TF0yZBpnLlD9TdBR8BHsyqgdEQweNzl/mN1P4TURPhZKIT9hgtA 8Dx0sTrTE3sWVSW1hE2wQ70b5Zvftg5o+73Tpj0jbwMAcKgyC41StgW4blO1onCbpQi9 jCrEe2eX7eK1zdmdeEQwWOYuJOcJIc0K7TTd0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=LFFOZDq0lluE/cgAdvtQnrwEFnFbXn1gYJK5UE66RIE=; b=i4Y3yXPyLqq2LZv+c1ciYhvniJ+HLYp4E++/BAby/UW2/zN5f1wmEjb4UdTZwRAQvW osWtpyMY2+OFohuaPTA06jEenTPco2/L13jhwc6bn/WI6v5wkpBfDxoRrb7JxS7BGSLG t5XJHUZ9KluiFOpEFQL/vww4Gvf/V1YCNNJuy5GRFhrYGdiRt6N3jY/Ek2N8bp6lZ4b7 VcWwzii/BVxthRsnVJ+JsW9UNtnSadRcvzEFtgjTEPsDx/vy1VZQ61vSaEbVwlaK/STQ N+G+U2xoak92Kyyz+S/44Jqcds8qG9bDJU4J2PyFEK5dYFZUzH2SQXM8oI2AD+/jRxG5 T+DQ== X-Gm-Message-State: AJcUukd3XO7bY3BDyMCoCi2LdyY8xek7zoo7oWdOO4l/LbhAG9nfS7s6 66mq6qr6u3wtboOr+K9U72gaOXDeAbc= X-Google-Smtp-Source: ALg8bN4npGCL4xrdD7Z4m4ilWswC0/SY8GkktJ1xgoYwOsLZVpHRkrW27ngVGL3+qObYhAc9T1VxoQ== X-Received: by 2002:a1c:ef11:: with SMTP id n17mr6907225wmh.112.1548424826745; Fri, 25 Jan 2019 06:00:26 -0800 (PST) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id p6sm135692875wrx.50.2019.01.25.06.00.19 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 25 Jan 2019 06:00:23 -0800 (PST) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 2DB5F3E06E0; Fri, 25 Jan 2019 14:00:18 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Fri, 25 Jan 2019 14:00:10 +0000 Message-Id: <20190125140017.6092-8-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190125140017.6092-1-alex.bennee@linaro.org> References: <20190125140017.6092-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::333 Subject: [Qemu-devel] [PATCH v1 07/14] tests: make docker.py check for persistent configs X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" binfmt_misc configured with the "F" flag opens the interpreter at config time. This means it can use an already open file-descriptor to run QEMU so there is no point trying to copy the binary into a container. Signed-off-by: Alex Bennée --- tests/docker/docker.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/docker/docker.py b/tests/docker/docker.py index 30f463af9f..768728785f 100755 --- a/tests/docker/docker.py +++ b/tests/docker/docker.py @@ -127,6 +127,11 @@ def _check_binfmt_misc(executable): with open(binfmt_entry) as x: entry = x.read() + if re.search("flags:.*F.*\n", entry): + print("binfmt_misc for %s uses persistent(F) mapping to host binary\n" % + (binary)) + return None + m = re.search("interpreter (\S+)\n", entry) interp = m.group(1) if interp and interp != executable: From patchwork Fri Jan 25 14:00:11 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 1031096 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="XFCsGOVI"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43mLKd3smZz9s9h for ; Sat, 26 Jan 2019 01:01:25 +1100 (AEDT) Received: from localhost ([127.0.0.1]:45155 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gn22t-0003Yq-7c for incoming@patchwork.ozlabs.org; Fri, 25 Jan 2019 09:01:23 -0500 Received: from eggs.gnu.org ([209.51.188.92]:52117) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gn224-0003VP-70 for qemu-devel@nongnu.org; Fri, 25 Jan 2019 09:00:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gn222-0000hM-MY for qemu-devel@nongnu.org; Fri, 25 Jan 2019 09:00:31 -0500 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]:43173) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gn221-0000e5-SF for qemu-devel@nongnu.org; Fri, 25 Jan 2019 09:00:30 -0500 Received: by mail-wr1-x435.google.com with SMTP id r10so10385210wrs.10 for ; Fri, 25 Jan 2019 06:00:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=kcHZidWMgjIgAiQ9s7xaZIRe+WZ1Zp2g7COR29S7kIU=; b=XFCsGOVISSKrTT0Px6aEMoT3hQCKccKFNg2iR93V2F8p2aYKz6tspuo+e0A86VEWum ygz+8wihVtrTgs06eSB3Y6taLLWX7dtHFsE4BlgtZR3VoACgIi0abIBvhNkwuiRP0cvl 47FFEekQHCzGOx9JnMEW/GCegSbbfr7OB0rDI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=kcHZidWMgjIgAiQ9s7xaZIRe+WZ1Zp2g7COR29S7kIU=; b=uCkReYQENn9gYcFUK9N9RD0WP445/qyCkak+li0/Va9xvotgp/dUxoXr9k5Xjo4Ywh iUhUfTgsKbyl9xt5zSRI1Q593TpuHDYttlxYJqfjFo3KVF54TtKsvOhSTKtghxm/WFK7 YNtcx222L5OON8dw+0w1m6+8ahkNhUTM3+7j123by+kdpYkhABonjsZHeVAJCfeK/1hl /hc9EhTSJxKuC5MOc2BbnXplJzvC03dMVX96XfktLrgsr+2NX3Q6nxYqFlw6TQRzJbnH B9Tda6D8S5ZOLiLx7lJu9mCvwvumHKXlXS623yJKzWkLvkzF7/PyeBCNIwY/F4SKQtTx PaQw== X-Gm-Message-State: AJcUukfcb2QA2KkwINMuKtrqCbOpdNs0oNe2Y9xU4C2KspWd1Sg4r3Nb wYnwgwSqdHfKfrSkgXclNwal1w== X-Google-Smtp-Source: ALg8bN5DZv/XXPojSdfI+fcyTrcGygMbP8bTVrsTxydcULxSCV9M3qpJO4MmpgW+6sptTHySzvwhgw== X-Received: by 2002:adf:db51:: with SMTP id f17mr11027589wrj.90.1548424826141; Fri, 25 Jan 2019 06:00:26 -0800 (PST) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id s1sm153704707wro.9.2019.01.25.06.00.19 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 25 Jan 2019 06:00:23 -0800 (PST) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 41C813E06F7; Fri, 25 Jan 2019 14:00:18 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Fri, 25 Jan 2019 14:00:11 +0000 Message-Id: <20190125140017.6092-9-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190125140017.6092-1-alex.bennee@linaro.org> References: <20190125140017.6092-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::435 Subject: [Qemu-devel] [PATCH v1 08/14] tests: docker.py be even smarter with persistent binfmt_misc X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" If we have a persistent mapping we don't need the QEMU binary copied into the container as the kernel has already opened the file and will pass the fd in. However the support libraries will still need to be there. Signed-off-by: Alex Bennée --- tests/docker/docker.py | 56 ++++++++++++++++++++++++++++-------------- 1 file changed, 38 insertions(+), 18 deletions(-) diff --git a/tests/docker/docker.py b/tests/docker/docker.py index 768728785f..a74338cb61 100755 --- a/tests/docker/docker.py +++ b/tests/docker/docker.py @@ -96,13 +96,22 @@ def _get_so_libs(executable): return libs -def _copy_binary_with_libs(src, dest_dir): - """Copy a binary executable and all its dependent libraries. +def _copy_binary_with_libs(src, bin_dest, dest_dir): + """Maybe copy a binary and all its dependent libraries. + + If bin_dest isn't set we only copy the support libraries because + we don't need qemu in the docker path to run (due to persistent + mapping). Indeed users may get confused if we aren't running what + is in the image. This does rely on the host file-system being fairly multi-arch - aware so the file don't clash with the guests layout.""" + aware so the file don't clash with the guests layout. + """ - _copy_with_mkdir(src, dest_dir, "/usr/bin") + if bin_dest: + _copy_with_mkdir(src, dest_dir, os.path.dirname(bin_dest)) + else: + print("only copying support libraries for %s" % (src)) libs = _get_so_libs(src) if libs: @@ -116,21 +125,26 @@ def _check_binfmt_misc(executable): The details of setting up binfmt_misc are outside the scope of this script but we should at least fail early with a useful - message if it won't work.""" + message if it won't work. + + Returns the configured binfmt path and a valid flag. For + persistent configurations we will still want to copy and dependent + libraries. + """ binary = os.path.basename(executable) binfmt_entry = "/proc/sys/fs/binfmt_misc/%s" % (binary) if not os.path.exists(binfmt_entry): print ("No binfmt_misc entry for %s" % (binary)) - return None + return None, False with open(binfmt_entry) as x: entry = x.read() if re.search("flags:.*F.*\n", entry): print("binfmt_misc for %s uses persistent(F) mapping to host binary\n" % (binary)) - return None + return None, True m = re.search("interpreter (\S+)\n", entry) interp = m.group(1) @@ -138,7 +152,8 @@ def _check_binfmt_misc(executable): print("binfmt_misc for %s does not point to %s, using %s" % (binary, executable, interp)) - return interp + return interp, True + def _read_qemu_dockerfile(img_name): # special case for Debian linux-user images @@ -345,7 +360,8 @@ class BuildCommand(SubCommand): # Validate binfmt_misc will work if args.include_executable: - if not _check_binfmt_misc(args.include_executable): + qpath, enabled = _check_binfmt_misc(args.include_executable) + if not enabled: return 1 # Is there a .pre file to run in the build context? @@ -368,7 +384,9 @@ class BuildCommand(SubCommand): # FIXME: there is no checksum of this executable and the linked # libraries, once the image built any change of this executable # or any library won't trigger another build. - _copy_binary_with_libs(args.include_executable, docker_dir) + _copy_binary_with_libs(args.include_executable, + qpath, docker_dir) + for filename in args.extra_files or []: _copy_with_mkdir(filename, docker_dir) cksum += [(filename, _file_checksum(filename))] @@ -400,14 +418,16 @@ class UpdateCommand(SubCommand): tmp_tar = TarFile(fileobj=tmp, mode='w') # Add the executable to the tarball, using the current - # configured binfmt_misc path. - ff = _check_binfmt_misc(args.executable) - if not ff: - bn = os.path.basename(args.executable) - ff = "/usr/bin/%s" % bn - print ("No binfmt_misc configured: copied to %s" % (ff)) - - tmp_tar.add(args.executable, arcname=ff) + # configured binfmt_misc path. If we don't get a path then we + # only need the support libraries copied + ff, enabled = _check_binfmt_misc(args.executable) + + if not enabled: + print("binfmt_misc not enabled, update disabled") + return 1 + + if ff: + tmp_tar.add(args.executable, arcname=ff) # Add any associated libraries libs = _get_so_libs(args.executable) From patchwork Fri Jan 25 14:00:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 1031107 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="KBXSugVj"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43mLXD39WVz9s55 for ; Sat, 26 Jan 2019 01:10:36 +1100 (AEDT) Received: from localhost ([127.0.0.1]:45277 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gn2Bm-0002mP-9x for incoming@patchwork.ozlabs.org; Fri, 25 Jan 2019 09:10:34 -0500 Received: from eggs.gnu.org ([209.51.188.92]:52196) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gn22A-0003c6-6q for qemu-devel@nongnu.org; Fri, 25 Jan 2019 09:00:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gn224-0000jx-LE for qemu-devel@nongnu.org; Fri, 25 Jan 2019 09:00:37 -0500 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]:38239) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gn224-0000h5-48 for qemu-devel@nongnu.org; Fri, 25 Jan 2019 09:00:32 -0500 Received: by mail-wr1-x434.google.com with SMTP id v13so10395853wrw.5 for ; Fri, 25 Jan 2019 06:00:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=EhCwiw40QInNmMcJBp5KZYmHZQD+SvErQd8SOORs+Mg=; b=KBXSugVjgTUQCEtxi1ee5++9u+d0lNTZv7IWkd2AvBCJ/wxDYQRRQtwKrGAKJmWc6H ZXz16yE5smFLlzwQ3lvVgKFtlPDM3kRaWpsrM+eHe4tjNCjunw5/Z7kVv+zz6WY6eIZz zo07kQ1T4PtkyI7unpp1Eoflp1jBZ7MIP11II= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=EhCwiw40QInNmMcJBp5KZYmHZQD+SvErQd8SOORs+Mg=; b=gaIfP85dj2NNfC/EYsC+xAsspCaQFgNkBrfqNO4sByWWnb+bXnPy+Y/nSqRXAeyrvU g4yimNG8T2zrHBiLOyUTleRTXwhXC8v/VrC2eSerpS5b461Rh/LFHOzgmmVlVK0YX0K5 xvLUrMdLIXhm93REafarn9vEL+xEcSZJxUX73kcCJ2jq8/D0yHVwQxBbKpS8G6u43GL8 t40vjUhBkYRusmIlZ1ETxY7SvRoDcT9IYng0PY1nq/Rroy4RKpuAcx7BTZczg2UQb0B5 FXffI+Rtb3h1qvRajsYX2YDugddDPbbmhpvK3rcKC1GgiHSymiEGDsvm2FztlA1nCZU1 Eddg== X-Gm-Message-State: AJcUuke3zXf4xgQ4h/xMlthrgCGOgU9LXgbfvneM8QxdmgBGsYTyq1/d E8ixTtLDjmud3joaXj0IbPXqVQ== X-Google-Smtp-Source: ALg8bN5FUISnZGqPkMIFK1nHYdomeW/tIdADTZARvpxkNhCixF4wlmLwU26JJ3z4w6sndpUNUSJNkQ== X-Received: by 2002:adf:900f:: with SMTP id h15mr11614419wrh.18.1548424829874; Fri, 25 Jan 2019 06:00:29 -0800 (PST) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id y8sm55149138wmg.13.2019.01.25.06.00.21 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 25 Jan 2019 06:00:24 -0800 (PST) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 56AC13E0763; Fri, 25 Jan 2019 14:00:18 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Fri, 25 Jan 2019 14:00:12 +0000 Message-Id: <20190125140017.6092-10-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190125140017.6092-1-alex.bennee@linaro.org> References: <20190125140017.6092-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::434 Subject: [Qemu-devel] [PATCH v1 09/14] tests: PEP8 cleanup of docker.py, mostly white space X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" My editor keeps putting squiggly lines under a bunch of the python lines to remind me how non-PEP8 compliant it is. Clean that up so it's easier to spot new errors. Signed-off-by: Alex Bennée --- tests/docker/docker.py | 48 ++++++++++++++++++++++++++++++------------ 1 file changed, 35 insertions(+), 13 deletions(-) diff --git a/tests/docker/docker.py b/tests/docker/docker.py index a74338cb61..53a8c9c801 100755 --- a/tests/docker/docker.py +++ b/tests/docker/docker.py @@ -30,7 +30,7 @@ except ImportError: from io import StringIO from shutil import copy, rmtree from pwd import getpwuid -from datetime import datetime,timedelta +from datetime import datetime, timedelta FILTERED_ENV_NAMES = ['ftp_proxy', 'http_proxy', 'https_proxy'] @@ -43,9 +43,11 @@ def _text_checksum(text): """Calculate a digest string unique to the text content""" return hashlib.sha1(text).hexdigest() + def _file_checksum(filename): return _text_checksum(open(filename, 'rb').read()) + def _guess_docker_command(): """ Guess a working docker command or raise exception if not found""" commands = [["docker"], ["sudo", "-n", "docker"]] @@ -59,9 +61,10 @@ def _guess_docker_command(): except OSError: pass commands_txt = "\n".join([" " + " ".join(x) for x in commands]) - raise Exception("Cannot find working docker command. Tried:\n%s" % \ + raise Exception("Cannot find working docker command. Tried:\n%s" % commands_txt) + def _copy_with_mkdir(src, root_dir, sub_path='.'): """Copy src into root_dir, creating sub_path as needed.""" dest_dir = os.path.normpath("%s/%s" % (root_dir, sub_path)) @@ -96,6 +99,7 @@ def _get_so_libs(executable): return libs + def _copy_binary_with_libs(src, bin_dest, dest_dir): """Maybe copy a binary and all its dependent libraries. @@ -117,7 +121,7 @@ def _copy_binary_with_libs(src, bin_dest, dest_dir): if libs: for l in libs: so_path = os.path.dirname(l) - _copy_with_mkdir(l , dest_dir, so_path) + _copy_with_mkdir(l, dest_dir, so_path) def _check_binfmt_misc(executable): @@ -142,7 +146,7 @@ def _check_binfmt_misc(executable): with open(binfmt_entry) as x: entry = x.read() if re.search("flags:.*F.*\n", entry): - print("binfmt_misc for %s uses persistent(F) mapping to host binary\n" % + print("binfmt_misc for %s uses persistent(F) mapping to host binary" % (binary)) return None, True @@ -164,6 +168,7 @@ def _read_qemu_dockerfile(img_name): img_name + ".docker") return open(df, "r").read() + def _dockerfile_preprocess(df): out = "" for l in df.splitlines(): @@ -181,6 +186,7 @@ def _dockerfile_preprocess(df): out += l + "\n" return out + class Docker(object): """ Running Docker commands """ def __init__(self): @@ -248,7 +254,7 @@ class Docker(object): def build_image(self, tag, docker_dir, dockerfile, quiet=True, user=False, argv=None, extra_files_cksum=[]): - if argv == None: + if argv is None: argv = [] tmp_df = tempfile.NamedTemporaryFile(dir=docker_dir, suffix=".docker") @@ -269,7 +275,7 @@ class Docker(object): tmp_df.flush() - self._do_check(["build", "-t", tag, "-f", tmp_df.name] + argv + \ + self._do_check(["build", "-t", tag, "-f", tmp_df.name] + argv + [docker_dir], quiet=quiet) @@ -299,9 +305,11 @@ class Docker(object): def command(self, cmd, argv, quiet): return self._do([cmd] + argv, quiet=quiet) + class SubCommand(object): """A SubCommand template base class""" - name = None # Subcommand name + name = None # Subcommand name + def shared_args(self, parser): parser.add_argument("--quiet", action="store_true", help="Run quietly unless an error occurred") @@ -309,6 +317,7 @@ class SubCommand(object): def args(self, parser): """Setup argument parser""" pass + def run(self, args, argv): """Run command. args: parsed argument by argument parser. @@ -316,18 +325,23 @@ class SubCommand(object): """ pass + class RunCommand(SubCommand): """Invoke docker run and take care of cleaning up""" name = "run" + def args(self, parser): parser.add_argument("--keep", action="store_true", help="Don't remove image when command completes") + def run(self, args, argv): return Docker().run(argv, args.keep, quiet=args.quiet) + class BuildCommand(SubCommand): - """ Build docker image out of a dockerfile. Arguments: """ + """ Build docker image out of a dockerfile. Arg: """ name = "build" + def args(self, parser): parser.add_argument("--include-executable", "-e", help="""Specify a binary that will be copied to the @@ -392,8 +406,8 @@ class BuildCommand(SubCommand): cksum += [(filename, _file_checksum(filename))] argv += ["--build-arg=" + k.lower() + "=" + v - for k, v in os.environ.iteritems() - if k.lower() in FILTERED_ENV_NAMES] + for k, v in os.environ.iteritems() + if k.lower() in FILTERED_ENV_NAMES] dkr.build_image(tag, docker_dir, dockerfile, quiet=args.quiet, user=args.user, argv=argv, extra_files_cksum=cksum) @@ -402,9 +416,11 @@ class BuildCommand(SubCommand): return 0 + class UpdateCommand(SubCommand): - """ Update a docker image with new executables. Arguments: """ + """ Update a docker image with new executables. Args: """ name = "update" + def args(self, parser): parser.add_argument("tag", help="Image Tag") @@ -457,16 +473,20 @@ class UpdateCommand(SubCommand): return 0 + class CleanCommand(SubCommand): """Clean up docker instances""" name = "clean" + def run(self, args, argv): Docker().clean() return 0 + class ImagesCommand(SubCommand): """Run "docker images" command""" name = "images" + def run(self, args, argv): return Docker().command("images", argv, args.quiet) @@ -539,7 +559,7 @@ class CheckCommand(SubCommand): try: dkr = Docker() - except: + except subprocess.CalledProcessError: print("Docker not set up") return 1 @@ -578,7 +598,8 @@ class CheckCommand(SubCommand): def main(): parser = argparse.ArgumentParser(description="A Docker helper", - usage="%s ..." % os.path.basename(sys.argv[0])) + usage="%s ..." % + os.path.basename(sys.argv[0])) subparsers = parser.add_subparsers(title="subcommands", help=None) for cls in SubCommand.__subclasses__(): cmd = cls() @@ -589,5 +610,6 @@ def main(): args, argv = parser.parse_known_args() return args.cmdobj.run(args, argv) + if __name__ == "__main__": sys.exit(main()) From patchwork Fri Jan 25 14:00:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 1031097 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="LCzp8pM0"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43mLKl0DqJz9s55 for ; Sat, 26 Jan 2019 01:01:31 +1100 (AEDT) Received: from localhost ([127.0.0.1]:45157 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gn22y-0003db-Uz for incoming@patchwork.ozlabs.org; Fri, 25 Jan 2019 09:01:28 -0500 Received: from eggs.gnu.org ([209.51.188.92]:52107) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gn224-0003VL-4z for qemu-devel@nongnu.org; Fri, 25 Jan 2019 09:00:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gn222-0000gz-5a for qemu-devel@nongnu.org; Fri, 25 Jan 2019 09:00:31 -0500 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]:46974) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gn221-0000eg-SB for qemu-devel@nongnu.org; Fri, 25 Jan 2019 09:00:30 -0500 Received: by mail-wr1-x443.google.com with SMTP id l9so10359570wrt.13 for ; Fri, 25 Jan 2019 06:00:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=XWeaDTcp3bKD0qd6jPiiquZiB5T8J8XLLU5Gi2MTeS0=; b=LCzp8pM028jWYhauyg6+Rrw0m4ns+cTp8Z58i+jQwUDeKlMl69my33cijIdF0Xd8ui B+tQ3GK5qouPxAtRyRbt3sdnx1e56S8Qt7ddVbPMAJm2Qhg1t8HWJB/FXAl8c86y2oT2 SSrLq8ryrtoS+LkFZ5R6YPs0ybf6Q/6VOOec8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=XWeaDTcp3bKD0qd6jPiiquZiB5T8J8XLLU5Gi2MTeS0=; b=Rv1vlrVPHPm19jkEH7LPrH+riZ7Nxndv8hl9pYax1hKcxWCdv7WinOVYGxtiYWXssO qkmchLtFQLNikJJeOIIOjIp627QvbUgpQdbdIznNibqTWKxoPz3a7PfcuEgcRb0EglGy wZlCtiIYIorNAmchuNExhMmfel6e5RhZsqHZe//HEhPT0gHnGJ7/nwY/wtyKv/zCiQ6g dC2w73NrcYvmTTin+AYUIe99ula5BDvRyAU8Tl2emsT3XeMCx/yVER2MDqpJHEksyjeq D8Vd/BDszzTTN0brkA6xhZMgHpKDIJrjE0VOyg53lDNDbpMosjUX3oguf9E8dJAUrlNc NaFg== X-Gm-Message-State: AJcUukfMnQ0ZQxG7HaMz4ZWmvbVCnbzgE6NJ2eCQIofDotFqkMXnPZOj oc4KRuBHYTnO/qWXMSx2B0q3t5ZJP5k= X-Google-Smtp-Source: ALg8bN6Bt1uXw50RdX7SSJP/jN0LxtuTKUNCxmeQ0WNQD2n2H3WTFYdW0DBexC7OeE4G9I/m2lXXMw== X-Received: by 2002:adf:8068:: with SMTP id 95mr11873496wrk.181.1548424827739; Fri, 25 Jan 2019 06:00:27 -0800 (PST) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id x20sm88004727wme.6.2019.01.25.06.00.21 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 25 Jan 2019 06:00:24 -0800 (PST) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 6B2053E07DF; Fri, 25 Jan 2019 14:00:18 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Fri, 25 Jan 2019 14:00:13 +0000 Message-Id: <20190125140017.6092-11-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190125140017.6092-1-alex.bennee@linaro.org> References: <20190125140017.6092-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::443 Subject: [Qemu-devel] [PATCH v1 10/14] tests/vm: move images to $HOME/.cache/qemu-vm/images X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Alex_Benn=C3=A9e?= , Gerd Hoffmann Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Gerd Hoffmann It's easier to move around the images then, by replacing the subdirectory with a symlink. Allows to share the images between multiple qemu checkouts for example. Signed-off-by: Gerd Hoffmann Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée --- tests/vm/Makefile.include | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/tests/vm/Makefile.include b/tests/vm/Makefile.include index a98fb3027f..a58383d263 100644 --- a/tests/vm/Makefile.include +++ b/tests/vm/Makefile.include @@ -3,7 +3,8 @@ .PHONY: vm-build-all vm-clean-all IMAGES := ubuntu.i386 freebsd netbsd openbsd centos -IMAGE_FILES := $(patsubst %, tests/vm/%.img, $(IMAGES)) +IMAGES_DIR := $(HOME)/.cache/qemu-vm/images +IMAGE_FILES := $(patsubst %, $(IMAGES_DIR)/%.img, $(IMAGES)) .PRECIOUS: $(IMAGE_FILES) @@ -24,9 +25,10 @@ vm-build-all: $(addprefix vm-build-, $(IMAGES)) vm-clean-all: rm -f $(IMAGE_FILES) -tests/vm/%.img: $(SRC_PATH)/tests/vm/% \ - $(SRC_PATH)/tests/vm/basevm.py \ - $(SRC_PATH)/tests/vm/Makefile.include +$(IMAGES_DIR)/%.img: $(SRC_PATH)/tests/vm/% \ + $(SRC_PATH)/tests/vm/basevm.py \ + $(SRC_PATH)/tests/vm/Makefile.include + @mkdir -p $(IMAGES_DIR) $(call quiet-command, \ $< \ $(if $(V)$(DEBUG), --debug) \ @@ -37,7 +39,7 @@ tests/vm/%.img: $(SRC_PATH)/tests/vm/% \ # Build in VM $(IMAGE) -vm-build-%: tests/vm/%.img +vm-build-%: $(IMAGES_DIR)/%.img $(call quiet-command, \ $(SRC_PATH)/tests/vm/$* \ $(if $(V)$(DEBUG), --debug) \ From patchwork Fri Jan 25 14:00:14 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 1031103 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="g/KanAmW"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43mLSw2Zlvz9s55 for ; Sat, 26 Jan 2019 01:07:44 +1100 (AEDT) Received: from localhost ([127.0.0.1]:45233 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gn290-0000GV-8R for incoming@patchwork.ozlabs.org; Fri, 25 Jan 2019 09:07:42 -0500 Received: from eggs.gnu.org ([209.51.188.92]:52164) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gn225-0003WR-FI for qemu-devel@nongnu.org; Fri, 25 Jan 2019 09:00:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gn224-0000jB-8D for qemu-devel@nongnu.org; Fri, 25 Jan 2019 09:00:33 -0500 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]:37353) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gn222-0000fO-ND for qemu-devel@nongnu.org; Fri, 25 Jan 2019 09:00:31 -0500 Received: by mail-wm1-x334.google.com with SMTP id g67so6732518wmd.2 for ; Fri, 25 Jan 2019 06:00:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=KPwbnGb817tvi4yWPtclc9KnwvBuRvuQTZFpVySbA98=; b=g/KanAmWsfWARVWBXZiqwmVaCrphB18zV8qbq97rO/zWlHchVsStEsYBiNPeCeqQfh K/p2YOV394UQNcy0eivgcXEA4jMnSoQKqbtt0qdcuQqOQYo3gnpMurGBl+dpvhTOfQ/p OmhByq6SvhQy5z1m3pS/X2+k/FPFsaaIeMWis= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=KPwbnGb817tvi4yWPtclc9KnwvBuRvuQTZFpVySbA98=; b=asXiBv6WSqlfy9eNKJYtOY33KOmdq6xDZbhQ/4X7iQlrOUhHBFqnnHc8D8raR2EQ/q nt5Wo41x1ZTx9KLbeZpYFFzKMttbBe36S3clgq4nkHmRXkCUc8vJiMIBiZlYG+6LpTkk FWbdxcp8DMLTSpDWP4cvWKbVkd9HB8sEAuRKiPykdKc0swu0x8gBEIZOFoklfILmUVsY E7dNZEbfEj0zSnp2UrZydz5lk/NJf5Qd3ApW1+jd7OBkFvZ/icsteGZk3jyHfoVq1UZ+ fOCGOSWIVfH3TtmbiBFVgF6wulhMBmwmVkPJXO11XZ9tJB7Vr9mYPyBKx4f2f57e5BDN R0ag== X-Gm-Message-State: AJcUukdgA5obGOdyzHZ83IGu8Ay/fpLzmJoRg+CCWlaqueVvXJLef0Un U8nvCkqxcrC+bm+hrtTO+jEC7A== X-Google-Smtp-Source: ALg8bN509IzXo6/jPjjhuuT1l1NHohugwz+Wyn+6/rUHvRlr6FjaUmVp/mVYqOjIS6wvHHQuv70Ung== X-Received: by 2002:a1c:c90b:: with SMTP id f11mr6935852wmb.33.1548424828605; Fri, 25 Jan 2019 06:00:28 -0800 (PST) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id n9sm85830696wrx.80.2019.01.25.06.00.21 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 25 Jan 2019 06:00:24 -0800 (PST) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 81E8F3E07ED; Fri, 25 Jan 2019 14:00:18 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Fri, 25 Jan 2019 14:00:14 +0000 Message-Id: <20190125140017.6092-12-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190125140017.6092-1-alex.bennee@linaro.org> References: <20190125140017.6092-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::334 Subject: [Qemu-devel] [PATCH v1 11/14] tests/vm: call make check directly for netbsd/freebsd/ubuntu.i386 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" The "make check" target calls check-qtest which has the appropriate system binaries as dependencies so we shouldn't need to do two steps of make invocation. Doing it in two steps was a hangover from when our make check couldn't run tests in parallel. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé --- tests/vm/freebsd | 1 - tests/vm/netbsd | 1 - tests/vm/ubuntu.i386 | 1 - 3 files changed, 3 deletions(-) diff --git a/tests/vm/freebsd b/tests/vm/freebsd index 19a3729172..a85c866c30 100755 --- a/tests/vm/freebsd +++ b/tests/vm/freebsd @@ -25,7 +25,6 @@ class FreeBSDVM(basevm.BaseVM): cd $(mktemp -d /var/tmp/qemu-test.XXXXXX); tar -xf /dev/vtbd1; ./configure {configure_opts}; - gmake --output-sync -j{jobs} {verbose}; gmake --output-sync -j{jobs} check {verbose}; """ diff --git a/tests/vm/netbsd b/tests/vm/netbsd index fac6a7ce51..edea113bb5 100755 --- a/tests/vm/netbsd +++ b/tests/vm/netbsd @@ -25,7 +25,6 @@ class NetBSDVM(basevm.BaseVM): cd $(mktemp -d /var/tmp/qemu-test.XXXXXX); tar -xf /dev/rld1a; ./configure --python=python2.7 {configure_opts}; - gmake --output-sync -j{jobs} {verbose}; gmake --output-sync -j{jobs} check {verbose}; """ diff --git a/tests/vm/ubuntu.i386 b/tests/vm/ubuntu.i386 index 1b7e1ab8f0..252e514859 100755 --- a/tests/vm/ubuntu.i386 +++ b/tests/vm/ubuntu.i386 @@ -26,7 +26,6 @@ class UbuntuX86VM(basevm.BaseVM): sudo chmod a+r /dev/vdb; tar -xf /dev/vdb; ./configure {configure_opts}; - make --output-sync -j{jobs}; make --output-sync check -j{jobs} {verbose}; """ From patchwork Fri Jan 25 14:00:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 1031100 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="iNjNthCI"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43mLPP0XCNz9s7h for ; Sat, 26 Jan 2019 01:04:41 +1100 (AEDT) Received: from localhost ([127.0.0.1]:45176 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gn262-00064v-VW for incoming@patchwork.ozlabs.org; Fri, 25 Jan 2019 09:04:39 -0500 Received: from eggs.gnu.org ([209.51.188.92]:52199) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gn22A-0003c7-6u for qemu-devel@nongnu.org; Fri, 25 Jan 2019 09:00:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gn225-0000kZ-FF for qemu-devel@nongnu.org; Fri, 25 Jan 2019 09:00:37 -0500 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]:51583) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gn224-0000fu-Jv for qemu-devel@nongnu.org; Fri, 25 Jan 2019 09:00:33 -0500 Received: by mail-wm1-x32d.google.com with SMTP id b11so6892410wmj.1 for ; Fri, 25 Jan 2019 06:00:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=t6Sf3/Lq8RpGv2iUNl9eak/++G7pqN9J7pUEqjfdrpE=; b=iNjNthCIZ/iQ3kCaFEQUGHZwULNGzEQKPTjIP2egLfnO1pLGKRZnbnXBZ1wbfZSciD b6bRdkHlReSLYnBXIhfgO0CuD/h/zAe7Y3nxtQDTwtN6gXvWlq0KQe9PBA5OSARjd3PK WZIS+WVRo6gx2JW3GhzLg45HhSX35clPKeT6c= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=t6Sf3/Lq8RpGv2iUNl9eak/++G7pqN9J7pUEqjfdrpE=; b=eisz3H1YTGxoCGTGJwhauXhWD9VVVUg110or/TgpcefN+GkUXpN0dM5uBNqG1gRmJ+ uFeWciJchzSrTcwlcYFTc+72N2021N1CAx2l+TFNP8nOs7kOYxZLSVGPW/I6f2Flfpv3 HqooIYjtpRGuQ62Q14WyRqs9SU9WgILohtL8ICfUqnPjQuc42qwmnqn8Hx/LOU2gzRZL Nvpm7HP2PmpEJrAmKC3K48codjzK3l+obNkHXi5N47jjomvCQOF2s5mCWuD7LMEvA40q 5WbmLzpt7JXo+ED4HC3e6TQoTim83Ixp5fMFeUA1aVnEx/PPA7CRsYG+x7twclNv75PY IykQ== X-Gm-Message-State: AJcUukfpCUmN3EqoxfDwXBwF6sAd4iluuf1LDWRKBNWXbfV/TEl3UAyL Dqd+2scjwdwnGjDfi1KxBpVH5w== X-Google-Smtp-Source: ALg8bN6RKLFINE+NmyXJy4KEW+Ed0/Ya+60PH1JwoDW/ksaJxVZD79ezKyXHAeCVidIaNg1A35UN0w== X-Received: by 2002:a1c:e18a:: with SMTP id y132mr7463324wmg.48.1548424829208; Fri, 25 Jan 2019 06:00:29 -0800 (PST) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id x3sm102334965wrd.19.2019.01.25.06.00.21 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 25 Jan 2019 06:00:24 -0800 (PST) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 99E503E09EB; Fri, 25 Jan 2019 14:00:18 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Fri, 25 Jan 2019 14:00:15 +0000 Message-Id: <20190125140017.6092-13-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190125140017.6092-1-alex.bennee@linaro.org> References: <20190125140017.6092-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::32d Subject: [Qemu-devel] [PATCH v1 12/14] tests/vm: add --build-target option X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" This allows us to invoke the build with a custom target (for the VMs that use the {target} format string specifier). Currently OpenBSD is still hardwired due to problems running check. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé --- tests/vm/basevm.py | 3 +++ tests/vm/freebsd | 2 +- tests/vm/netbsd | 2 +- tests/vm/ubuntu.i386 | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py index 5caf77d6b8..bdca6cb2fc 100755 --- a/tests/vm/basevm.py +++ b/tests/vm/basevm.py @@ -228,6 +228,8 @@ def parse_args(vmcls): help="build image") parser.add_option("--build-qemu", help="build QEMU from source in guest") + parser.add_option("--build-target", + help="QEMU build target", default="check") parser.add_option("--interactive", "-I", action="store_true", help="Interactively run command") parser.add_option("--snapshot", "-s", action="store_true", @@ -255,6 +257,7 @@ def main(vmcls): cmd = [vm.BUILD_SCRIPT.format( configure_opts = " ".join(argv), jobs=args.jobs, + target=args.build_target, verbose = "V=1" if args.verbose else "")] else: cmd = argv diff --git a/tests/vm/freebsd b/tests/vm/freebsd index a85c866c30..1d64c31b7c 100755 --- a/tests/vm/freebsd +++ b/tests/vm/freebsd @@ -25,7 +25,7 @@ class FreeBSDVM(basevm.BaseVM): cd $(mktemp -d /var/tmp/qemu-test.XXXXXX); tar -xf /dev/vtbd1; ./configure {configure_opts}; - gmake --output-sync -j{jobs} check {verbose}; + gmake --output-sync -j{jobs} {target} {verbose}; """ def build_image(self, img): diff --git a/tests/vm/netbsd b/tests/vm/netbsd index edea113bb5..a2c3d13af4 100755 --- a/tests/vm/netbsd +++ b/tests/vm/netbsd @@ -25,7 +25,7 @@ class NetBSDVM(basevm.BaseVM): cd $(mktemp -d /var/tmp/qemu-test.XXXXXX); tar -xf /dev/rld1a; ./configure --python=python2.7 {configure_opts}; - gmake --output-sync -j{jobs} check {verbose}; + gmake --output-sync -j{jobs} {target} {verbose}; """ def build_image(self, img): diff --git a/tests/vm/ubuntu.i386 b/tests/vm/ubuntu.i386 index 252e514859..a22d137e76 100755 --- a/tests/vm/ubuntu.i386 +++ b/tests/vm/ubuntu.i386 @@ -26,7 +26,7 @@ class UbuntuX86VM(basevm.BaseVM): sudo chmod a+r /dev/vdb; tar -xf /dev/vdb; ./configure {configure_opts}; - make --output-sync check -j{jobs} {verbose}; + make --output-sync {target} -j{jobs} {verbose}; """ def _gen_cloud_init_iso(self): From patchwork Fri Jan 25 14:00:16 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 1031114 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="SmXis4k/"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43mLfN6q5wz9s55 for ; Sat, 26 Jan 2019 01:15:56 +1100 (AEDT) Received: from localhost ([127.0.0.1]:45410 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gn2Gw-0007UU-S3 for incoming@patchwork.ozlabs.org; Fri, 25 Jan 2019 09:15:54 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54151) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gn290-0000oL-TT for qemu-devel@nongnu.org; Fri, 25 Jan 2019 09:07:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gn290-0004aj-1u for qemu-devel@nongnu.org; Fri, 25 Jan 2019 09:07:42 -0500 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]:39451) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gn28z-0004QN-QS for qemu-devel@nongnu.org; Fri, 25 Jan 2019 09:07:41 -0500 Received: by mail-wm1-x341.google.com with SMTP id y8so6729537wmi.4 for ; Fri, 25 Jan 2019 06:07:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=FuglTIL27lqQLr8TDoLCoIqWK/Kf2YOV/VYJP+0VDl4=; b=SmXis4k/2ynUNEGv8/KgdrvHz3PR6eq5Srzk1wISRH+Q8S/aiJnl/OXT+gCQqV4yjh srbaQsoxfc3zx/urKOz+8rYFHDvN2IaECzo6XAnfbaq5QSwYkwueUIvPFPwT4PWtc4I1 NWTb001DxgwNF8SZeOgJTsUB79I39SBF2uFLw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=FuglTIL27lqQLr8TDoLCoIqWK/Kf2YOV/VYJP+0VDl4=; b=EvIny75LblgXNjytUdRhZTD2RZ7MXDt+DyHA7fztU/bTpBBgjI8wR6JsZmsMMR74w0 F+OXD5srfbO1IdSa4MHyMC3iyf/xichS47U7Sk/QFlcdmHc4qEzr7JaTdIVgV4wW3hPc 53DuKAnGW0bpo7aHnaqimp5ynquSaAZgG208L5W8B8J1RsCDK5CLNEEvC66PSaa/3Q3N UpwybTZDk/lVYRdtt2kCN998Bm8FjzC5BaTbh6TP6rNrOrnrwVqTFrIV3yHR/b+LCf21 3LW/mzhPn+gMWHMxu+8A6L+zKNKJgjeMUvmsOYq9bhZ7xu0bEUV1m46CmXJGch3gkNc3 Y6Mw== X-Gm-Message-State: AJcUuke/kwkivEVGck5/9lU1fezkd/ilcfmX12w4bajuxo3SJktidl+U n4WEsbQO2sBqr/VPvLF6hnQblA== X-Google-Smtp-Source: ALg8bN6cdZIARmRFag73vGUJwvfReOtfiGrlcN1bynfEx8rCGcZUqd7rzEp/xfgREsCdFF/Nv4CC/Q== X-Received: by 2002:a1c:7ec4:: with SMTP id z187mr6867935wmc.43.1548425249757; Fri, 25 Jan 2019 06:07:29 -0800 (PST) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id n6sm61121842wmk.9.2019.01.25.06.07.28 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 25 Jan 2019 06:07:29 -0800 (PST) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id ADC9D3E0A8A; Fri, 25 Jan 2019 14:00:18 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Fri, 25 Jan 2019 14:00:16 +0000 Message-Id: <20190125140017.6092-14-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190125140017.6092-1-alex.bennee@linaro.org> References: <20190125140017.6092-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::341 Subject: [Qemu-devel] [PATCH v1 13/14] tests/vm: expose BUILD_TARGET, TARGET_LIST and EXTRA_CONFIGURE_OPTS X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Now the underlying basevm support passes these along we can expose some additional variables to our Makefile to allow more customised tweaking of the build. For example: make vm-build-freebsd TARGET_LIST=aarch64-softmmu \ EXTRA_CONFIGURE_OPTS="--disable-tools --disable-docs" \ BUILD_TARGET=check-softfloat Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé --- tests/vm/Makefile.include | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tests/vm/Makefile.include b/tests/vm/Makefile.include index a58383d263..992d823f6b 100644 --- a/tests/vm/Makefile.include +++ b/tests/vm/Makefile.include @@ -19,6 +19,11 @@ vm-test: @echo "" @echo " vm-build-all - Build QEMU in all VMs" @echo " vm-clean-all - Clean up VM images" + @echo + @echo "Special variables:" + @echo " BUILD_TARGET=foo - override the build target" + @echo " TARGET_LIST=a,b,c - Override target list in builds." + @echo ' EXTRA_CONFIGURE_OPTS="..."' vm-build-all: $(addprefix vm-build-, $(IMAGES)) @@ -47,6 +52,9 @@ vm-build-%: $(IMAGES_DIR)/%.img $(if $(J),--jobs $(J)) \ $(if $(V),--verbose) \ --image "$<" \ - --build-qemu $(SRC_PATH), \ + $(if $(BUILD_TARGET),--build-target $(BUILD_TARGET)) \ + --build-qemu $(SRC_PATH) -- \ + $(if $(TARGET_LIST),--target-list=$(TARGET_LIST)) \ + $(if $(EXTRA_CONFIGURE_OPTS),$(EXTRA_CONFIGURE_OPTS)), \ " VM-BUILD $*") From patchwork Fri Jan 25 14:00:17 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 1031111 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="EsZu9yBB"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43mLbM1FSWz9s55 for ; Sat, 26 Jan 2019 01:13:19 +1100 (AEDT) Received: from localhost ([127.0.0.1]:45351 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gn2EP-0005AX-1k for incoming@patchwork.ozlabs.org; Fri, 25 Jan 2019 09:13:17 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54130) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gn28z-0000nH-PB for qemu-devel@nongnu.org; Fri, 25 Jan 2019 09:07:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gn28x-0004Yd-UD for qemu-devel@nongnu.org; Fri, 25 Jan 2019 09:07:41 -0500 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]:47029) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gn28w-0004Q9-Gk for qemu-devel@nongnu.org; Fri, 25 Jan 2019 09:07:39 -0500 Received: by mail-wr1-x442.google.com with SMTP id l9so10385441wrt.13 for ; Fri, 25 Jan 2019 06:07:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=c+KjY4GXbPnP7Qx/tQakWL6Rvb+riTHS2+DauNnbB1I=; b=EsZu9yBBx2lHQ5j0mHDyNVG7wh1YLfrGjODiUUjEX41tehjroCZgEIUXqB3+2G7DlN TbtaLWCAc3HITmGbPPnFEadywdx1M3KZ1Xa8995yTc+t1oCLMFqQZPKuVQ/KCd1L4on5 t0szoO27jqHAcPUz37cfxJCnXBgnIf9jkhE5k= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=c+KjY4GXbPnP7Qx/tQakWL6Rvb+riTHS2+DauNnbB1I=; b=A89rxOWI5XNSdVHTcpkn2C6oPHLl+1aNzD9QBS8Bh0yUAo//50SSmBhz0vec5cg3PX 99V18beAf/AtjlVAAwpZ8gKskCL0SrwagPBy1r6exMoXtMMfasz1gGl8chzsfsVPGmjc pJJKdozNqNvEmJizDrV0pwtQ5crpwlE8mDXIwDRvnDZ6CIyi3YX8gcqMcjIW2tysqt5F c0wIuDVEbAdw8vgSC70Ld1dRaTsxTIX3An5fOzl76nNmBwMCYadZbkPkwZevhyyZOJLV au2U+1PX3DkLO+bYnOm/5agg9l2o76L/Onw3sKYXV7BC9nHvFetUO1jh8Kvv4qVHjKn2 kn4Q== X-Gm-Message-State: AJcUukeeOv0Kqdye4EYrTyQDNZxKKrOVYwb74Ij/oBDhy3fjfTMWDBve yBUCNRgE+VJOCzQ/FPRfUitZ3A== X-Google-Smtp-Source: ALg8bN6df4GXW8ckVQIoZ9ddHiq0La0Bigc3LS3gV6KIBQ7aWj4btcSQBHA9icrwS84V6rEFkJkoBw== X-Received: by 2002:a5d:6b81:: with SMTP id n1mr12445757wrx.149.1548425249102; Fri, 25 Jan 2019 06:07:29 -0800 (PST) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id x81sm65370534wmg.17.2019.01.25.06.07.28 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 25 Jan 2019 06:07:28 -0800 (PST) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id C03C03E0B02; Fri, 25 Jan 2019 14:00:18 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Fri, 25 Jan 2019 14:00:17 +0000 Message-Id: <20190125140017.6092-15-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190125140017.6092-1-alex.bennee@linaro.org> References: <20190125140017.6092-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::442 Subject: [Qemu-devel] [PATCH v1 14/14] scripts/qemu.py: allow arches use KVM for their 32bit cousins X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Eduardo Habkost , Cleber Rosa Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" A lot of architectures can run their 32 bit cousins on KVM so the kvm_available function needs to be a little less restricting when deciding if KVM is available. Signed-off-by: Alex Bennée --- scripts/qemu.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/scripts/qemu.py b/scripts/qemu.py index 0a5e02eb56..2934ee12c5 100644 --- a/scripts/qemu.py +++ b/scripts/qemu.py @@ -25,9 +25,18 @@ import tempfile LOG = logging.getLogger(__name__) +# Mapping host architecture to any additional architectures it can +# support which often includes its 32 bit cousin. +ADDITIONAL_ARCHES = { + "x86_64" : "i386", + "aarch64" : "armhf" +} def kvm_available(target_arch=None): - if target_arch and target_arch != os.uname()[4]: + host_arch = os.uname()[4] + if target_arch and target_arch != host_arch: + if target_arch == ADDITIONAL_ARCHES[host_arch]: + return True return False return os.access("/dev/kvm", os.R_OK | os.W_OK)