From patchwork Tue Jul 17 19:55:37 2018 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: 945316 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=2001:4830:134:3::11; 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="KNcYnd/B"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41VWJM5Jtdz9s3R for ; Wed, 18 Jul 2018 05:56:50 +1000 (AEST) Received: from localhost ([::1]:32919 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ffW5X-00032m-Tx for incoming@patchwork.ozlabs.org; Tue, 17 Jul 2018 15:56:47 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40854) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ffW4o-00031a-3j for qemu-devel@nongnu.org; Tue, 17 Jul 2018 15:56:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ffW4k-0004a5-AP for qemu-devel@nongnu.org; Tue, 17 Jul 2018 15:56:02 -0400 Received: from mail-wm0-x244.google.com ([2a00:1450:400c:c09::244]:53468) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ffW4k-0004ZW-3P for qemu-devel@nongnu.org; Tue, 17 Jul 2018 15:55:58 -0400 Received: by mail-wm0-x244.google.com with SMTP id s9-v6so535500wmh.3 for ; Tue, 17 Jul 2018 12:55:57 -0700 (PDT) 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=Tc2e5a8d48MEzOzwrg1xBMGVNuUMa+bkRtxDAPew25A=; b=KNcYnd/B7gtI8+hoH7M3MJgVJxTbiGPtQjjIWXnL19azlUJHkiCBB5hwsZ2kh0OMMv +kjsRZ5HNbJVsA1kZz8JVIObkpGnOdn/SLRXH6/TVd4Hlj1x041cpZOWz/Xz8eLan0NJ V6fYyjX+GbK/OLzSbtexDapRkKnGdkYlxCWUY= 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=Tc2e5a8d48MEzOzwrg1xBMGVNuUMa+bkRtxDAPew25A=; b=eFa7srxWlOnnqQitsqYyI3/uMv/Egiy5YE0GiMQV6tvTlQotYqFiPox9+CdaCay9gP OfBX4NCg5hmf3ZQkqtDjkzPVIfqbLhtXl1n6IBWYznOVmUj323t9ahmqcnZABaF3K8an KKcJkny+2upsr7oQAIcVlvBPXsNM8SDvKSM/IInDZjRsCFVjOt2GchKKfxpmRpr82N4q wQsE8NgU54hKxA2fVKkz2N0Y9hp5/SCwo7kLpFY1vfJigINdDFBzDE9pCcf5j3J+3a7E hJbDs8/F/7hPJJRrzKLeVHuPYavrd1QZSsZPb3ldQEhZdj4L7g44f+aVOc6xcs3BAUP1 sabw== X-Gm-Message-State: AOUpUlHqak20RoyXRUpgGPnCaSG1HutR7zhWrjWg1srfXzYjwoeoGaWF nkR+BikoBeYQHcKEVTqFCK2TRQ== X-Google-Smtp-Source: AAOMgpdae6n1pcZ2P2GevQU5nxaqzGJVDBca6kBzp53wgR9W8DOkXp35n2DXKqlgvcPXXO7B0fIgAg== X-Received: by 2002:a1c:4405:: with SMTP id r5-v6mr2092044wma.4.1531857356838; Tue, 17 Jul 2018 12:55:56 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id v1-v6sm4161508wrs.34.2018.07.17.12.55.54 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 17 Jul 2018 12:55:55 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 07CFC3E0496; Tue, 17 Jul 2018 20:55:54 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: cota@braap.org, famz@redhat.com, berrange@redhat.com, f4bug@amsat.org, richard.henderson@linaro.org, balrogg@gmail.com, aurelien@aurel32.net, agraf@suse.de Date: Tue, 17 Jul 2018 20:55:37 +0100 Message-Id: <20180717195553.9111-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180717195553.9111-1-alex.bennee@linaro.org> References: <20180717195553.9111-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:400c:c09::244 Subject: [Qemu-devel] [PATCH v3 for 3.0 02/18] docker: base debian-tricore on qemu:debian9 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?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" We need both git and a working compiler to build the tools. Although the qemu:debian9 image also has a bunch of extra dependencies it would be fairly unusual for a user not to already have this layer available for one of our many other docker images so lets not complicate things. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé --- tests/docker/dockerfiles/debian-tricore-cross.docker | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/docker/dockerfiles/debian-tricore-cross.docker b/tests/docker/dockerfiles/debian-tricore-cross.docker index 898b8dd511..180ca646c8 100644 --- a/tests/docker/dockerfiles/debian-tricore-cross.docker +++ b/tests/docker/dockerfiles/debian-tricore-cross.docker @@ -7,7 +7,7 @@ # # SPDX-License-Identifier: GPL-2.0-or-later # -FROM debian:9 +FROM qemu:debian9 MAINTAINER Philippe Mathieu-Daudé From patchwork Tue Jul 17 19:55:38 2018 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: 945326 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=2001:4830:134:3::11; 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="kK2OG/oS"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41VWRT0nSQz9s0w for ; Wed, 18 Jul 2018 06:02:59 +1000 (AEST) Received: from localhost ([::1]:32950 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ffWBV-0008Sf-3t for incoming@patchwork.ozlabs.org; Tue, 17 Jul 2018 16:02:57 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40885) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ffW4q-000324-0p for qemu-devel@nongnu.org; Tue, 17 Jul 2018 15:56:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ffW4l-0004ag-0g for qemu-devel@nongnu.org; Tue, 17 Jul 2018 15:56:04 -0400 Received: from mail-wm0-x22d.google.com ([2a00:1450:400c:c09::22d]:54172) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ffW4k-0004Zz-Q5 for qemu-devel@nongnu.org; Tue, 17 Jul 2018 15:55:58 -0400 Received: by mail-wm0-x22d.google.com with SMTP id s9-v6so535518wmh.3 for ; Tue, 17 Jul 2018 12:55:58 -0700 (PDT) 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=sJyFhxSb2jsgxAypgZ35kWNGgzJsNtTpYMIJenEd1Qs=; b=kK2OG/oSVeTNZfTyVXzofywKnHNTq+WPqCRMl6giUnlN6KNlmHXXmKkDFxuF1kh5Pq NCbOl6djs14Guv1wu2Oi7AXi05FWctWQAD3jFngqBQjGDkjVyOrWv/9VrRGiIvq3viCV WAiH/sZ8RhtbFbXdpk9T9bdbyo+IZPg1Jom8A= 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=sJyFhxSb2jsgxAypgZ35kWNGgzJsNtTpYMIJenEd1Qs=; b=hS/IR84G9CiBpsKZG/irraUe3TvuVjnC52AeT7sdXxyKRleomx+HLEtIvZf6p3VD0x IQKLgmYdXmC/TfbX0MTM1Doq/64BZOEARSKjZZXr+edv7ZcFborpIEs9XQQtRf2Glf4f NA/LP6sxwQxYMhnJth7K72JsJtLV57iObx+2ZdO04PthBRS2/1bLTYT61L/PxR8UPYuL UmMiJMb7jzOG3hiSCeSFsYeQqvSmEGpKODqt53y3wsW+wjIR3+OsD2PznhBIO9FVcaKZ rAMqK7idWjS7M1RYkjJ+SaI6atXRC6b1x+9pMMEdknyGHsNmBSjas5vRpi7o+xyO0NPb oNnw== X-Gm-Message-State: AOUpUlHLHeC7MJRwuqMy0cmFNKv3EJcXUtkgOkCHSo2LO0MCXULwTSqc xZrEOYYc8kN7Hxkl1+ZgwhsxXg== X-Google-Smtp-Source: AAOMgpeA5qXwVQA3tGNNMB6hASIsCr82H90lKn9EM8nmsl23ayYSkv2/T+XOAGmV8OpZW/BtZlX6Yg== X-Received: by 2002:a1c:7908:: with SMTP id l8-v6mr2145501wme.80.1531857357625; Tue, 17 Jul 2018 12:55:57 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id l15-v6sm3401352wrt.67.2018.07.17.12.55.54 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 17 Jul 2018 12:55:55 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 1A1473E04A5; Tue, 17 Jul 2018 20:55:54 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: cota@braap.org, famz@redhat.com, berrange@redhat.com, f4bug@amsat.org, richard.henderson@linaro.org, balrogg@gmail.com, aurelien@aurel32.net, agraf@suse.de Date: Tue, 17 Jul 2018 20:55:38 +0100 Message-Id: <20180717195553.9111-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180717195553.9111-1-alex.bennee@linaro.org> References: <20180717195553.9111-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:400c:c09::22d Subject: [Qemu-devel] [PATCH v3 for 3.0 03/18] docker: par down QEMU_CONFIGURE_OPTS in debian-tricore-cross 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?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" This image isn't going to build anything significant as it is just intended for building test cases. In case it does end up getting inadvertently included in a build lets aim for the minimal possible product. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé --- tests/docker/dockerfiles/debian-tricore-cross.docker | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/docker/dockerfiles/debian-tricore-cross.docker b/tests/docker/dockerfiles/debian-tricore-cross.docker index 180ca646c8..4a0f7706a3 100644 --- a/tests/docker/dockerfiles/debian-tricore-cross.docker +++ b/tests/docker/dockerfiles/debian-tricore-cross.docker @@ -19,5 +19,5 @@ RUN git clone --single-branch \ make && make install && \ rm -rf /usr/src/binutils -# Specify the cross prefix for this image (see tests/docker/common.rc) -ENV QEMU_CONFIGURE_OPTS --cross-prefix=tricore- +# This image isn't designed for building QEMU but building tests +ENV QEMU_CONFIGURE_OPTS --disable-system --disable-user From patchwork Tue Jul 17 19:55:39 2018 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: 945328 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=2001:4830:134:3::11; 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="YH9x2KDl"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41VWRT4RzYz9s4Z for ; Wed, 18 Jul 2018 06:03:01 +1000 (AEST) Received: from localhost ([::1]:32952 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ffWBX-0008Uf-7P for incoming@patchwork.ozlabs.org; Tue, 17 Jul 2018 16:02:59 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40894) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ffW4q-00032b-TK for qemu-devel@nongnu.org; Tue, 17 Jul 2018 15:56:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ffW4m-0004bh-Cv for qemu-devel@nongnu.org; Tue, 17 Jul 2018 15:56:04 -0400 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]:34372) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ffW4m-0004b1-5w for qemu-devel@nongnu.org; Tue, 17 Jul 2018 15:56:00 -0400 Received: by mail-wr1-x42c.google.com with SMTP id c13-v6so2397702wrt.1 for ; Tue, 17 Jul 2018 12:55:59 -0700 (PDT) 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=iuLXyrPnRE4rW5eg+qwTCiglTBSrKh3Lyhji9XKfoz0=; b=YH9x2KDlabgnoiT71hu64OEt2qfKy0sTJyFwH8SOW0d1iKlEEPYoFw8Ze28IaNQQ2Z 6qPsxv0AJOrOyUY+3zqjS6mH6hg3la/TDTKg0T/fqV9QZOWne5/sSJyeeF9NwI7x4C2G Zop2ETdSqMp1lWrFqqdYUSdqQwY15Y5kVkjdA= 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=iuLXyrPnRE4rW5eg+qwTCiglTBSrKh3Lyhji9XKfoz0=; b=grExH4xFCJ2CCNJclR1/PDXELJ0w/C1HHzfpxAzU/RQ9XtL23tlzCIDtG9P7Ck35Do d4b12gmtLbbJGEuFoBj8Wch57z4BOctNM2lQV6qBNuBQZ0CYeQSVeu+WqD46FoyMhPll OdDVgvs77QDKNObyOLdvve3CXNZyH/tQUlzYpCohwp3H7OuOx3GtDGK3+vfHGvxYsN84 szVPBw8zDn1sgbDUKtqGKss8JVJVRNmT6s41wrfKzxOtd1oy35+KJzf8Jh+yze4Akn5u ZAVVev9oZ+sq3T1KEGoicN5oXpnG7pFea1U79BUvaaM7RLsQC+CCkxEbXfDfYKIkmJCK Rqhw== X-Gm-Message-State: AOUpUlHQAus2b3r6mfPRkXCTdFsBeEfXKhpCF5HNQh7cZ4SbbG0lvaGj 8WKvidliHURyLb7pS1MgJcKnsTC7UYo= X-Google-Smtp-Source: AAOMgpc/z9EbuPZou2GDG14brTiFLJ4pcY2U06QTJuN8/A3wVSpRDT8IfR1nWC5WAC4T5XbMtZ8stA== X-Received: by 2002:adf:b112:: with SMTP id l18-v6mr2456648wra.101.1531857358999; Tue, 17 Jul 2018 12:55:58 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id o4-v6sm3254189wra.3.2018.07.17.12.55.54 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 17 Jul 2018 12:55:55 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 2C9213E04D8; Tue, 17 Jul 2018 20:55:54 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: cota@braap.org, famz@redhat.com, berrange@redhat.com, f4bug@amsat.org, richard.henderson@linaro.org, balrogg@gmail.com, aurelien@aurel32.net, agraf@suse.de Date: Tue, 17 Jul 2018 20:55:39 +0100 Message-Id: <20180717195553.9111-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180717195553.9111-1-alex.bennee@linaro.org> References: <20180717195553.9111-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::42c Subject: [Qemu-devel] [PATCH v3 for 3.0 04/18] docker: fail more gracefully on docker.py check 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?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" As this is called directly from the Makefile while determining dependencies and it is possible the user was configured in one window but not have credentials in the other. Let's catch the Exceptions and deal with it quietly. Signed-off-by: Alex Bennée Reported-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé --- tests/docker/docker.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/docker/docker.py b/tests/docker/docker.py index 69e7130db7..2f81c6b13b 100755 --- a/tests/docker/docker.py +++ b/tests/docker/docker.py @@ -479,7 +479,12 @@ class CheckCommand(SubCommand): def run(self, args, argv): tag = args.tag - dkr = Docker() + try: + dkr = Docker() + except: + print("Docker not set up") + return 1 + info = dkr.inspect_tag(tag) if info is None: print("Image does not exist") From patchwork Tue Jul 17 19:55:40 2018 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: 945314 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=2001:4830:134:3::11; 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="NS4d18bQ"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41VWJM5N0pz9s4Z for ; Wed, 18 Jul 2018 05:56:51 +1000 (AEST) Received: from localhost ([::1]:32918 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ffW5Z-00032l-3l for incoming@patchwork.ozlabs.org; Tue, 17 Jul 2018 15:56:49 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40878) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ffW4p-00031g-57 for qemu-devel@nongnu.org; Tue, 17 Jul 2018 15:56:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ffW4o-0004di-Ba for qemu-devel@nongnu.org; Tue, 17 Jul 2018 15:56:03 -0400 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]:42800) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ffW4o-0004cs-4k for qemu-devel@nongnu.org; Tue, 17 Jul 2018 15:56:02 -0400 Received: by mail-wr1-x436.google.com with SMTP id e7-v6so2378169wrs.9 for ; Tue, 17 Jul 2018 12:56:01 -0700 (PDT) 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=29+FvpINvVhXvjWGCsM+H4mEKjX2TikV1CFyP9xq/sU=; b=NS4d18bQ5tdeC69EUsSYPSa4ZvfCGFjV4wrDoGm7kbR/yNUWBMQrI/J0DGs5kTr0xP QRUtP2ZAuXX/ud8mFxaQ5t/INkusP/+NST2w74pbfgbQKHBVzoIC47chTkps3CYlRL4r 6Ixas/f0XA9LOuzRblgzBnuBDn1ZQb9cJ0ApA= 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=29+FvpINvVhXvjWGCsM+H4mEKjX2TikV1CFyP9xq/sU=; b=QZUo7kngcQnyv7XhRnFi/tJjo9r+CJgnT4MYo7wukeysgUftx6fOEFnQQlgPL/X6xT p27pvcjwTsJgLk56CywlqFcfz86vwG2j0ymjRlN7AXXaLSLQIL9oRD81X8QDmFyjbnEz 80hmjYYWnru+F4Me2h4llGQugA7kWgzSGaBtuFAcpi8QPDoGvGOZWM6YLZIw5FkTVP0v 2yv2NRdlPMpryjXyMWeFD1x2qq6KZNFTQcdHa+RbZWIUZRBsE2ZJBeo3Qq13y+GA8NiV ywEsAr7MOyoSi6qumXWjkBPsq9cgogFhPslgqKiZ4pSzUGEH8NsmpjuL+GutKLjl/nus ooPQ== X-Gm-Message-State: AOUpUlG+4na3nMpZXdkXLWCBm/qGTdkvaCxirMSrY7Vv+j11bzlmMwGR OTVIeUYYr6qpHrbN7JzSi7SgWw== X-Google-Smtp-Source: AAOMgpf2H+xAZfNMYUOLgbHQdgTK7cJzpOnGX/Oj7joGEfl66nt02YKAt+3BjF94LilfKCqpmigIeQ== X-Received: by 2002:adf:ac2d:: with SMTP id v42-v6mr2382413wrc.142.1531857360994; Tue, 17 Jul 2018 12:56:00 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id y13-v6sm2941415wrg.5.2018.07.17.12.55.55 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 17 Jul 2018 12:55:56 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 3F9FF3E0600; Tue, 17 Jul 2018 20:55:54 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: cota@braap.org, famz@redhat.com, berrange@redhat.com, f4bug@amsat.org, richard.henderson@linaro.org, balrogg@gmail.com, aurelien@aurel32.net, agraf@suse.de Date: Tue, 17 Jul 2018 20:55:40 +0100 Message-Id: <20180717195553.9111-6-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180717195553.9111-1-alex.bennee@linaro.org> References: <20180717195553.9111-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::436 Subject: [Qemu-devel] [PATCH v3 for 3.0 05/18] docker: split configure_qemu from build_qemu 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?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" This allows some tests that just want to configure QEMU's source tree to do so. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé --- tests/docker/common.rc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/docker/common.rc b/tests/docker/common.rc index 046f8a5921..ba1f942328 100755 --- a/tests/docker/common.rc +++ b/tests/docker/common.rc @@ -21,7 +21,7 @@ requires() done } -build_qemu() +configure_qemu() { config_opts="--enable-werror \ ${TARGET_LIST:+--target-list=${TARGET_LIST}} \ @@ -32,6 +32,11 @@ build_qemu() echo $config_opts $QEMU_SRC/configure $config_opts || \ { cat config.log && test_fail "Failed to run 'configure'"; } +} + +build_qemu() +{ + configure_qemu $@ make $MAKEFLAGS } From patchwork Tue Jul 17 19:55:41 2018 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: 945318 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=2001:4830:134:3::11; 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="DBBC0jlW"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41VWMf1HBmz9s4c for ; Wed, 18 Jul 2018 05:59:42 +1000 (AEST) Received: from localhost ([::1]:32928 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ffW8J-0005eW-Rg for incoming@patchwork.ozlabs.org; Tue, 17 Jul 2018 15:59:39 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40857) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ffW4o-00031b-7R for qemu-devel@nongnu.org; Tue, 17 Jul 2018 15:56:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ffW4n-0004cB-5z for qemu-devel@nongnu.org; Tue, 17 Jul 2018 15:56:02 -0400 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]:34031) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ffW4m-0004be-Vc for qemu-devel@nongnu.org; Tue, 17 Jul 2018 15:56:01 -0400 Received: by mail-wr1-x441.google.com with SMTP id c13-v6so2397730wrt.1 for ; Tue, 17 Jul 2018 12:56:00 -0700 (PDT) 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=dt/YUGiSj2sXUyflEazdFlMWV5/qKTm0TfhMHFSwwIY=; b=DBBC0jlWeL18f/XWW4o5aefeFyj1F/HMrSAhGjN70A/rvqxCj2HDRJKDzVDORIWtN2 cbbnOkrUH/0CTy4oGozYU8gP9zze8tR2CJiAhJ7eWHpV/bmQD2x9nORikhKZAnYSMCr0 jVYjTkuOPm5npW5NHJZB2EYeSFyCApzJ/ZBdk= 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=dt/YUGiSj2sXUyflEazdFlMWV5/qKTm0TfhMHFSwwIY=; b=qJUKZac7vb7Z0d3pATzhIezSa4ryMHxO1TMN71Wgd5KTKGLltuf4beD88qAwoxZFWn O4MA7Dykv5e8M5eAEvmVQ+i8G7Az10FK32JdHZJpNc/BTx7HuOdXmHF2erk3QGpWIlbA Kp5blWqwe8Bkg+BMT9UEceaaIPfNuHvPVW3Rs1oh6AzdXabEvELJKxxOLDrpmYvHnlVW pN7Z1AY5buC5gr4thyiaZggVlvI+hq3fnI3JxXBvMwsXRVsq68FeI+ZNmyEl96dcnl5O APZCvSWpPjXE8KyrRMOgdMb0TaPtQIKgG4lmf6YIDTq+BQxQkhVkA7T/K1Pa0KKf6Wld 45lQ== X-Gm-Message-State: AOUpUlGndTGoCYvaWTUc4CkO/wz5wjwF4ZrCeuMM0VhF12pO4N9UrPFh 35iQ/qmVPcF/rq5upbD4dXW/ww== X-Google-Smtp-Source: AAOMgpdZ6AX4iUsm8dF9FXEpJ81uXzdxPpeekhHc9kbSVMdv7SZ90dGf9N8bMq1GSHDTymJnV4Eqbg== X-Received: by 2002:adf:96b2:: with SMTP id u47-v6mr2374531wrb.204.1531857359784; Tue, 17 Jul 2018 12:55:59 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id i6-v6sm3247799wrr.10.2018.07.17.12.55.55 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 17 Jul 2018 12:55:56 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 56FC83E060C; Tue, 17 Jul 2018 20:55:54 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: cota@braap.org, famz@redhat.com, berrange@redhat.com, f4bug@amsat.org, richard.henderson@linaro.org, balrogg@gmail.com, aurelien@aurel32.net, agraf@suse.de Date: Tue, 17 Jul 2018 20:55:41 +0100 Message-Id: <20180717195553.9111-7-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180717195553.9111-1-alex.bennee@linaro.org> References: <20180717195553.9111-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::441 Subject: [Qemu-devel] [PATCH v3 for 3.0 06/18] docker: move make check into check_qemu helper 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?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Not all docker images can run the check step. Let's move everything into a common helper so we don't need to replicate checks in the future. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé --- v2 - add "move" to Let's everything in commit message v3 - avoid confusion using IVOCATION, add comment --- tests/docker/common.rc | 11 +++++++++++ tests/docker/test-clang | 2 +- tests/docker/test-debug | 2 +- tests/docker/test-full | 2 +- tests/docker/test-quick | 2 +- 5 files changed, 15 insertions(+), 4 deletions(-) diff --git a/tests/docker/common.rc b/tests/docker/common.rc index ba1f942328..4ff5974016 100755 --- a/tests/docker/common.rc +++ b/tests/docker/common.rc @@ -40,6 +40,17 @@ build_qemu() make $MAKEFLAGS } +check_qemu() +{ + # default to make check unless the caller specifies + if test -z "$@"; then + INVOCATION="check" + else + INVOCATION="$@" + fi + make $MAKEFLAGS $INVOCATION +} + test_fail() { echo "$@" diff --git a/tests/docker/test-clang b/tests/docker/test-clang index e90a793178..324e341cea 100755 --- a/tests/docker/test-clang +++ b/tests/docker/test-clang @@ -23,5 +23,5 @@ OPTS="--cxx=clang++ --cc=clang --host-cc=clang" #OPTS="$OPTS --extra-cflags=-fsanitize=undefined \ #--extra-cflags=-fno-sanitize=float-divide-by-zero" build_qemu $OPTS -make $MAKEFLAGS check +check_qemu install_qemu diff --git a/tests/docker/test-debug b/tests/docker/test-debug index d3f9f70d01..137f4f2ddc 100755 --- a/tests/docker/test-debug +++ b/tests/docker/test-debug @@ -22,5 +22,5 @@ OPTS="--cxx=clang++ --cc=clang --host-cc=clang" OPTS="--enable-debug --enable-sanitizers $OPTS" build_qemu $OPTS -make $MAKEFLAGS V=1 check +check_qemu check V=1 install_qemu diff --git a/tests/docker/test-full b/tests/docker/test-full index b4e42d25d7..aadc0f00a2 100755 --- a/tests/docker/test-full +++ b/tests/docker/test-full @@ -15,4 +15,4 @@ cd "$BUILD_DIR" -build_qemu && make check $MAKEFLAGS && install_qemu +build_qemu && check_qemu && install_qemu diff --git a/tests/docker/test-quick b/tests/docker/test-quick index 3b7bce6105..eee59c55fb 100755 --- a/tests/docker/test-quick +++ b/tests/docker/test-quick @@ -18,5 +18,5 @@ cd "$BUILD_DIR" DEF_TARGET_LIST="x86_64-softmmu,aarch64-softmmu" TARGET_LIST=${TARGET_LIST:-$DEF_TARGET_LIST} \ build_qemu -make check $MAKEFLAGS +check_qemu install_qemu From patchwork Tue Jul 17 19:55:42 2018 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: 945330 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=2001:4830:134:3::11; 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="ZsU9sW9T"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41VWWG1R7bz9s0w for ; Wed, 18 Jul 2018 06:06:18 +1000 (AEST) Received: from localhost ([::1]:32969 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ffWEh-0002t2-QK for incoming@patchwork.ozlabs.org; Tue, 17 Jul 2018 16:06:15 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40938) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ffW4u-00035i-Fy for qemu-devel@nongnu.org; Tue, 17 Jul 2018 15:56:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ffW4t-0004kb-FK for qemu-devel@nongnu.org; Tue, 17 Jul 2018 15:56:08 -0400 Received: from mail-wm0-x229.google.com ([2a00:1450:400c:c09::229]:39837) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ffW4t-0004jq-74 for qemu-devel@nongnu.org; Tue, 17 Jul 2018 15:56:07 -0400 Received: by mail-wm0-x229.google.com with SMTP id h20-v6so535299wmb.4 for ; Tue, 17 Jul 2018 12:56:07 -0700 (PDT) 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=+2e1Bs5YjRDAe3PB5UShWvIGvDyTiPEr13O3nZ4dD6U=; b=ZsU9sW9T1MJuEFuvbFe/q0i5tiTOtfZXfRTQBV4yaJKkM00wlIj2NAnhtl00SIzndh LMZjqmcLNfYVNzQIC4Jc5uHufzR5kjXPXCXFW6gLf7c27MF2m5NEelI6zEH5BcrkaJxl zAh77Fuqq7iyns2XDQKjFsPtv2M0YXY2bClq0= 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=+2e1Bs5YjRDAe3PB5UShWvIGvDyTiPEr13O3nZ4dD6U=; b=UHV/dDU+Rz0cagLbyA+LzltFOrYw8Ar8pMTujoiRBUjx0FRvKsCQ71yvQNNZEiZCCg Yh7LyThnm0IyxUXMEHrWjx7lfAISNb/D4FzLcsGOM7ysZAAe1dSh6eTDBqnRPnFVbVW0 3ZdDsKfRQCmQr4V7KW09jAzSJ5yJ9y2hOCZnPlnYsCjfdsfDP31qUikeF9P367fU45Z0 mvk3UjsrNDLHLOFUg3e32GEzIF1nnBBp6zKmALyFt15tsHsyBO27h1+dezo4zTePdx1M 6SqhkjqfmhhzxM1Q0inBbGoiTCdHXpJefHFqSqUooDhPyDnMMVYf+6Hl1akhDGQQT6oS lNDg== X-Gm-Message-State: AOUpUlFe5bCqb3lmIG7GImKysu55wwXc0WESvJzF6/WmtdXCu7/NMpOl 2s4euG24nNSOZ/7QZk9aMa0Srw== X-Google-Smtp-Source: AAOMgpf2STW6rQnTvYSfEABmIyXSEyFQiMWGPDm1lE1AyA7EDnxINiIydWjqIgXI5PMP0YpSQnf+XQ== X-Received: by 2002:a1c:13ca:: with SMTP id 193-v6mr2113265wmt.127.1531857366006; Tue, 17 Jul 2018 12:56:06 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id w204-v6sm395948wmw.17.2018.07.17.12.55.56 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 17 Jul 2018 12:56:01 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 69FDA3E06DE; Tue, 17 Jul 2018 20:55:54 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: cota@braap.org, famz@redhat.com, berrange@redhat.com, f4bug@amsat.org, richard.henderson@linaro.org, balrogg@gmail.com, aurelien@aurel32.net, agraf@suse.de Date: Tue, 17 Jul 2018 20:55:42 +0100 Message-Id: <20180717195553.9111-8-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180717195553.9111-1-alex.bennee@linaro.org> References: <20180717195553.9111-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:400c:c09::229 Subject: [Qemu-devel] [PATCH v3 for 3.0 07/18] docker: gracefully skip check_qemu 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?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Not all our images are able to run the tests. Rather than use features we can just check for the existence and run-ability of gtester. If the image has been setup for binfmt_misc it will be able to run anyway. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé --- v3 - use command -v in preference to bash-ist type --- tests/docker/common.rc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/docker/common.rc b/tests/docker/common.rc index 4ff5974016..4011561587 100755 --- a/tests/docker/common.rc +++ b/tests/docker/common.rc @@ -48,7 +48,13 @@ check_qemu() else INVOCATION="$@" fi - make $MAKEFLAGS $INVOCATION + + if command -v gtester > /dev/null 2>&1 && \ + gtester --version > /dev/null 2>&1; then + make $MAKEFLAGS $INVOCATION + else + echo "No working gtester, skipping make $INVOCATION" + fi } test_fail() From patchwork Tue Jul 17 19:55:43 2018 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: 945317 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=2001:4830:134:3::11; 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="MAAEuxTo"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41VWJS45Qbz9s0w for ; Wed, 18 Jul 2018 05:56:56 +1000 (AEST) Received: from localhost ([::1]:32920 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ffW5e-00037G-5I for incoming@patchwork.ozlabs.org; Tue, 17 Jul 2018 15:56:54 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40926) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ffW4t-00035G-9W for qemu-devel@nongnu.org; Tue, 17 Jul 2018 15:56:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ffW4s-0004jX-Ce for qemu-devel@nongnu.org; Tue, 17 Jul 2018 15:56:07 -0400 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]:41021) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ffW4s-0004in-4q for qemu-devel@nongnu.org; Tue, 17 Jul 2018 15:56:06 -0400 Received: by mail-wr1-x42e.google.com with SMTP id j5-v6so2374598wrr.8 for ; Tue, 17 Jul 2018 12:56:05 -0700 (PDT) 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=0IPXTrop7rPReXH+K6Q0fwVmBrGTlOGdwTFq1ND5Emg=; b=MAAEuxToWtzSkZ48mEc4b62c2P+MnE2nPEoecRIoUvZujBi0enD+Rv5JZczMDGBGka 4heCnIN7Xu2WYM18CdTJGUd5iPiar5RKTnD/nuLRN/0iuzY1sEvaJXJoDFgrA1Zu/dXi j9YX4N+lyMjtjAWpBm1TiDC9r9KFbrVxgVme8= 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=0IPXTrop7rPReXH+K6Q0fwVmBrGTlOGdwTFq1ND5Emg=; b=La8K8VEAu9zUuaB+RUEaIgVvXwX7NbVXAx7+nF7xylT9exJEavH5x8ylJyz3XYL0QF eHWqTD0i4wemI6kBljiqwZHGs0yq8ftOWuoU6lHhW+S861OkFd7EjlHWQcpgzBbPBsdb dsK/IcO26eZMy/m5IpjXZCyQUpaFYNSy+Jo3vH06EGNxkQ9McFFDyAGbnvwQSOKCYtc8 URxbEfhsy6UOg5TqxPMB2eO9Cpr/I7jLow3sGZ/Mk1nVFi22KFn04oIYYLy3DW9nzlyq Eq2Iz7EywLkHsmUdh3LCM/ILxbP4MOeSWK/HbBIgpNpkWUVDXWzwVzHN8Wl3pgB7vqv0 iw1Q== X-Gm-Message-State: AOUpUlF82HwMk7iOOeLlzl0g/8vHNiU3pMf8294bOvi7iaTOv1Fzf0KI jy2kfcMniGnTW6e7EuTk7HYsgQ== X-Google-Smtp-Source: AAOMgpcPJ27V8RVocNjGONFv5eIeYWTWijzuSMRaMjYtoAR6Y4T1vsqzJBrIemY6eXwxb7Yywp4rbg== X-Received: by 2002:adf:ac2d:: with SMTP id v42-v6mr2382535wrc.142.1531857364867; Tue, 17 Jul 2018 12:56:04 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id l10-v6sm4059248wrv.23.2018.07.17.12.55.56 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 17 Jul 2018 12:56:01 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 7C6253E06E0; Tue, 17 Jul 2018 20:55:54 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: cota@braap.org, famz@redhat.com, berrange@redhat.com, f4bug@amsat.org, richard.henderson@linaro.org, balrogg@gmail.com, aurelien@aurel32.net, agraf@suse.de Date: Tue, 17 Jul 2018 20:55:43 +0100 Message-Id: <20180717195553.9111-9-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180717195553.9111-1-alex.bennee@linaro.org> References: <20180717195553.9111-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::42e Subject: [Qemu-devel] [PATCH v3 for 3.0 08/18] docker: Makefile.include don't include partial 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: =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Rename DOCKER_INTERMEDIATE_IMAGES to DOCKER_PARTIAL_IMAGES and add the incomplete cross compiler images that can build tests but can't build QEMU itself. We also add debian, debian-bootstrap and the tricode images to the list. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé --- tests/docker/Makefile.include | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include index b2a7e761cc..09fb7db7fa 100644 --- a/tests/docker/Makefile.include +++ b/tests/docker/Makefile.include @@ -6,7 +6,7 @@ DOCKER_SUFFIX := .docker DOCKER_FILES_DIR := $(SRC_PATH)/tests/docker/dockerfiles DOCKER_DEPRECATED_IMAGES := debian # we don't run tests on intermediate images (used as base by another image) -DOCKER_INTERMEDIATE_IMAGES := debian8 debian9 debian8-mxe debian-ports debian-sid +DOCKER_PARTIAL_IMAGES := debian debian8 debian9 debian8-mxe debian-ports debian-sid debian-bootstrap DOCKER_IMAGES := $(filter-out $(DOCKER_DEPRECATED_IMAGES),$(sort $(notdir $(basename $(wildcard $(DOCKER_FILES_DIR)/*.docker))))) DOCKER_TARGETS := $(patsubst %,docker-image-%,$(DOCKER_IMAGES)) # Use a global constant ccache directory to speed up repetitive builds @@ -121,6 +121,11 @@ docker-image-travis: NOUSER=1 # Specialist build images, sometimes very limited tools docker-image-tricore-cross: docker-image-debian9 +# These images may be good enough for building tests but not for test builds +DOCKER_PARTIAL_IMAGES += debian-alpha-cross debian-hppa-cross debian-m68k-cross debian-sh4-cross +DOCKER_PARTIAL_IMAGES += debian-sparc64-cross debian-mips64-cross debian-riscv64-cross +DOCKER_PARTIAL_IMAGES += debian-tricore-cross debian-powerpc-cross fedora-i386-cross + # Rules for building linux-user powered images # # These are slower than using native cross compiler setups but can @@ -137,7 +142,7 @@ docker-image-debian-powerpc-user-cross: docker-binfmt-image-debian-powerpc-user DOCKER_USER_IMAGES += debian-powerpc-user # Expand all the pre-requistes for each docker image and test combination -$(foreach i,$(filter-out $(DOCKER_INTERMEDIATE_IMAGES),$(DOCKER_IMAGES) $(DOCKER_DEPRECATED_IMAGES)), \ +$(foreach i,$(filter-out $(DOCKER_PARTIAL_IMAGES),$(DOCKER_IMAGES) $(DOCKER_DEPRECATED_IMAGES)), \ $(foreach t,$(DOCKER_TESTS) $(DOCKER_TOOLS), \ $(eval .PHONY: docker-$t@$i) \ $(eval docker-$t@$i: docker-image-$i docker-run-$t@$i) \ From patchwork Tue Jul 17 19:55:44 2018 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: 945327 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=2001:4830:134:3::11; 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="Ryqyokb2"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41VWRT0nTyz9s3R for ; Wed, 18 Jul 2018 06:02:59 +1000 (AEST) Received: from localhost ([::1]:32949 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ffWBU-0008Rt-Dj for incoming@patchwork.ozlabs.org; Tue, 17 Jul 2018 16:02:56 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40971) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ffW4z-00039p-94 for qemu-devel@nongnu.org; Tue, 17 Jul 2018 15:56:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ffW4v-0004mR-Fn for qemu-devel@nongnu.org; Tue, 17 Jul 2018 15:56:13 -0400 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]:41857) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ffW4v-0004lb-8X for qemu-devel@nongnu.org; Tue, 17 Jul 2018 15:56:09 -0400 Received: by mail-wr1-x443.google.com with SMTP id j5-v6so2374720wrr.8 for ; Tue, 17 Jul 2018 12:56:09 -0700 (PDT) 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=fVqeXhM61TiuO/vZ73b3s7Nu/fdrSV2cD3YqcWkiRgQ=; b=Ryqyokb2MWStzY5fkuDbW24bEHOdqCrHb4CKzEbKLXvtYKXfYYSSqh3Nb/GKetpIkm y9Wo8OY5/1rLEAfEUTs1rzz4Bt98ge9wzgnZyvqyT/JLzTstOGih3QEy3hYuosmxEYKV luBiM2++EjJlSgUDuljSTcVUDPVihFa30tGwY= 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=fVqeXhM61TiuO/vZ73b3s7Nu/fdrSV2cD3YqcWkiRgQ=; b=MdPJys/d5glzaM5M/MkS3UYIIvVYnNtF7Q4OK3VCpukMJ6+SP7/yU6zwYLI+1rm85I z6N7bKoNPi5iRbdSJF7xnKiba4eQ1rwfyJEMdk/0jUcWpX/MdTF1NyEcrhWcyn8Hgsou svZZbUaUbmqxUt9Qe9Hgh0oOntjt+m+ChZyWCj8xECk2S3n9hKt6p2yreUxJGc39L7Dp qe6wkLXb8dOSR18D9YuIkVGK3qLkwQKTqEf8IJgkCpM/X9o7s/HlIEunz4vXqaQEUrS3 bmt8bk35w5vm2RZJwJmAZv3QjcVavjSK6bAv1SnEFd53381exhtpY6uk8pKwe85UhMxR Rviw== X-Gm-Message-State: AOUpUlHpGH83BQqpsruG4unS0DT09lk2zH8IUm3tIR7DjJOZeh31OyfR 2YdAtLE9aR48qyC16NxzISJOOQ== X-Google-Smtp-Source: AAOMgpf1vJyXWj0LesmqogC3EuB5rDK9DJwb1PglXssdCZxjRkF914uPcuXg69IBMCVSe05y2CKEMw== X-Received: by 2002:adf:9d1c:: with SMTP id k28-v6mr2442025wre.29.1531857368153; Tue, 17 Jul 2018 12:56:08 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id u4-v6sm3349942wrt.31.2018.07.17.12.55.57 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 17 Jul 2018 12:56:01 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 8F08B3E06EA; Tue, 17 Jul 2018 20:55:54 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: cota@braap.org, famz@redhat.com, berrange@redhat.com, f4bug@amsat.org, richard.henderson@linaro.org, balrogg@gmail.com, aurelien@aurel32.net, agraf@suse.de Date: Tue, 17 Jul 2018 20:55:44 +0100 Message-Id: <20180717195553.9111-10-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180717195553.9111-1-alex.bennee@linaro.org> References: <20180717195553.9111-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 v3 for 3.0 09/18] docker: disable debian-powerpc-user-cross 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: qemu-ppc@nongnu.org, =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org, David Gibson Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" While we can build we can't run the unit tests due to a missing system call (249 - swapcontext). This could be a code generation issue as other architectures don't seem to have this system call. Signed-off-by: Alex Bennée Tested-by: Philippe Mathieu-Daudé Cc: David Gibson Cc: Alexander Graf Cc: qemu-ppc@nongnu.org --- tests/docker/Makefile.include | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include index 09fb7db7fa..fe63aacf69 100644 --- a/tests/docker/Makefile.include +++ b/tests/docker/Makefile.include @@ -140,6 +140,9 @@ docker-binfmt-image-debian-powerpc-user: QEMU_TARGET = ppc-linux-user docker-binfmt-image-debian-powerpc-user: EXECUTABLE = ${BUILD_DIR}/ppc-linux-user/qemu-ppc docker-image-debian-powerpc-user-cross: docker-binfmt-image-debian-powerpc-user DOCKER_USER_IMAGES += debian-powerpc-user +# Unfortunalty while we can build with this image we can't run unit +# tests due to missing system call: 249 which causes an abort +DOCKER_PARTIAL_IMAGES += debian-powerpc-user-cross # Expand all the pre-requistes for each docker image and test combination $(foreach i,$(filter-out $(DOCKER_PARTIAL_IMAGES),$(DOCKER_IMAGES) $(DOCKER_DEPRECATED_IMAGES)), \ From patchwork Tue Jul 17 19:55:45 2018 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: 945322 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=2001:4830:134:3::11; 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="bWf5H1uq"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41VWMp5msrz9s4c for ; Wed, 18 Jul 2018 05:59:50 +1000 (AEST) Received: from localhost ([::1]:32933 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ffW8S-0005mY-EG for incoming@patchwork.ozlabs.org; Tue, 17 Jul 2018 15:59:48 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40914) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ffW4s-00033u-4v for qemu-devel@nongnu.org; Tue, 17 Jul 2018 15:56:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ffW4r-0004iT-86 for qemu-devel@nongnu.org; Tue, 17 Jul 2018 15:56:06 -0400 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]:35307) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ffW4r-0004hU-1e for qemu-devel@nongnu.org; Tue, 17 Jul 2018 15:56:05 -0400 Received: by mail-wr1-x443.google.com with SMTP id a3-v6so2390104wrt.2 for ; Tue, 17 Jul 2018 12:56:04 -0700 (PDT) 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=q0tIQwCUMfDfDvaDmnBY9FLc57UmCoUBHB+PkCRBiOo=; b=bWf5H1uqZjwLPWqIVBuaNrEx26HttnC6C8imB+M1DFZwCCTE+arARkuFCFHPXRsEir 9UAxENkUbTtPkWx0/iVVt+5dYb8e8gmGMiQjzk+NlcsjF/epMDRKm76qHWfbZRl9rOLa bjVO/wQYl5pkqhQ20P9VEyyBI2RChnKo27RhE= 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=q0tIQwCUMfDfDvaDmnBY9FLc57UmCoUBHB+PkCRBiOo=; b=P2u1RmKNpSUlgk6JNwU+sWaLqJZZhCxnL7QAb04dxJuZpRR5P3HGLSzG56OChTIxvu qMoS9EO4uW60edrS/zKtCkRDwcgVX5+F3ddEB8h8QZP9dAsee3+550mjZxeFbjqbRirI gLUG72n0QopNvkoMT4t2It7IOhwUQRqQluR+CgWXmxNmEMoAvMoKHjFcDawrfRUC/PYp clgrEgGjNiQjK2PMHXt9XfhuKaom6a0TBNLwsBcTqdfulCXfv3c3LdGcvviN9AuYSeRp wJc3iSQCL0Sh5iI0wZ0m8g7ZeVdMYGcez5/ItkG8VMSJ2uEVr0BTlhgUtnGgfggBC9t9 KVHg== X-Gm-Message-State: AOUpUlFaQTHPQa6aSAKry2PIhh5IerNNEt/ziI2oqjrfJABWLGrgN+co EHtRl46InEsjAGax/GfmU9yA5Q== X-Google-Smtp-Source: AAOMgpfl7bqx40dMwLdvmMqy8lHEO24Q41aGC9yRdg9vQb2lUIbkIy2bnSGAvJQ6WrCicbh82Q5YvA== X-Received: by 2002:adf:8385:: with SMTP id 5-v6mr2340448wre.13.1531857363869; Tue, 17 Jul 2018 12:56:03 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id t184-v6sm637141wmf.18.2018.07.17.12.55.57 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 17 Jul 2018 12:56:01 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id A17643E075F; Tue, 17 Jul 2018 20:55:54 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: cota@braap.org, famz@redhat.com, berrange@redhat.com, f4bug@amsat.org, richard.henderson@linaro.org, balrogg@gmail.com, aurelien@aurel32.net, agraf@suse.de Date: Tue, 17 Jul 2018 20:55:45 +0100 Message-Id: <20180717195553.9111-11-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180717195553.9111-1-alex.bennee@linaro.org> References: <20180717195553.9111-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 v3 for 3.0 10/18] docker: add test-unit runner 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?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" This test doesn't even build QEMU, it just builds and runs all the unit tests. Intended to make checking unit tests on all docker images easier. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé --- v2 - make script -e to error out on failure - add comment as to why the configure step is run --- tests/docker/test-unit | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 tests/docker/test-unit diff --git a/tests/docker/test-unit b/tests/docker/test-unit new file mode 100755 index 0000000000..8905d01150 --- /dev/null +++ b/tests/docker/test-unit @@ -0,0 +1,21 @@ +#!/bin/bash -e +# +# Build and run the unit tests +# +# Copyright (c) 2018 Linaro Ltd. +# +# Authors: +# Alex Bennée +# +# This work is licensed under the terms of the GNU GPL, version 2 +# or (at your option) any later version. See the COPYING file in +# the top-level directory. + +. common.rc + +cd "$BUILD_DIR" + +# although we are not building QEMU itself we still need a configured +# build for the unit tests to be built and run +configure_qemu +check_qemu check-unit From patchwork Tue Jul 17 19:55:46 2018 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: 945319 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=2001:4830:134:3::11; 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="QsXirsZZ"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41VWMf389bz9s7Q for ; Wed, 18 Jul 2018 05:59:42 +1000 (AEST) Received: from localhost ([::1]:32930 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ffW8K-0005fF-64 for incoming@patchwork.ozlabs.org; Tue, 17 Jul 2018 15:59:40 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40904) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ffW4r-000335-Ed for qemu-devel@nongnu.org; Tue, 17 Jul 2018 15:56:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ffW4q-0004hh-K3 for qemu-devel@nongnu.org; Tue, 17 Jul 2018 15:56:05 -0400 Received: from mail-wm0-x233.google.com ([2a00:1450:400c:c09::233]:51925) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ffW4q-0004g4-CT for qemu-devel@nongnu.org; Tue, 17 Jul 2018 15:56:04 -0400 Received: by mail-wm0-x233.google.com with SMTP id h3-v6so128529wmb.1 for ; Tue, 17 Jul 2018 12:56:04 -0700 (PDT) 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=3JPvvh5QXlLcGMWUhLyblX++7+0qWrYLLcmiVFowQzA=; b=QsXirsZZhIyVdEo972cvlPS+zT6nV1b+IYErMDy8QaJWudFr9Xtz0udYFzSdEXewSn HCBr7BWnd2brVRp5dGzNKX8NFetDhqTni83lE+ijRFlOuxkgd07LN7TBaMC+DUl7B20/ d6Ik4fUK3lT2GrM8VILvYfs6CMeu0xtT3pKtY= 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=3JPvvh5QXlLcGMWUhLyblX++7+0qWrYLLcmiVFowQzA=; b=VgPTFOgWPpamgB1EPeZVv0JFDOE5+mwI2SryZvymYZjBRlcXO/3/XDV0fywRDzWC+K Ez32zVj4YRNSnbRh1zk9E0iS8brwHXF2Oo+LuFL/pgRj+8eRZxBs8XvmLAlLq5/Fs6HN IFOPrWUKycad+33OYTK8+XGwYgwJKEpruDV0Sr2todWS5DvJllO9mVjLT1BjWxL1BiOw rygZdhbLJeKHFz33PPKK2OCd2PtCvnq0JqDJgL1JvYFTinAWomGfizIxlxQtH/nqZUC8 nWC+wOJovq4mQ59JI/gOed0PlNjV0B2RHg1RYEZkDn4GefuyIeQU7XJbdJe0blUa0ibe sPlg== X-Gm-Message-State: AOUpUlEjUJ475TJGIVbcc+Niq7NDz43FKdIK72DhI9MG4yRfOM0VsWIR 67ZiAW4FEAHOGFmWWDcL4IeTgg== X-Google-Smtp-Source: AAOMgpfNut7AwT//mE+fDCQ5R6L/sooqXpkkf1ArnelrfpekE8EwNX5bqcL9l3w2rQglUMZAaSgeog== X-Received: by 2002:a1c:ac44:: with SMTP id v65-v6mr2093447wme.25.1531857363098; Tue, 17 Jul 2018 12:56:03 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id f18-v6sm2476019wrt.64.2018.07.17.12.55.57 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 17 Jul 2018 12:56:01 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id B4BB13E0BBB; Tue, 17 Jul 2018 20:55:54 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: cota@braap.org, famz@redhat.com, berrange@redhat.com, f4bug@amsat.org, richard.henderson@linaro.org, balrogg@gmail.com, aurelien@aurel32.net, agraf@suse.de Date: Tue, 17 Jul 2018 20:55:46 +0100 Message-Id: <20180717195553.9111-12-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180717195553.9111-1-alex.bennee@linaro.org> References: <20180717195553.9111-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:400c:c09::233 Subject: [Qemu-devel] [PATCH v3 for 3.0 11/18] docker: add expansion for docker-test-FOO to Makefile.include 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?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" This allows us to run a particular test on all docker images. For example: make docker-test-unit Will run the unit tests on every supported image. At the same time rename docker-test to docker-all-tests to be clearer. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé --- v2 - docker-test -> docker-all-tests --- tests/docker/Makefile.include | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include index fe63aacf69..e32c35be0d 100644 --- a/tests/docker/Makefile.include +++ b/tests/docker/Makefile.include @@ -151,7 +151,8 @@ $(foreach i,$(filter-out $(DOCKER_PARTIAL_IMAGES),$(DOCKER_IMAGES) $(DOCKER_DEPR $(eval docker-$t@$i: docker-image-$i docker-run-$t@$i) \ ) \ $(foreach t,$(DOCKER_TESTS), \ - $(eval docker-test: docker-$t@$i) \ + $(eval docker-all-tests: docker-$t@$i) \ + $(eval docker-$t: docker-$t@$i) \ ) \ ) @@ -161,7 +162,8 @@ docker: @echo 'Available targets:' @echo @echo ' docker: Print this help.' - @echo ' docker-test: Run all image/test combinations.' + @echo ' docker-all-tests: Run all image/test combinations.' + @echo ' docker-TEST: Run TEST on all image combinations.' @echo ' docker-clean: Kill and remove residual docker testing containers.' @echo ' docker-TEST@IMAGE: Run "TEST" in container "IMAGE".' @echo ' Note: "TEST" is one of the listed test name,' From patchwork Tue Jul 17 19:55:47 2018 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: 945332 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=2001:4830:134:3::11; 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="ZGfr5WDf"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41VWZ53hFgz9s3R for ; Wed, 18 Jul 2018 06:08:43 +1000 (AEST) Received: from localhost ([::1]:32981 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ffWH2-0004H2-Ec for incoming@patchwork.ozlabs.org; Tue, 17 Jul 2018 16:08:40 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40969) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ffW4z-00039h-4J for qemu-devel@nongnu.org; Tue, 17 Jul 2018 15:56:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ffW4u-0004lN-FZ for qemu-devel@nongnu.org; Tue, 17 Jul 2018 15:56:13 -0400 Received: from mail-wm0-x243.google.com ([2a00:1450:400c:c09::243]:33080) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ffW4u-0004kl-8u for qemu-devel@nongnu.org; Tue, 17 Jul 2018 15:56:08 -0400 Received: by mail-wm0-x243.google.com with SMTP id z6-v6so13357279wma.0 for ; Tue, 17 Jul 2018 12:56:08 -0700 (PDT) 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=ijZLzag+tuxX50+7VFzVKtmQJvhoutHNmggbjMrVO88=; b=ZGfr5WDfkp2buIlchgcKNoOELwiv4w3Ja6BJxsU70urkLUcQ2DVfHVgKNh2w0JnI7x DYxMxO6xBF7tMponmDWTMyJyZ5+8iCljT4jOq9E1Vz63KxxxOlUWuoiIgIpv88IqyA5X 0B8p/EPGVT3eXWIZgct81D35Vmmi72V2LjxhA= 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=ijZLzag+tuxX50+7VFzVKtmQJvhoutHNmggbjMrVO88=; b=sz7z0JB7Ws41I69HVdTXVx+0crhYnzh6lPcC28WaBUi9rstXQOTzW/BN8mcHgTlNM6 cFbReuHzxTp0DS5p6PKiNkEAxNd6dMMH635dwws5wJ/mSaiB6khR/g6LVzPXOjt+6Izh G/HeCcGE5qOk5PM8ylmzU+AHlt59Gfri8wZM98Z4JilWrHQO2CajBl0urvtyb/T7CVjf 6OvEbdf45Vss5tB0SXtd6aWAwB/wqkoFcdla9X9CSnDa0lOoYkF3Hy9W6mSFJhvfYUh+ tHKpbjbBHsuoRYt/ttLrhcFrTpRdAP7XGgyjJm++pCO5MYhablF18MOH9murJC+veHco egBA== X-Gm-Message-State: AOUpUlGXRYM1fW2wE26+Y1czKrp4z4wAh8lzlxUzKxKCapiDWzjMtiVb n7paDkq56MdIqzd/UTL724gjvw== X-Google-Smtp-Source: AAOMgpcxvD9HuG3+c7I64O2if38JlyP1alt+jlBQlEy2EidyZnjyhihe4Dqqb7she2QGL9Gk6EMPjg== X-Received: by 2002:a1c:aa8f:: with SMTP id t137-v6mr2130694wme.54.1531857367058; Tue, 17 Jul 2018 12:56:07 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id e7-v6sm3811853wrm.14.2018.07.17.12.55.57 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 17 Jul 2018 12:56:01 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id C787A3E0BBD; Tue, 17 Jul 2018 20:55:54 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: cota@braap.org, famz@redhat.com, berrange@redhat.com, f4bug@amsat.org, richard.henderson@linaro.org, balrogg@gmail.com, aurelien@aurel32.net, agraf@suse.de Date: Tue, 17 Jul 2018 20:55:47 +0100 Message-Id: <20180717195553.9111-13-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180717195553.9111-1-alex.bennee@linaro.org> References: <20180717195553.9111-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:400c:c09::243 Subject: [Qemu-devel] [PATCH v3 for 3.0 12/18] docker: drop QEMU_TARGET check, fallback in EXECUTABLE not set 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?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" The addition of QEMU_TARGET was intended to ensure we fall back to checking for the existence of an image if the build system was not currently configured to build it. However this breaks the direct use of the rule for building custom binfmt_misc images. We already check for EXECUTABLE so let us just use that as a proxy for deciding if we are just going to check the image exits. Signed-off-by: Alex Bennée Tested-by: Philippe Mathieu-Daudé --- tests/docker/Makefile.include | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include index e32c35be0d..ec23620153 100644 --- a/tests/docker/Makefile.include +++ b/tests/docker/Makefile.include @@ -58,13 +58,11 @@ docker-image-%: $(DOCKER_FILES_DIR)/%.docker docker-binfmt-image-debian-%: $(DOCKER_FILES_DIR)/debian-bootstrap.docker $(if $(EXECUTABLE),,\ $(error EXECUTABLE not set, debootstrap of debian-$* would fail)) - $(if $(wildcard $(EXECUTABLE)),,\ - $(error Please build $(EXECUTABLE) first)) $(if $(DEB_ARCH),,\ $(error DEB_ARCH not set, debootstrap of debian-$* would fail)) $(if $(DEB_TYPE),,\ $(error DEB_TYPE not set, debootstrap of debian-$* would fail)) - $(if $(filter $(QEMU_TARGET),$(TARGET_DIRS)), \ + $(if $(wildcard $(EXECUTABLE)), \ $(call quiet-command, \ DEB_ARCH=$(DEB_ARCH) \ DEB_TYPE=$(DEB_TYPE) \ @@ -136,7 +134,6 @@ DOCKER_PARTIAL_IMAGES += debian-tricore-cross debian-powerpc-cross fedora-i386-c # broken so we need a qemu-linux-user for this target docker-binfmt-image-debian-powerpc-user: DEB_ARCH = powerpc docker-binfmt-image-debian-powerpc-user: DEB_TYPE = jessie -docker-binfmt-image-debian-powerpc-user: QEMU_TARGET = ppc-linux-user docker-binfmt-image-debian-powerpc-user: EXECUTABLE = ${BUILD_DIR}/ppc-linux-user/qemu-ppc docker-image-debian-powerpc-user-cross: docker-binfmt-image-debian-powerpc-user DOCKER_USER_IMAGES += debian-powerpc-user From patchwork Tue Jul 17 19:55:48 2018 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: 945336 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=2001:4830:134:3::11; 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="DAGjvORw"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41VWnq0ldXz9s0w for ; Wed, 18 Jul 2018 06:18:55 +1000 (AEST) Received: from localhost ([::1]:33042 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ffWQu-00025t-Ol for incoming@patchwork.ozlabs.org; Tue, 17 Jul 2018 16:18:52 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42617) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ffWBY-0000cm-6R for qemu-devel@nongnu.org; Tue, 17 Jul 2018 16:03:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ffWBX-0001je-9O for qemu-devel@nongnu.org; Tue, 17 Jul 2018 16:03:00 -0400 Received: from mail-wm0-x235.google.com ([2a00:1450:400c:c09::235]:37082) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ffWBX-0001j1-23 for qemu-devel@nongnu.org; Tue, 17 Jul 2018 16:02:59 -0400 Received: by mail-wm0-x235.google.com with SMTP id a19-v6so566036wmb.2 for ; Tue, 17 Jul 2018 13:02:58 -0700 (PDT) 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=2hyT9r7n/kLLoC+J5hjkAOX9XXtoKXwld53Aqui1SWQ=; b=DAGjvORwaddBCYIeH5hOiBtm75uCUhgCA3zb4r1WBKpbK2jPvATyEmzZ6aDY2asabF kA2Gd7UZ4TtRH8bRVZeLhHm1zLkt4CYESSHfr7kN9o55oVhaeUMpSw9vcQsjnAyUZ9KQ sjW4c4wOLMyZFkOGIcwvSSdtkY2gYw3V8brrw= 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=2hyT9r7n/kLLoC+J5hjkAOX9XXtoKXwld53Aqui1SWQ=; b=HvxsXE4v2rqS8MBoZSfACf/bLq14mdVOQdcU7tIVv11hFcaKA9id4/46NE2xMd07hW GYPQFgi2dI4IIPwlc+bG5eFu3eZSMBqPcNiCn+kejLKjG9sWoH/lbUxVKCJDqX9V1osy NxGKmQ0wX+p2DCvNqn+GwCWo2phLrPavT6v/Sw49vw/U17a3FGpMEglNhgU+w7Gp6nsD J7zUePH8CdXWYrRF+iyPgAluR8dtBZEhhh5zQF5XFZCvVwSQhjDUavdLrA4Oqu2nw++l QWkuYJlfDLK+7R47B3ja3mZ3wO8+/5WnCLZQA44a4/9r9HSxSCHN85Gqa5Z8fBnc4hr/ 33lQ== X-Gm-Message-State: AOUpUlFiRpUfuH4fUqwbvaEWdSYPKfC+yXDRbZZwyPz7fh2gnxOJB6rX mhVCCQPmsCOjSHTtHvwc93U1pA== X-Google-Smtp-Source: AAOMgpcU2CejaEQeVtJAUF6i99NFNiV5ZOR5T0HUBFpyIm/LlAJei49GEKBU706Lmd+1VOa8olTcHw== X-Received: by 2002:a1c:70b:: with SMTP id 11-v6mr2189078wmh.151.1531857777876; Tue, 17 Jul 2018 13:02:57 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id 185-v6sm767082wmw.23.2018.07.17.13.02.52 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 17 Jul 2018 13:02:52 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id DBC233E0C98; Tue, 17 Jul 2018 20:55:54 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: cota@braap.org, famz@redhat.com, berrange@redhat.com, f4bug@amsat.org, richard.henderson@linaro.org, balrogg@gmail.com, aurelien@aurel32.net, agraf@suse.de Date: Tue, 17 Jul 2018 20:55:48 +0100 Message-Id: <20180717195553.9111-14-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180717195553.9111-1-alex.bennee@linaro.org> References: <20180717195553.9111-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:400c:c09::235 Subject: [Qemu-devel] [PATCH v3 for 3.0 13/18] docker: add --hint to docker.py check 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?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" When a check fails we currently just report why we failed. This is not totally helpful to people who want to boot-strap a new image. Add a --hint option which we can pass down to give a bit more information. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé --- tests/docker/Makefile.include | 3 ++- tests/docker/docker.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include index ec23620153..c9e412f9d0 100644 --- a/tests/docker/Makefile.include +++ b/tests/docker/Makefile.include @@ -73,7 +73,8 @@ docker-binfmt-image-debian-%: $(DOCKER_FILES_DIR)/debian-bootstrap.docker $(if $(EXECUTABLE),--include-executable=$(EXECUTABLE)), \ "BUILD","binfmt debian-$* (debootstrapped)"), \ $(call quiet-command, \ - $(DOCKER_SCRIPT) check --quiet qemu:debian-$* $<, \ + $(DOCKER_SCRIPT) check --quiet qemu:debian-$* $< \ + --hint "you will need to build $(EXECUTABLE)", \ "CHECK", "debian-$* exists")) endif diff --git a/tests/docker/docker.py b/tests/docker/docker.py index 2f81c6b13b..523f4b95a2 100755 --- a/tests/docker/docker.py +++ b/tests/docker/docker.py @@ -475,6 +475,7 @@ class CheckCommand(SubCommand): default="checksum", help="check type") parser.add_argument("--olderthan", default=60, type=int, help="number of minutes") + parser.add_argument("--hint", default="", help="hint to user") def run(self, args, argv): tag = args.tag @@ -487,7 +488,7 @@ class CheckCommand(SubCommand): info = dkr.inspect_tag(tag) if info is None: - print("Image does not exist") + print("Image does not exist %s" % (args.hint)) return 1 if args.checktype == "checksum": From patchwork Tue Jul 17 19:55:49 2018 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: 945335 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=2001:4830:134:3::11; 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="TDursS3z"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41VWmF3RDbz9s0w for ; Wed, 18 Jul 2018 06:17:33 +1000 (AEST) Received: from localhost ([::1]:33035 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ffWPb-0001Qz-5j for incoming@patchwork.ozlabs.org; Tue, 17 Jul 2018 16:17:31 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42601) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ffWBX-0000cQ-RD for qemu-devel@nongnu.org; Tue, 17 Jul 2018 16:03:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ffWBW-0001iq-79 for qemu-devel@nongnu.org; Tue, 17 Jul 2018 16:02:59 -0400 Received: from mail-wm0-x244.google.com ([2a00:1450:400c:c09::244]:37378) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ffWBV-0001iN-Vl for qemu-devel@nongnu.org; Tue, 17 Jul 2018 16:02:58 -0400 Received: by mail-wm0-x244.google.com with SMTP id a19-v6so565997wmb.2 for ; Tue, 17 Jul 2018 13:02:57 -0700 (PDT) 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=1MKzdoK/MCfbGVwnw3ruXmQEW5dlGctPyFI28rtTlgU=; b=TDursS3zTBWpzoN3Cysie5CRYyNV5tYrYm7SIS1t9rjrHkqBVROD6GYjgd8OPcvMMq wjPjTXgxlFtUA7qT5UQ6c/juS/470Gw/pJTosn0jgA9yRUntwZrI8FgC6KZhqxNl+aDg tCBqRlQbiDhplODrngbw2y7gmXO5LZjReiNaI= 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=1MKzdoK/MCfbGVwnw3ruXmQEW5dlGctPyFI28rtTlgU=; b=lkbGP9upt82802E2Ogx52B+nle3i6wT80X9KD/APbgHb8GCHNYc05PVaNsvn5rqc3l ahoHqxZV2Lww+ppFLSsSHWn4XqIprTva9JHTtnINzSpZnd6I5J14QN9N2eTV3BjPno1x 5+CbMBkQojuSbMBnW50sZEgDXVaHBGsyvKoEIgW/ruedSpmj/CRqSoMhaSbAcYt8wqZD 0QiupJeKeEO7iucyDiTMAacwyNU4T0thx0G5fE/vzxW+7gPTbiTN14bMxi2/p4DQdfaT X5vVyK5WEq4p+Tks1lXlCUfe0o1owVBEm6dR+DQlSZZXnvG5j3fAOCHLXQg0KiFnTgr3 3C5w== X-Gm-Message-State: AOUpUlGnG5j1M9s6zjhHdw/tqbzj5U+f3FlS7v6uCQK3pWsMKVdw/82a HUzIBGosW6YT3Tm7GW++LDIOlQ== X-Google-Smtp-Source: AAOMgpe0Kwgi1AFaVM227SuEfffMTIqHkwXf8opoa05Wf2uZZ2IY3dUZ9v6DaMfMu4xvRYSuVpVAZg== X-Received: by 2002:a1c:3743:: with SMTP id e64-v6mr2181984wma.63.1531857776804; Tue, 17 Jul 2018 13:02:56 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id y102-v6sm859523wmh.9.2018.07.17.13.02.52 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 17 Jul 2018 13:02:52 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id EE4C43E0D14; Tue, 17 Jul 2018 20:55:54 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: cota@braap.org, famz@redhat.com, berrange@redhat.com, f4bug@amsat.org, richard.henderson@linaro.org, balrogg@gmail.com, aurelien@aurel32.net, agraf@suse.de Date: Tue, 17 Jul 2018 20:55:49 +0100 Message-Id: <20180717195553.9111-15-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180717195553.9111-1-alex.bennee@linaro.org> References: <20180717195553.9111-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:400c:c09::244 Subject: [Qemu-devel] [PATCH v3 for 3.0 14/18] docker: Update debootstrap script after Debian migration from Alioth to Salsa 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?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daudé This silents the following warning: Cloning into './debootstrap.git'... warning: redirecting to https://salsa.debian.org/installer-team/debootstrap.git/ See https://lists.debian.org/debian-devel-announce/2018/01/msg00004.html Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée --- tests/docker/dockerfiles/debian-bootstrap.pre | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/docker/dockerfiles/debian-bootstrap.pre b/tests/docker/dockerfiles/debian-bootstrap.pre index 56e1aa7a21..ea324d6e4a 100755 --- a/tests/docker/dockerfiles/debian-bootstrap.pre +++ b/tests/docker/dockerfiles/debian-bootstrap.pre @@ -62,7 +62,7 @@ if [ -z $DEBOOTSTRAP_DIR ]; then NEED_DEBOOTSTRAP=true fi if $NEED_DEBOOTSTRAP; then - DEBOOTSTRAP_SOURCE=https://anonscm.debian.org/git/d-i/debootstrap.git + DEBOOTSTRAP_SOURCE=https://salsa.debian.org/installer-team/debootstrap.git git clone ${DEBOOTSTRAP_SOURCE} ./debootstrap.git export DEBOOTSTRAP_DIR=./debootstrap.git DEBOOTSTRAP=./debootstrap.git/debootstrap From patchwork Tue Jul 17 19:55:50 2018 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: 945333 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=2001:4830:134:3::11; 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="OUJDlWvL"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41VWh92NMDz9s0w for ; Wed, 18 Jul 2018 06:14:00 +1000 (AEST) Received: from localhost ([::1]:33009 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ffWMA-0007gA-E5 for incoming@patchwork.ozlabs.org; Tue, 17 Jul 2018 16:13:58 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42604) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ffWBX-0000cU-SE for qemu-devel@nongnu.org; Tue, 17 Jul 2018 16:03:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ffWBU-0001i9-RB for qemu-devel@nongnu.org; Tue, 17 Jul 2018 16:02:59 -0400 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]:43423) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ffWBU-0001h9-Jy for qemu-devel@nongnu.org; Tue, 17 Jul 2018 16:02:56 -0400 Received: by mail-wr1-x443.google.com with SMTP id b15-v6so2385919wrv.10 for ; Tue, 17 Jul 2018 13:02:56 -0700 (PDT) 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=eIYkuGTVdjdwem9K1ywphqkgoaT/KOiP/rzEZOwMXN0=; b=OUJDlWvLdMcGmeEs2vacff/NYY/TmkmububPD3K4/pw3egovOZDUmjfw5zO26La+Ya Fa886GkTJyQlp7nzuZ6SxIzhqQQ1p7PAiUIDidNTf5dfPM628uPa9VL/qgFJ1H6NyjuA yObg3G8umfAC2nTa93uqZghZHIt61We49x/sk= 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=eIYkuGTVdjdwem9K1ywphqkgoaT/KOiP/rzEZOwMXN0=; b=ralef2kSKH8aiYSMwGyd/HPaw08bRcZ0DwfV80bDGLKz+PDPsL8XmeCDtKmArmcrF9 Go2x1aSylv+ET8nPKwTwZnKomj9pRm4g2b33S1DXLzN4c1F5l++igr6eVYS4yBeTtsl2 iF1GqMf8U97+W85crUanYXHkxnqrdV4YnoqEIITpAoNp9ywuLBUgzGOiDo9E2lEXHz2I 5FWvFQ1+bXfz9jjEIJpt1p4S0762SOzyGP6HybT6vjF9VjXbGtD+wc8rR1gkFeI+TodQ QqqoJFA+c8MMd2C4VNkoOo9/P3T69Z2sKNQk3d2EeWcv6BmFtRFsw2YTK6Sft+Eh1T7c Y0CA== X-Gm-Message-State: AOUpUlFcgf9mmKh0LJvx5i8fdO7GijfC1+56KJJM+LTAwlEDqHTBQFyy D2rmdGqQYLuLIkmNrPZftmeCHQ== X-Google-Smtp-Source: AAOMgpf7a+OglrdZYRlvIV+7XzXcVY5fM9Gegw6CIoen34xfi4JZroRTIcwIlFdpIuTkKNYvjyUU7A== X-Received: by 2002:a5d:44c6:: with SMTP id z6-v6mr2351895wrr.236.1531857775497; Tue, 17 Jul 2018 13:02:55 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id 189-v6sm718020wmd.17.2018.07.17.13.02.52 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 17 Jul 2018 13:02:52 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 0C6F53E0D4B; Tue, 17 Jul 2018 20:55:55 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: cota@braap.org, famz@redhat.com, berrange@redhat.com, f4bug@amsat.org, richard.henderson@linaro.org, balrogg@gmail.com, aurelien@aurel32.net, agraf@suse.de Date: Tue, 17 Jul 2018 20:55:50 +0100 Message-Id: <20180717195553.9111-16-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180717195553.9111-1-alex.bennee@linaro.org> References: <20180717195553.9111-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 v3 for 3.0 15/18] docker: add commentary to debian-bootstrap.docker 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?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" This is just a note that later versions of debootstrap don't technically need this hack. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé --- tests/docker/dockerfiles/debian-bootstrap.docker | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/docker/dockerfiles/debian-bootstrap.docker b/tests/docker/dockerfiles/debian-bootstrap.docker index 14212b9cf4..e13c26a7ed 100644 --- a/tests/docker/dockerfiles/debian-bootstrap.docker +++ b/tests/docker/dockerfiles/debian-bootstrap.docker @@ -9,6 +9,7 @@ FROM scratch ADD . / # Patch all mounts as docker already has stuff set up +# (this is not needed for later debootstraps but is harmless atm) RUN sed -i 's/in_target mount/echo not for docker in_target mount/g' /debootstrap/functions # Run stage 2 From patchwork Tue Jul 17 19:55:51 2018 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: 945334 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=2001:4830:134:3::11; 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="dnQRe12w"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41VWkR3NhRz9s0w for ; Wed, 18 Jul 2018 06:15:59 +1000 (AEST) Received: from localhost ([::1]:33026 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ffWO5-0000oy-46 for incoming@patchwork.ozlabs.org; Tue, 17 Jul 2018 16:15:57 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42600) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ffWBX-0000cP-R9 for qemu-devel@nongnu.org; Tue, 17 Jul 2018 16:03:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ffWBT-0001gx-RX for qemu-devel@nongnu.org; Tue, 17 Jul 2018 16:02:59 -0400 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]:40081) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ffWBT-0001gF-Kd for qemu-devel@nongnu.org; Tue, 17 Jul 2018 16:02:55 -0400 Received: by mail-wr1-x444.google.com with SMTP id t6-v6so2394444wrn.7 for ; Tue, 17 Jul 2018 13:02:55 -0700 (PDT) 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=uh+xgRKLlu0pAy51Rt97gPvvJ/mFYbA7UbcjFuIwMg4=; b=dnQRe12wcM1a/Mb5pisJ8Oyd29ayhojr26CV70jCfrDLEDmmtVahs2NPz9D3EJA3iB QPkNSB/x1QFBnXFDHuyqsIZ4kh3oTJxquCDvItjO5QObbo03nwf/SqGo0f0XlZ/Pebq0 qvRgX/1kWRlRbG5i4Ls07KZzVj2gIAQXU11vs= 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=uh+xgRKLlu0pAy51Rt97gPvvJ/mFYbA7UbcjFuIwMg4=; b=a75SdW8EmXS22j16GrUb9z7ooWAVYYaDatEvzkq1vsJXVbkB+Rb5dkaFzSGtBUlXCO kHSWplDQUNyQcv9WP0pOZ9d0P1cTqCDGk3fmCMFEx4OUUpSyJIVosG+l1qW+3xM1TuRZ /mgivXDaP5bMj3I+iuRNTnkKKAsGTIrxa1KEWedtQr5z4JKauXSQqQZW3ijFw9LqB4Dp Na2HF30lSNfcuQ9Xk0Wlxhnetboj0IE2pN8aT0E8PJcKQYR8uNdhRAjC41xehbCMz19b jyjjwlQ1u93UqQ2bmVtSBS2unS1npknVZDR1gF62/VoQPHNSm9tz7FmwK7QT6ff/U5Zf OMkA== X-Gm-Message-State: AOUpUlFEMD4ishPXQi6OuZiF9a6uuXbzsZLzCPznWxzIdgeuBKvseqtJ XcD5JxDQqfGuHkG2lNLwC7/QxQ== X-Google-Smtp-Source: AAOMgpdJHAtaVYPBH9NqD27AqK9rN29+cP5Tr/WCnkKy+Bqx+cTqiO0q86YQ51gYibu3ZhKeLHHKYA== X-Received: by 2002:adf:9086:: with SMTP id i6-v6mr2262649wri.271.1531857774416; Tue, 17 Jul 2018 13:02:54 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id m144-v6sm298273wma.36.2018.07.17.13.02.52 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 17 Jul 2018 13:02:52 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 1EF8C3E0D6A; Tue, 17 Jul 2018 20:55:55 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: cota@braap.org, famz@redhat.com, berrange@redhat.com, f4bug@amsat.org, richard.henderson@linaro.org, balrogg@gmail.com, aurelien@aurel32.net, agraf@suse.de Date: Tue, 17 Jul 2018 20:55:51 +0100 Message-Id: <20180717195553.9111-17-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180717195553.9111-1-alex.bennee@linaro.org> References: <20180717195553.9111-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 v3 for 3.0 16/18] docker: ignore distro versioning of debootstrap 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?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" We do a minimum version check for the debootstrap but if the distro has added their own minor version tick it would fail and fall-back to the SCM version. This is sub-optimal as the latest/greatest version may be broken at any one particular time. We fix that with a little sed magic on the version string before passing to our ugly shell versioning check. Signed-off-by: Alex Bennée Tested-by: Philippe Mathieu-Daudé --- tests/docker/dockerfiles/debian-bootstrap.pre | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tests/docker/dockerfiles/debian-bootstrap.pre b/tests/docker/dockerfiles/debian-bootstrap.pre index ea324d6e4a..3b0ef95374 100755 --- a/tests/docker/dockerfiles/debian-bootstrap.pre +++ b/tests/docker/dockerfiles/debian-bootstrap.pre @@ -56,10 +56,13 @@ if [ -z $DEBOOTSTRAP_DIR ]; then if [ -z $DEBOOTSTRAP ]; then echo "No debootstrap installed, attempting to install from SCM" NEED_DEBOOTSTRAP=true - elif ! (echo "${MIN_DEBOOTSTRAP_VERSION}" ; "${DEBOOTSTRAP}" --version \ - | cut -d ' ' -f 2) | sort -t . -n -k 1,1 -k 2,2 -k 3,3 -c &>/dev/null; then - echo "debootstrap too old, attempting to install from SCM" - NEED_DEBOOTSTRAP=true + else + INSTALLED_VERSION=$(${DEBOOTSTRAP} --version | sed 's/debootstrap \([0-9\.]*\)[^0-9\.]*.*/\1/') + if ! (echo "${MIN_DEBOOTSTRAP_VERSION}" ; echo "${INSTALLED_VERSION}") \ + | sort -t . -n -k 1,1 -k 2,2 -k 3,3 -C ; then + echo "debootstrap too old, attempting to install from SCM" + NEED_DEBOOTSTRAP=true + fi fi if $NEED_DEBOOTSTRAP; then DEBOOTSTRAP_SOURCE=https://salsa.debian.org/installer-team/debootstrap.git From patchwork Tue Jul 17 19:55:52 2018 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: 945331 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=2001:4830:134:3::11; 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="COn7I6p8"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41VWWy4byGz9s0w for ; Wed, 18 Jul 2018 06:06:54 +1000 (AEST) Received: from localhost ([::1]:32975 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ffWFI-0003Fb-Ai for incoming@patchwork.ozlabs.org; Tue, 17 Jul 2018 16:06:52 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42607) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ffWBX-0000cV-Sk for qemu-devel@nongnu.org; Tue, 17 Jul 2018 16:03:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ffWBS-0001gK-WD for qemu-devel@nongnu.org; Tue, 17 Jul 2018 16:02:59 -0400 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]:39782) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ffWBS-0001fn-On for qemu-devel@nongnu.org; Tue, 17 Jul 2018 16:02:54 -0400 Received: by mail-wr1-x42e.google.com with SMTP id h10-v6so2397349wre.6 for ; Tue, 17 Jul 2018 13:02:54 -0700 (PDT) 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=Uo3rRHX/CxkGdJt3ZfpfWFyhxy9sw2jyW1uYilOJI94=; b=COn7I6p82KG4HrkCfj7hKTvJpO5ST8gzPrjnzOdnBEcmUfPVNpsd3nWAMNsLL/HnLO y+Dk/VE3+RyvgNoVjPdAjXKSGjaxQ5R7P5rl/juGZKVcyHGV2WTYDdTnBcTKEW36uQYE SdaunzfJqMzDYFP77pYS2ckUorlitYw52PDlM= 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=Uo3rRHX/CxkGdJt3ZfpfWFyhxy9sw2jyW1uYilOJI94=; b=ATH121Xzv1QRS06ARLgN4hYVll/pDrE4txcOjGziP4aatelpdUjpzfVPOnKT7dvd8B MZ3plIvVvorROHcnt7LSy/P3HhaoT2BcM/cozb0p5vTfZsf/Vo7Mxp6CHPjlUy4ciwaL zVhJqPG9FDF0LL16gMVRpM3P7AfJlll00xIP848HndRx6O1zlyegrQDocS56+GEsWK/7 eOCx2fgim6twcWYjFDrtDCRr0EREpgO2QXhoeS4TwtkCuRCTm375p2eQLpfN/QxHin5D B4MHBcf9LaxyHdMjKi47MrN4KZPang2yFMeVAmpmC/kqE1UC1IC+NywnbxqbOLiYXvpF ZZwg== X-Gm-Message-State: AOUpUlHjSzM5b9lCY0nwGvdmKsxv+IivnfyJk6haAD2dGWsQXsmov3jr WreZED7GmRbBacPMhpoaQwMb2A== X-Google-Smtp-Source: AAOMgpe8eYrTdzRWSFi2oCcVuj36SBoOljb+RDRj1lWV8DDj7Qjrh/88sTAZaD5+xugZxl2xOI/XlQ== X-Received: by 2002:a5d:514d:: with SMTP id u13-v6mr2349346wrt.162.1531857773583; Tue, 17 Jul 2018 13:02:53 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id x7-v6sm2589072wrr.95.2018.07.17.13.02.52 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 17 Jul 2018 13:02:52 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 31C923E032A; Tue, 17 Jul 2018 20:55:55 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: cota@braap.org, famz@redhat.com, berrange@redhat.com, f4bug@amsat.org, richard.henderson@linaro.org, balrogg@gmail.com, aurelien@aurel32.net, agraf@suse.de Date: Tue, 17 Jul 2018 20:55:52 +0100 Message-Id: <20180717195553.9111-18-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180717195553.9111-1-alex.bennee@linaro.org> References: <20180717195553.9111-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::42e Subject: [Qemu-devel] [PATCH v3 for 3.0 17/18] docker: perform basic binfmt_misc validation in docker.py 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?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Setting up binfmt_misc is outside of the scope of the docker.py script but we can at least validate it with any given executable so we have a more useful error message than the sed line of deboostrap failing cryptically. Signed-off-by: Alex Bennée Reported-by: Richard Henderson --- tests/docker/docker.py | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/tests/docker/docker.py b/tests/docker/docker.py index 523f4b95a2..a3f5b0c1b0 100755 --- a/tests/docker/docker.py +++ b/tests/docker/docker.py @@ -112,6 +112,31 @@ def _copy_binary_with_libs(src, dest_dir): so_path = os.path.dirname(l) _copy_with_mkdir(l , dest_dir, so_path) + +def _check_binfmt_misc(executable): + """Check binfmt_misc has entry for executable in the right place. + + 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.""" + + 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 False + + 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 + + def _read_qemu_dockerfile(img_name): # special case for Debian linux-user images if img_name.startswith("debian") and img_name.endswith("user"): @@ -315,6 +340,11 @@ class BuildCommand(SubCommand): # Create a docker context directory for the build docker_dir = tempfile.mkdtemp(prefix="docker_build") + # Validate binfmt_misc will work + if args.include_executable: + if not _check_binfmt_misc(args.include_executable): + return 1 + # Is there a .pre file to run in the build context? docker_pre = os.path.splitext(args.dockerfile)[0]+".pre" if os.path.exists(docker_pre): From patchwork Tue Jul 17 19:55:53 2018 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: 945329 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=2001:4830:134:3::11; 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="T5FjqH2c"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41VWRj042hz9s0w for ; Wed, 18 Jul 2018 06:03:13 +1000 (AEST) Received: from localhost ([::1]:32954 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ffWBi-000075-Gf for incoming@patchwork.ozlabs.org; Tue, 17 Jul 2018 16:03:10 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40975) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ffW4z-00039u-At for qemu-devel@nongnu.org; Tue, 17 Jul 2018 15:56:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ffW4w-0004nE-RE for qemu-devel@nongnu.org; Tue, 17 Jul 2018 15:56:13 -0400 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]:42529) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ffW4w-0004mr-Gh for qemu-devel@nongnu.org; Tue, 17 Jul 2018 15:56:10 -0400 Received: by mail-wr1-x441.google.com with SMTP id e7-v6so2378472wrs.9 for ; Tue, 17 Jul 2018 12:56:10 -0700 (PDT) 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=md6KBT6sv4D2C7CTWsFSg25vSfxSxCtAwGwKddLSd4w=; b=T5FjqH2cZWc/QjmlqmfrWroGLrv42qz+XdUtbqKta2VyUgFinSd83lBK83g4Lx2ra3 6q8CBHcKv/tbhDbS6FjebJE/YCL7uDDkrweyq6YjVBncbcodhe8XizNzBp88smV3KX3W 2Jwf5Ko3wxFHu6CyOGptNWLHXj8YystwvVxyk= 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=md6KBT6sv4D2C7CTWsFSg25vSfxSxCtAwGwKddLSd4w=; b=FgUqiHdAlyZkemcI1ebW/LNe1oy9PHP24XWpcENM87s4y3ttjJaRsgQrwHTrDVHZWy bHPBPLQ7GakKCfcBdP1rQ6gIjmmMkQCfDt8jmD3chAncX5UGFEw4IbOdjEOghvxUFzHI LBt3vXtcfCcmnty+8pgsh1fhzerHV6sOH0ruzjiA7+5DWU9tu0vnMoudKG0fLCgiEMBe vrcgQRsVDR1H+qaPkemdQ8eoRcGmPK239LKqym1c2FWMQGRhJ2YyEVkHjxpYwIeKV6G1 B/YQPtfYAvu7Vx2JZPK/tfsDTxqzfY+TQsLccqC4ffmm2wcw0e3V8eoAi/dvHKP6yegV vesw== X-Gm-Message-State: AOUpUlFDZEKTaPjO1P+vHDGJxZZRjAjOmRKDSOT4HlvUfTjyhr8+S/4K dDqA4/croQ9JqiAoIYxwST77zw== X-Google-Smtp-Source: AAOMgpcK7GT8zkA9LV1v3XW6mcEX0TozFdFt/EpL4f+p9B0g3/lPxAtgNnpK1SUF3wCxyZsx25l8Hg== X-Received: by 2002:a5d:4643:: with SMTP id j3-v6mr2275684wrs.52.1531857369168; Tue, 17 Jul 2018 12:56:09 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id t70-v6sm780623wme.7.2018.07.17.12.55.59 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 17 Jul 2018 12:56:02 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 477393E0D8A; Tue, 17 Jul 2018 20:55:55 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: cota@braap.org, famz@redhat.com, berrange@redhat.com, f4bug@amsat.org, richard.henderson@linaro.org, balrogg@gmail.com, aurelien@aurel32.net, agraf@suse.de Date: Tue, 17 Jul 2018 20:55:53 +0100 Message-Id: <20180717195553.9111-19-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180717195553.9111-1-alex.bennee@linaro.org> References: <20180717195553.9111-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::441 Subject: [Qemu-devel] [PATCH v3 for 3.0 18/18] tests/tcg: remove runcom test 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: Paolo Bonzini , =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org, Eduardo Habkost , Richard Henderson Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" The combination of being rather esoteric and needing to support mmap @ 0 means this only ever worked under translation. It has now regressed even further and is no longer useful. Kill it. Signed-off-by: Alex Bennée Reviewed-by: Peter Maydell --- tests/tcg/i386/Makefile.target | 5 - tests/tcg/i386/README | 3 - tests/tcg/i386/pi_10.com | Bin 54 -> 0 bytes tests/tcg/i386/runcom.c | 192 --------------------------------- 4 files changed, 200 deletions(-) delete mode 100644 tests/tcg/i386/pi_10.com delete mode 100644 tests/tcg/i386/runcom.c diff --git a/tests/tcg/i386/Makefile.target b/tests/tcg/i386/Makefile.target index c1997a1624..b4033ba3d1 100644 --- a/tests/tcg/i386/Makefile.target +++ b/tests/tcg/i386/Makefile.target @@ -29,11 +29,6 @@ test-i386: test-i386.c test-i386-code16.S test-i386-vm86.S test-i386.h test-i386 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ \ $( -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -extern int vm86 (unsigned long int subfunction, - struct vm86plus_struct *info); - -#define VIF_MASK 0x00080000 - -//#define SIGTEST - -#define COM_BASE_ADDR 0x10100 - -static void usage(void) -{ - printf("runcom version 0.1 (c) 2003 Fabrice Bellard\n" - "usage: runcom file.com\n" - "VM86 Run simple .com DOS executables (linux vm86 test mode)\n"); - exit(1); -} - -static inline void set_bit(uint8_t *a, unsigned int bit) -{ - a[bit / 8] |= (1 << (bit % 8)); -} - -static inline uint8_t *seg_to_linear(unsigned int seg, unsigned int reg) -{ - return (uint8_t *)((seg << 4) + (reg & 0xffff)); -} - -static inline void pushw(struct vm86_regs *r, int val) -{ - r->esp = (r->esp & ~0xffff) | ((r->esp - 2) & 0xffff); - *(uint16_t *)seg_to_linear(r->ss, r->esp) = val; -} - -void dump_regs(struct vm86_regs *r) -{ - fprintf(stderr, - "EAX=%08lx EBX=%08lx ECX=%08lx EDX=%08lx\n" - "ESI=%08lx EDI=%08lx EBP=%08lx ESP=%08lx\n" - "EIP=%08lx EFL=%08lx\n" - "CS=%04x DS=%04x ES=%04x SS=%04x FS=%04x GS=%04x\n", - r->eax, r->ebx, r->ecx, r->edx, r->esi, r->edi, r->ebp, r->esp, - r->eip, r->eflags, - r->cs, r->ds, r->es, r->ss, r->fs, r->gs); -} - -#ifdef SIGTEST -void alarm_handler(int sig) -{ - fprintf(stderr, "alarm signal=%d\n", sig); - alarm(1); -} -#endif - -int main(int argc, char **argv) -{ - uint8_t *vm86_mem; - const char *filename; - int fd, ret, seg; - struct vm86plus_struct ctx; - struct vm86_regs *r; - - if (argc != 2) - usage(); - filename = argv[1]; - - vm86_mem = mmap((void *)0x00000000, 0x110000, - PROT_WRITE | PROT_READ | PROT_EXEC, - MAP_FIXED | MAP_ANON | MAP_PRIVATE, -1, 0); - if (vm86_mem == MAP_FAILED) { - perror("mmap"); - exit(1); - } -#ifdef SIGTEST - { - struct sigaction act; - - act.sa_handler = alarm_handler; - sigemptyset(&act.sa_mask); - act.sa_flags = 0; - sigaction(SIGALRM, &act, NULL); - alarm(1); - } -#endif - - /* load the MSDOS .com executable */ - fd = open(filename, O_RDONLY); - if (fd < 0) { - perror(filename); - exit(1); - } - ret = read(fd, vm86_mem + COM_BASE_ADDR, 65536 - 256); - if (ret < 0) { - perror("read"); - exit(1); - } - close(fd); - - memset(&ctx, 0, sizeof(ctx)); - /* init basic registers */ - r = &ctx.regs; - r->eip = 0x100; - r->esp = 0xfffe; - seg = (COM_BASE_ADDR - 0x100) >> 4; - r->cs = seg; - r->ss = seg; - r->ds = seg; - r->es = seg; - r->fs = seg; - r->gs = seg; - r->eflags = VIF_MASK; - - /* put return code */ - set_bit((uint8_t *)&ctx.int_revectored, 0x21); - *seg_to_linear(r->cs, 0) = 0xb4; /* mov ah, $0 */ - *seg_to_linear(r->cs, 1) = 0x00; - *seg_to_linear(r->cs, 2) = 0xcd; /* int $0x21 */ - *seg_to_linear(r->cs, 3) = 0x21; - pushw(&ctx.regs, 0x0000); - - /* the value of these registers seem to be assumed by pi_10.com */ - r->esi = 0x100; - r->ecx = 0xff; - r->ebp = 0x0900; - r->edi = 0xfffe; - - for(;;) { - ret = vm86(VM86_ENTER, &ctx); - switch(VM86_TYPE(ret)) { - case VM86_INTx: - { - int int_num, ah; - - int_num = VM86_ARG(ret); - if (int_num != 0x21) - goto unknown_int; - ah = (r->eax >> 8) & 0xff; - switch(ah) { - case 0x00: /* exit */ - exit(0); - case 0x02: /* write char */ - { - uint8_t c = r->edx; - write(1, &c, 1); - } - break; - case 0x09: /* write string */ - { - uint8_t c; - for(;;) { - c = *seg_to_linear(r->ds, r->edx); - if (c == '$') - break; - write(1, &c, 1); - } - r->eax = (r->eax & ~0xff) | '$'; - } - break; - default: - unknown_int: - fprintf(stderr, "unsupported int 0x%02x\n", int_num); - dump_regs(&ctx.regs); - // exit(1); - } - } - break; - case VM86_SIGNAL: - /* a signal came, we just ignore that */ - break; - case VM86_STI: - break; - default: - fprintf(stderr, "unhandled vm86 return code (0x%x)\n", ret); - dump_regs(&ctx.regs); - exit(1); - } - } -}