From nobody Mon May 6 20:47:38 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1593195339; cv=none; d=zohomail.com; s=zohoarc; b=nIobG7And3mHallZZb7wjZHQ0TsH3L+2W6BmjnH3h/a4sboVMnGdTYHAByWKh4UIh5aGb91rVeJTEpuisurdYJrA9UqKwGRmaneZeVMFDFVzYV0Wd5ZorX/qwaPFjLRIe63tKWtkqQ17jAPNotO/qg565IDZkZM3o4AXNXJ4ZwQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1593195339; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=KLxxBVgESg8+q++r/+fvnKLfCmcpFTynVpvVjZzQTYc=; b=gVRUVvUQivmFUscb+RLJ0xVM3tlcg3GviM2ng5bRS+JxKCEg3umi2jQHKB5RR7EAEW9WJX5vosv2HoD6TbcWdUHqnOW916SfaHZo2odqnGWGkE4q4zqk52uJgYWtqnWN0gYolVTOs513Z91OZNVs9YJxGiIxhuaLdeZsZync8Q8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1593195339438558.8505510390102; Fri, 26 Jun 2020 11:15:39 -0700 (PDT) Received: from localhost ([::1]:43386 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jost0-0000cj-2E for importer@patchew.org; Fri, 26 Jun 2020 14:15:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55878) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1josrV-0007JF-Cs for qemu-devel@nongnu.org; Fri, 26 Jun 2020 14:14:05 -0400 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]:37431) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1josrS-0001F6-S7 for qemu-devel@nongnu.org; Fri, 26 Jun 2020 14:14:05 -0400 Received: by mail-wr1-x432.google.com with SMTP id a6so10367983wrm.4 for ; Fri, 26 Jun 2020 11:14:02 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id k11sm35759589wrd.23.2020.06.26.11.13.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jun 2020 11:13:58 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id E160E1FF87; Fri, 26 Jun 2020 19:13:57 +0100 (BST) 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=KLxxBVgESg8+q++r/+fvnKLfCmcpFTynVpvVjZzQTYc=; b=d/3+7NNk/ECbJJCQpyDHdZ46ZLQHsWBXgG4yXVGpMhzCHzzP9JBYrkil4hsDuslnvM Q+rsl40kejeRCatacHyJzK/2+kv+HrNM3DKh45N+5MkmnAHNy2tX+2wyVMnSHlbVsqrD hvFnbp5X6rzhVLYLZiqr9Kq0z6Nv29sBM0vrIJA2WMvkgrWqed+9XdAcB2MB7V7Byw1p 1u4AwgjfQ/qZ89cYoxyC0tsSZ5RHePbGwegnWRqnu1eJul7uCY7Ls2OvvGWghXaOen9/ E3GZ91nexNpU5sXOKV5YnukrDIzZIwcUQFA4kVQiRvwAUw6EwZo4Q3gWazNqvHQyW0g2 b8cw== 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=KLxxBVgESg8+q++r/+fvnKLfCmcpFTynVpvVjZzQTYc=; b=D6x57fGUf710CvsoCfR6vu1hQKdGXAZE0B27nsYC5dbYGoX1HfMridu5BfsHe5Snyx 7O+68odufbT0I/+JahZQUOq7hnWqA0/vez0wFeq9pYc5RaGfgiQE7aeMIuN14p9Te2vx KS3Q7b7NXxEM6t6n+nby6O+jfkdfz71jV0q8i+SvUT1SX+7lREE9JYW0141C8V14lvzm f9CjkJKhEvhC9PFwn5JrmgtII6Vm2SFYN6Sjs5VwxsWx/rZ1CffQjNXZeMN7NByus9kX xm7cagFNxWLlJ+DEXzErhAZd83uotaYcMwpXMpQOT66LMDsPseUSx8qAy+0hJFI1Xp9H Rl4w== X-Gm-Message-State: AOAM531tSY7Rb9tQwzCjueX9Ox4vRAjJ/F29T4dxGK2bTp28Mv9aGw5d xTwwwM1mRrjuVjvdDQ2JphOi3w== X-Google-Smtp-Source: ABdhPJy4x0F8GG8eBNkBwC2yP8epvj5DpQJSODm9C3OVIG6FxO8PgXgcA7NwDLkq13JnOBaDFEEeYA== X-Received: by 2002:adf:f5ce:: with SMTP id k14mr4804457wrp.234.1593195241045; Fri, 26 Jun 2020 11:14:01 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v3 01/30] iotests: Fix 051 output after qdev_init_nofail() removal Date: Fri, 26 Jun 2020 19:13:28 +0100 Message-Id: <20200626181357.26211-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200626181357.26211-1-alex.bennee@linaro.org> References: <20200626181357.26211-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::432; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x432.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: fam@euphon.net, Kevin Wolf , Thomas Huth , berrange@redhat.com, "open list:Block layer core" , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , richard.henderson@linaro.org, f4bug@amsat.org, Max Reitz , =?UTF-8?q?Alex=20Benn=C3=A9e?= , cota@braap.org, John Snow , aurelien@aurel32.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Philippe Mathieu-Daud=C3=A9 Commit 96927c744 replaced qdev_init_nofail() call by isa_realize_and_unref() which has a different error message. Update the test output accordingly. Gitlab CI error after merging b77b5b3dc7: https://gitlab.com/qemu-project/qemu/-/jobs/597414772#L4375 Reported-by: Thomas Huth Signed-off-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Alex Benn=C3=A9e Reviewed-by: John Snow Reviewed-by: Thomas Huth Message-Id: <20200616154949.6586-1-philmd@redhat.com> --- tests/qemu-iotests/051.pc.out | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/qemu-iotests/051.pc.out b/tests/qemu-iotests/051.pc.out index 0ea80d35f0e..da8ad871876 100644 --- a/tests/qemu-iotests/051.pc.out +++ b/tests/qemu-iotests/051.pc.out @@ -142,7 +142,7 @@ QEMU X.Y.Z monitor - type 'help' for more information =20 Testing: -drive if=3Dide QEMU X.Y.Z monitor - type 'help' for more information -(qemu) QEMU_PROG: Initialization of device ide-hd failed: Device needs med= ia, but drive is empty +(qemu) QEMU_PROG: Device needs media, but drive is empty =20 Testing: -drive if=3Dvirtio QEMU X.Y.Z monitor - type 'help' for more information @@ -214,7 +214,7 @@ QEMU X.Y.Z monitor - type 'help' for more information =20 Testing: -drive file=3DTEST_DIR/t.qcow2,if=3Dide,readonly=3Don QEMU X.Y.Z monitor - type 'help' for more information -(qemu) QEMU_PROG: Initialization of device ide-hd failed: Block node is re= ad-only +(qemu) QEMU_PROG: Block node is read-only =20 Testing: -drive file=3DTEST_DIR/t.qcow2,if=3Dvirtio,readonly=3Don QEMU X.Y.Z monitor - type 'help' for more information --=20 2.20.1 From nobody Mon May 6 20:47:38 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1593195454; cv=none; d=zohomail.com; s=zohoarc; b=mWVN8wvie6ObUrUi4YZMux2YxEbVUpXbxct6ydQxkSPEOQZCkJ9tz8+GfL/esc4n8gETIppfxqPQgbDweThiiMbZP+uSNFTX1sy8xLEcYhmHDhFe6rTnBY+zlUMGByrlCoL9MbyQ/84G/Nh/nAEKC5G7L/97k4wpAf2+OxLElPc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1593195454; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=tZC0B8qZBNh5ZHLpWECSXwcvz7Y/QMYlsT+820N3gaU=; b=J0Wfcx4NHaQKGiKwLml48bWUIKDOPyToS74Ut93XP9X5B9hHu5AW0XtgeTp0znHgK0IUXL1GWLjqyEe5UoxuWGxxOVozCKuPxR9Ps13JUK1cFhMfjOrNybbfZEXmZZLEjF3VYwfW4NakjYvCA6xhG5kXlGhESA42+FunkOG6L2Q= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1593195454036451.21492489240336; Fri, 26 Jun 2020 11:17:34 -0700 (PDT) Received: from localhost ([::1]:50914 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1josuq-0003oo-SC for importer@patchew.org; Fri, 26 Jun 2020 14:17:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55890) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1josrX-0007KA-1u for qemu-devel@nongnu.org; Fri, 26 Jun 2020 14:14:07 -0400 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]:34568) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1josrT-0001FM-Nh for qemu-devel@nongnu.org; Fri, 26 Jun 2020 14:14:06 -0400 Received: by mail-wr1-x42e.google.com with SMTP id f7so7363171wrw.1 for ; Fri, 26 Jun 2020 11:14:03 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id e5sm37859634wrs.33.2020.06.26.11.13.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jun 2020 11:13:58 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 12B9F1FF8C; Fri, 26 Jun 2020 19:13:58 +0100 (BST) 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=tZC0B8qZBNh5ZHLpWECSXwcvz7Y/QMYlsT+820N3gaU=; b=g6pr6qaxIvJtD+EoG2TELUkHs5gPfwzSh1O9xG40dgzMh0mmkOYmu0cKnsYUVgDIDR B2HsgOnWrpKfagdqiLWp0BSQTOU0pNPiRrVDpSg8aYfwy8Ocm1/qY4N1p+RwKaEAN1di jZb+YGb/F/6Tzt9+pxUa4hmjiqulYEOKMl054g4hAhhsYVVQw1REw/dUxyCYPkaTLxqD kSESORhFcLWpOS3SADyl6w5jNEmNPlHxaHUSyI0AGS1UfGqiLe7MamJMM5wEjn6HlM0L UyzURUy7Q2pgScQrDwfermg5dpoK9XNLOgBrzU6VrwAihAlYCAR7mUyrkRRo1FiWROvI lckA== 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=tZC0B8qZBNh5ZHLpWECSXwcvz7Y/QMYlsT+820N3gaU=; b=LShoIcwJ3iF+xKVeJKpkGOPTdvpNkiJWSCaNaE3Ns23r6Uu3nuQgpb9Xt30aar+56u WflhgFGGwVu4W8eOdO3hNp+ZO4jLQGGYrtp9Z49pcktnQ2lwvefFVaigfJ+SMDBz4I3J idaMIIicWDcvjSGyZLvjA2ZozYc8lcCnQ71l0NEcsCM3X8g4FBxiSPpnbkZQPOBaylge HFbSDBl5J4jnXAHCLL5yNRu2kS/3cvl9QP6T1bIb35ULW/ezVgdDfxFhwQfw7T1WR5r4 kc2iupmL4OLr/OYKa3bCtcvTmErkYsGFGYP/9oLPxvC8nf530sB0FekV/VlvOZPUPeW+ ukug== X-Gm-Message-State: AOAM532dR4A82Srame68nvkoJZ27HpswEXB9HM6lT28I92f9dSInZbSx 5F3P8anVP3QnAqxwFdnu317cVg== X-Google-Smtp-Source: ABdhPJwKG0nxoK+odtcaosBcM5TK07wFU0p6AT2Wm77BAvnRY+GSt2t3ZvldS8N32XQm5chxDXBsOQ== X-Received: by 2002:a5d:4845:: with SMTP id n5mr4885014wrs.353.1593195242276; Fri, 26 Jun 2020 11:14:02 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v3 02/30] crypto/linux_keyring: fix 'secret_keyring' configure test Date: Fri, 26 Jun 2020 19:13:29 +0100 Message-Id: <20200626181357.26211-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200626181357.26211-1-alex.bennee@linaro.org> References: <20200626181357.26211-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42e; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42e.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: fam@euphon.net, Thomas Huth , berrange@redhat.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, David Edmondson , cota@braap.org, aurelien@aurel32.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: David Edmondson The configure test for 'secret_keyring' incorrectly checked the 'have_keyring' variable. Fixes: 54e7aac0562452e4fcab65ca5001d030eef2de15 Signed-off-by: David Edmondson Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Thomas Huth Message-Id: <20200618092636.71832-1-david.edmondson@oracle.com> --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index ae8737d5a2c..25b65981142 100755 --- a/configure +++ b/configure @@ -6437,7 +6437,7 @@ EOF fi if test "$secret_keyring" !=3D "no" then - if test "$have_keyring" =3D=3D "yes" + if test "$have_keyring" =3D "yes" then secret_keyring=3Dyes else --=20 2.20.1 From nobody Mon May 6 20:47:38 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1593195564; cv=none; d=zohomail.com; s=zohoarc; b=gpdbza2V+bUEQ21z782QEwhn8rgW2vN5deGQoEcb1YXEazRdvmquUNW74H9t7IKujRVuCEq/sKDCCZEwSaTgW6/zMvhVFRg9cEx7ALAP4+4QyExAvq6CWpFaZf6p1pnzME+7rfjhNYQoH5oUNbiFD1D2uhp6KZt1TS7SYsuC/0o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1593195564; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=m1Iumf3YfxuO4NhxteboEtLnibs/CAVIrPHuCmkmoi4=; b=ikgRb6Z/BKgzpR9o75bfYM8qURnYjaegBA7NuscvqiWun2q0ZhcpuAbM6DWcO4nV83GyVCzl2FLkUy9gXneumtwvG41sseD7oX3T6Z+wNV5arvkGlhBCI33upwBPBXt1Dq9TnRZPXAmokQ7NdvAEweYvxPXyVaVsLCBZhcL10/k= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1593195564789598.9851274565068; Fri, 26 Jun 2020 11:19:24 -0700 (PDT) Received: from localhost ([::1]:57192 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1joswd-0006SY-2Z for importer@patchew.org; Fri, 26 Jun 2020 14:19:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55924) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1josrZ-0007Lw-Nx for qemu-devel@nongnu.org; Fri, 26 Jun 2020 14:14:09 -0400 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]:40075) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1josrW-0001GV-Pz for qemu-devel@nongnu.org; Fri, 26 Jun 2020 14:14:09 -0400 Received: by mail-wm1-x335.google.com with SMTP id f139so10206245wmf.5 for ; Fri, 26 Jun 2020 11:14:04 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id j41sm39616234wre.12.2020.06.26.11.13.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jun 2020 11:14:02 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 3C1FF1FF8F; Fri, 26 Jun 2020 19:13:58 +0100 (BST) 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=m1Iumf3YfxuO4NhxteboEtLnibs/CAVIrPHuCmkmoi4=; b=dqWOJlKfEXXrQ5El2Mou/hg9MPmvlcBwmpo2y7b5XPYIGjRCchzRKdcnw55GGK3SK5 mBxsX8XmFnM4KWx3j46V8VjsKvAG6Pe/oZcSZ/xI7v3GLTrC9tN1DnmyEg4n1oPXUz8z q0tDIRLXvgZVKbKE1y325a9soT7I9YW7707bT71tlZUPbWx7goCojrKJPb5O+VmOvMnK HuRuGksSrlIfZr/P6J5TeLgQyk4hL/seR7XYi6AAG89F/rRNieBjXjX1EU6XSN+DnlEU IjjCNrzdxPjx504rZxSnEYY0q++gZSVx/pNRsqJfkCrAPQLAO12bAwfMuHhN5bokISK1 vzjQ== 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=m1Iumf3YfxuO4NhxteboEtLnibs/CAVIrPHuCmkmoi4=; b=YDg9DLwkhSH6usBLDbIHVBIapCzfbf90BWxqn4NQ+DOm/86SlyGmXGclp93nuNO+Gx ocol1xwVTLKCUker7MDyewxYABSRMxfyivsBylxWDDMnjpzRag09zrzRMIh4Y2NYhlbu GvRUfyUIjueiIfAvDrZ7ulxh1hV110t53wc4UznOjLGm7oYK7xl8hf/icZb7mJ/MTPIN WuuwGvuRX1EysbHf91y3jNrqgnB5WLhezrILONBX54U7VOj1uJSnkNWd1V/uEZo0LcXH n02+0itzph7K0wi9vVUGvZsiSSI1Lkeqo6lSoRJUGsz91KB/j2rUKf+ELNxM+Q9CazdH vQVg== X-Gm-Message-State: AOAM5330JrjKZxHD8p7Z22wQMVwN1mLg3rqServKWDS8b7znnI+GiBkv 20Wvd0hFgZsBVpbni0V1ZXUEbw== X-Google-Smtp-Source: ABdhPJwpVf8vaAdumjhQSdDeqbgL5dxM+ou+ZZOdA7zrUNuRezJ3aBS+1wkq56i8sFXVp3G6tOLn4Q== X-Received: by 2002:a05:600c:410f:: with SMTP id j15mr4601927wmi.128.1593195243970; Fri, 26 Jun 2020 11:14:03 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v3 03/30] tests/vm: pass args through to BaseVM's __init__ Date: Fri, 26 Jun 2020 19:13:30 +0100 Message-Id: <20200626181357.26211-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200626181357.26211-1-alex.bennee@linaro.org> References: <20200626181357.26211-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x335.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: fam@euphon.net, berrange@redhat.com, Robert Foley , =?UTF-8?q?Alex=20Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , cota@braap.org, aurelien@aurel32.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Robert Foley Adding the args parameter to BaseVM's __init__. We will shortly need to pass more parameters to the class so let's just pass args rather than growing the parameter list. Signed-off-by: Robert Foley Reviewed-by: Alex Benn=C3=A9e Reviewed-by: Philippe Mathieu-Daud=C3=A9 Tested-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Alex Benn=C3=A9e Message-Id: <20200601211421.1277-2-robert.foley@linaro.org> --- tests/vm/basevm.py | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py index a80b616a08d..5a58e6c3930 100644 --- a/tests/vm/basevm.py +++ b/tests/vm/basevm.py @@ -61,11 +61,10 @@ class BaseVM(object): # 4 is arbitrary, but greater than 2, # since we found we need to wait more than twice as long. tcg_ssh_timeout_multiplier =3D 4 - def __init__(self, debug=3DFalse, vcpus=3DNone, genisoimage=3DNone, - build_path=3DNone): + def __init__(self, args): self._guest =3D None - self._genisoimage =3D genisoimage - self._build_path =3D build_path + self._genisoimage =3D args.genisoimage + self._build_path =3D args.build_path self._tmpdir =3D os.path.realpath(tempfile.mkdtemp(prefix=3D"vm-te= st-", suffix=3D".tmp", dir=3D".")) @@ -78,7 +77,7 @@ class BaseVM(object): self._ssh_pub_key_file =3D os.path.join(self._tmpdir, "id_rsa.pub") open(self._ssh_pub_key_file, "w").write(SSH_PUB_KEY) =20 - self.debug =3D debug + self.debug =3D args.debug self._stderr =3D sys.stderr self._devnull =3D open(os.devnull, "w") if self.debug: @@ -92,8 +91,8 @@ class BaseVM(object): (",ipv6=3Dno" if not self.ipv6 else ""), "-device", "virtio-net-pci,netdev=3Dvnet", "-vnc", "127.0.0.1:0,to=3D20"] - if vcpus and vcpus > 1: - self._args +=3D ["-smp", "%d" % vcpus] + if args.jobs and args.jobs > 1: + self._args +=3D ["-smp", "%d" % args.jobs] if kvm_available(self.arch): self._args +=3D ["-enable-kvm"] else: @@ -456,8 +455,7 @@ def main(vmcls): return 1 logging.basicConfig(level=3D(logging.DEBUG if args.debug else logging.WARN)) - vm =3D vmcls(debug=3Dargs.debug, vcpus=3Dargs.jobs, - genisoimage=3Dargs.genisoimage, build_path=3Dargs.build= _path) + vm =3D vmcls(args) if args.build_image: if os.path.exists(args.image) and not args.force: sys.stderr.writelines(["Image file exists: %s\n" % args.im= age, --=20 2.20.1 From nobody Mon May 6 20:47:38 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1593195478; cv=none; d=zohomail.com; s=zohoarc; b=ndonzE8XVtnCYGTViKwbHDc/nRop+mjyOiZdKNBRpyNk8gk6DG4GZQOHl5ocB+cYPXPobaQ5sNoP37g0knvOfPtw56P/Ec1Ax/xdmpc48vKDQX+yB6utaGFJBufRJLD6t9nC12rk55ChTbF1tYUrsxJtKznyWsuax4c97Uc5LEA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1593195478; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Uqu+G7KWNLFFsBFSWuF2fzigErk1o01AVduM2CJF95Y=; b=GPTXh6/DxnPIAFZnoCqiIIoFlQZDZzGnzQeIGKHtVhkWVhBnlDMkOJwEMoxmdBPg6SU34hfx0hwk5KuXkDUF/ltbWjN7Iuaaa4cAIn1GtdqdgIKZJj9REmQ4FXeD7P3ETqHa2n7508TJKMFv7fkuvXBj9JZ1tO1110DDRwurZTY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1593195478900149.0496757466467; Fri, 26 Jun 2020 11:17:58 -0700 (PDT) Received: from localhost ([::1]:51950 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1josvF-0004E1-Jv for importer@patchew.org; Fri, 26 Jun 2020 14:17:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55974) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1josrc-0007Nr-42 for qemu-devel@nongnu.org; Fri, 26 Jun 2020 14:14:13 -0400 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]:50719) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1josrZ-0001Hd-EC for qemu-devel@nongnu.org; Fri, 26 Jun 2020 14:14:11 -0400 Received: by mail-wm1-x32f.google.com with SMTP id l17so9660159wmj.0 for ; Fri, 26 Jun 2020 11:14:08 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id x5sm18861123wmg.2.2020.06.26.11.13.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jun 2020 11:14:02 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 6F7A81FF90; Fri, 26 Jun 2020 19:13:58 +0100 (BST) 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=Uqu+G7KWNLFFsBFSWuF2fzigErk1o01AVduM2CJF95Y=; b=J+VZ2n8FDiTNpZsfbYz8YFAeUPJQdcmfpHUWVM0Rhgl5E1jXodGsxsrJ3TvAMifoVe XYI0i6d1wE56PDKpsP+15ogDx7JrDBP+/7QxmwuKmfEFbMFJN6Y4i3YgB2vzFcgqIZ9N aA9jNJK/2JJKWt3RZhSRcWhW97tkSs+WKYYdkRN8DubqmbGMhAZKzR+8m3NpYw6/MLQK cBaK1cKBKzSrUzdkW+Ks7CUxdlBtBKCJNDztfEn1qChS2TMJsiz9OqolYbhoX2cKy/X5 h1Eyj5PvBZVpZzC8U/9JHSQxbCUNGVZzNi8eP8VL8DWnmr1pQHXj1HVTR0TO4AbmZhZc vEcw== 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=Uqu+G7KWNLFFsBFSWuF2fzigErk1o01AVduM2CJF95Y=; b=OCoMNYXJPgpj18nI1zNoQ8y1YkDJYqh0qs+qTU1Wnc7qazF95Hfk//8GVFGbdjunAu Sd3k9Y5nEo7W4/6h8YeVPo7W/EirFeN6JrRFjxRgI7/QmxGZXKhhryreWmLG1xvqyK6X A6Wza0zVgcIjpO9DDPpmbZCCb9tf/IBzFM09ILhN8UNdI8SvdNLkTwkCBaomsROzbuFm yopravhrvPdCoYle09Mzt8FsQpfmOkHJ7Y/V9tw9BbD9vzCUcQrCO8kI2bLqiEFEogyu ib3R5d8qjYbyQYFdsdmsdevgGpv8l8mqh9LjZByzYLCkbnqmU1bRg5bEp+01yeDcItix DLCg== X-Gm-Message-State: AOAM531YOVIBpDH1Va+PRPRmjMJEU9yrQUuNnlooMQWhEeQRfn7LFLna fMyMFjUFraSOjPlqqPW7EXBmvg== X-Google-Smtp-Source: ABdhPJyET7WGryS8UCohepC8Vw5r9WQ28i0OQLKu7f88UosQXaeYPVkvDzJqWp6sDEAaXecdk+mAzw== X-Received: by 2002:a1c:99c2:: with SMTP id b185mr5074081wme.52.1593195247309; Fri, 26 Jun 2020 11:14:07 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v3 04/30] tests/vm: Add configuration to basevm.py Date: Fri, 26 Jun 2020 19:13:31 +0100 Message-Id: <20200626181357.26211-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200626181357.26211-1-alex.bennee@linaro.org> References: <20200626181357.26211-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32f; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32f.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: fam@euphon.net, berrange@redhat.com, Robert Foley , =?UTF-8?q?Alex=20Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , cota@braap.org, Peter Puhov , aurelien@aurel32.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Robert Foley Added use of a configuration to tests/vm/basevm.py. The configuration provides parameters used to configure a VM. This allows for providing alternate configurations to the VM being created/launched. cpu, machine, memory, and NUMA configuration are all examples of configuration which we might want to vary on the VM being creat= ed or launched. This will for example allow for creating an aarch64 vm. Signed-off-by: Robert Foley Reviewed-by: Peter Puhov Reviewed-by: Alex Benn=C3=A9e Signed-off-by: Alex Benn=C3=A9e Message-Id: <20200601211421.1277-3-robert.foley@linaro.org> --- tests/vm/basevm.py | 172 +++++++++++++++++++++++++++++++++++---------- 1 file changed, 133 insertions(+), 39 deletions(-) diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py index 5a58e6c3930..cfe20c58f7e 100644 --- a/tests/vm/basevm.py +++ b/tests/vm/basevm.py @@ -29,16 +29,41 @@ import tempfile import shutil import multiprocessing import traceback - -SSH_KEY =3D open(os.path.join(os.path.dirname(__file__), - "..", "keys", "id_rsa")).read() -SSH_PUB_KEY =3D open(os.path.join(os.path.dirname(__file__), - "..", "keys", "id_rsa.pub")).read() - +import shlex + +SSH_KEY_FILE =3D os.path.join(os.path.dirname(__file__), + "..", "keys", "id_rsa") +SSH_PUB_KEY_FILE =3D os.path.join(os.path.dirname(__file__), + "..", "keys", "id_rsa.pub") + +# This is the standard configuration. +# Any or all of these can be overridden by +# passing in a config argument to the VM constructor. +DEFAULT_CONFIG =3D { + 'cpu' : "max", + 'machine' : 'pc', + 'guest_user' : "qemu", + 'guest_pass' : "qemupass", + 'root_pass' : "qemupass", + 'ssh_key_file' : SSH_KEY_FILE, + 'ssh_pub_key_file': SSH_PUB_KEY_FILE, + 'memory' : "4G", + 'extra_args' : [], + 'qemu_args' : "", + 'dns' : "", + 'ssh_port' : 0, + 'install_cmds' : "", + 'boot_dev_type' : "block", + 'ssh_timeout' : 1, +} +BOOT_DEVICE =3D { + 'block' : "-drive file=3D{},if=3Dnone,id=3Ddrive0,cache=3Dwriteback "\ + "-device virtio-blk,drive=3Ddrive0,bootindex=3D0", + 'scsi' : "-device virtio-scsi-device,id=3Dscsi "\ + "-drive file=3D{},format=3Draw,if=3Dnone,id=3Dhd0 "\ + "-device scsi-hd,drive=3Dhd0,bootindex=3D0", +} class BaseVM(object): - GUEST_USER =3D "qemu" - GUEST_PASS =3D "qemupass" - ROOT_PASS =3D "qemupass" =20 envvars =3D [ "https_proxy", @@ -57,25 +82,38 @@ class BaseVM(object): poweroff =3D "poweroff" # enable IPv6 networking ipv6 =3D True + # This is the timeout on the wait for console bytes. + socket_timeout =3D 120 # Scale up some timeouts under TCG. # 4 is arbitrary, but greater than 2, # since we found we need to wait more than twice as long. tcg_ssh_timeout_multiplier =3D 4 - def __init__(self, args): + def __init__(self, args, config=3DNone): self._guest =3D None self._genisoimage =3D args.genisoimage self._build_path =3D args.build_path + # Allow input config to override defaults. + self._config =3D DEFAULT_CONFIG.copy() + if config !=3D None: + self._config.update(config) + self.validate_ssh_keys() self._tmpdir =3D os.path.realpath(tempfile.mkdtemp(prefix=3D"vm-te= st-", suffix=3D".tmp", dir=3D".")) atexit.register(shutil.rmtree, self._tmpdir) - - self._ssh_key_file =3D os.path.join(self._tmpdir, "id_rsa") - open(self._ssh_key_file, "w").write(SSH_KEY) - subprocess.check_call(["chmod", "600", self._ssh_key_file]) - - self._ssh_pub_key_file =3D os.path.join(self._tmpdir, "id_rsa.pub") - open(self._ssh_pub_key_file, "w").write(SSH_PUB_KEY) + # Copy the key files to a temporary directory. + # Also chmod the key file to agree with ssh requirements. + self._config['ssh_key'] =3D \ + open(self._config['ssh_key_file']).read().rstrip() + self._config['ssh_pub_key'] =3D \ + open(self._config['ssh_pub_key_file']).read().rstrip() + self._ssh_tmp_key_file =3D os.path.join(self._tmpdir, "id_rsa") + open(self._ssh_tmp_key_file, "w").write(self._config['ssh_key']) + subprocess.check_call(["chmod", "600", self._ssh_tmp_key_file]) + + self._ssh_tmp_pub_key_file =3D os.path.join(self._tmpdir, "id_rsa.= pub") + open(self._ssh_tmp_pub_key_file, + "w").write(self._config['ssh_pub_key']) =20 self.debug =3D args.debug self._stderr =3D sys.stderr @@ -84,11 +122,14 @@ class BaseVM(object): self._stdout =3D sys.stdout else: self._stdout =3D self._devnull + netdev =3D "user,id=3Dvnet,hostfwd=3D:127.0.0.1:{}-:22" self._args =3D [ \ - "-nodefaults", "-m", "4G", - "-cpu", "max", - "-netdev", "user,id=3Dvnet,hostfwd=3D:127.0.0.1:0-:22" + - (",ipv6=3Dno" if not self.ipv6 else ""), + "-nodefaults", "-m", self._config['memory'], + "-cpu", self._config['cpu'], + "-netdev", + netdev.format(self._config['ssh_port']) + + (",ipv6=3Dno" if not self.ipv6 else "") + + (",dns=3D" + self._config['dns'] if self._config['dns'] else "= "), "-device", "virtio-net-pci,netdev=3Dvnet", "-vnc", "127.0.0.1:0,to=3D20"] if args.jobs and args.jobs > 1: @@ -99,6 +140,55 @@ class BaseVM(object): logging.info("KVM not available, not using -enable-kvm") self._data_args =3D [] =20 + if self._config['qemu_args'] !=3D None: + qemu_args =3D self._config['qemu_args'] + qemu_args =3D qemu_args.replace('\n',' ').replace('\r','') + # shlex groups quoted arguments together + # we need this to keep the quoted args together for when + # the QEMU command is issued later. + args =3D shlex.split(qemu_args) + self._config['extra_args'] =3D [] + for arg in args: + if arg: + # Preserve quotes around arguments. + # shlex above takes them out, so add them in. + if " " in arg: + arg =3D '"{}"'.format(arg) + self._config['extra_args'].append(arg) + + def validate_ssh_keys(self): + """Check to see if the ssh key files exist.""" + if 'ssh_key_file' not in self._config or\ + not os.path.exists(self._config['ssh_key_file']): + raise Exception("ssh key file not found.") + if 'ssh_pub_key_file' not in self._config or\ + not os.path.exists(self._config['ssh_pub_key_file']): + raise Exception("ssh pub key file not found.") + + def wait_boot(self, wait_string=3DNone): + """Wait for the standard string we expect + on completion of a normal boot. + The user can also choose to override with an + alternate string to wait for.""" + if wait_string is None: + if self.login_prompt is None: + raise Exception("self.login_prompt not defined") + wait_string =3D self.login_prompt + # Intentionally bump up the default timeout under TCG, + # since the console wait below takes longer. + timeout =3D self.socket_timeout + if not kvm_available(self.arch): + timeout *=3D 8 + self.console_init(timeout=3Dtimeout) + self.console_wait(wait_string) + + def __getattr__(self, name): + # Support direct access to config by key. + # for example, access self._config['cpu'] by self.cpu + if name.lower() in self._config.keys(): + return self._config[name.lower()] + return object.__getattribute__(self, name) + def _download_with_cache(self, url, sha256sum=3DNone, sha512sum=3DNone= ): def check_sha256sum(fname): if not sha256sum: @@ -130,8 +220,9 @@ class BaseVM(object): "-t", "-o", "StrictHostKeyChecking=3Dno", "-o", "UserKnownHostsFile=3D" + os.devnull, - "-o", "ConnectTimeout=3D1", - "-p", self.ssh_port, "-i", self._ssh_key_file] + "-o", + "ConnectTimeout=3D{}".format(self._config["ssh_timeout"= ]), + "-p", self.ssh_port, "-i", self._ssh_tmp_key_file] # If not in debug mode, set ssh to quiet mode to # avoid printing the results of commands. if not self.debug: @@ -180,14 +271,14 @@ class BaseVM(object): "virtio-blk,drive=3D%s,serial=3D%s,bootindex= =3D1" % (name, name)] =20 def boot(self, img, extra_args=3D[]): - args =3D self._args + [ - "-drive", "file=3D%s,if=3Dnone,id=3Ddrive0,cache=3Dwriteback" = % img, - "-device", "virtio-blk,drive=3Ddrive0,bootindex=3D0"] - args +=3D self._data_args + extra_args + boot_dev =3D BOOT_DEVICE[self._config['boot_dev_type']] + boot_params =3D boot_dev.format(img) + args =3D self._args + boot_params.split(' ') + args +=3D self._data_args + extra_args + self._config['extra_args'] logging.debug("QEMU args: %s", " ".join(args)) qemu_path =3D get_qemu_path(self.arch, self._build_path) guest =3D QEMUMachine(binary=3Dqemu_path, args=3Dargs) - guest.set_machine('pc') + guest.set_machine(self._config['machine']) guest.set_console() try: guest.launch() @@ -301,7 +392,8 @@ class BaseVM(object): self.console_send(command) =20 def console_ssh_init(self, prompt, user, pw): - sshkey_cmd =3D "echo '%s' > .ssh/authorized_keys\n" % SSH_PUB_KEY.= rstrip() + sshkey_cmd =3D "echo '%s' > .ssh/authorized_keys\n" \ + % self._config['ssh_pub_key'].rstrip() self.console_wait_send("login:", "%s\n" % user) self.console_wait_send("Password:", "%s\n" % pw) self.console_wait_send(prompt, "mkdir .ssh\n") @@ -360,23 +452,23 @@ class BaseVM(object): "local-hostname: {}-guest\n".format(name)]) mdata.close() udata =3D open(os.path.join(cidir, "user-data"), "w") - print("guest user:pw {}:{}".format(self.GUEST_USER, - self.GUEST_PASS)) + print("guest user:pw {}:{}".format(self._config['guest_user'], + self._config['guest_pass'])) udata.writelines(["#cloud-config\n", "chpasswd:\n", " list: |\n", - " root:%s\n" % self.ROOT_PASS, - " %s:%s\n" % (self.GUEST_USER, - self.GUEST_PASS), + " root:%s\n" % self._config['root_pass'], + " %s:%s\n" % (self._config['guest_user'], + self._config['guest_pass']), " expire: False\n", "users:\n", - " - name: %s\n" % self.GUEST_USER, + " - name: %s\n" % self._config['guest_user'], " sudo: ALL=3D(ALL) NOPASSWD:ALL\n", " ssh-authorized-keys:\n", - " - %s\n" % SSH_PUB_KEY, + " - %s\n" % self._config['ssh_pub_key'], " - name: root\n", " ssh-authorized-keys:\n", - " - %s\n" % SSH_PUB_KEY, + " - %s\n" % self._config['ssh_pub_key'], "locale: en_US.UTF-8\n"]) proxy =3D os.environ.get("http_proxy") if not proxy is None: @@ -447,15 +539,17 @@ def parse_args(vmcls): parser.disable_interspersed_args() return parser.parse_args() =20 -def main(vmcls): +def main(vmcls, config=3DNone): try: + if config =3D=3D None: + config =3D {} args, argv =3D parse_args(vmcls) if not argv and not args.build_qemu and not args.build_image: print("Nothing to do?") return 1 logging.basicConfig(level=3D(logging.DEBUG if args.debug else logging.WARN)) - vm =3D vmcls(args) + vm =3D vmcls(args, config=3Dconfig) if args.build_image: if os.path.exists(args.image) and not args.force: sys.stderr.writelines(["Image file exists: %s\n" % args.im= age, --=20 2.20.1 From nobody Mon May 6 20:47:38 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1593195340; cv=none; d=zohomail.com; s=zohoarc; b=Xqpp1+cqNmqKYL0dWRiAlaeW0gdyp+kiNNNjmEgO0qWJhN8dz1QJXEjxi+BkFJWzaxGbQ4m/53F/nQhHlz1ejHnbUcy0xeYetdZXVovP9CtcZTSNSTQtKTzzKr3eqpRTtALz8V+pZoKWGtKtuF/Yaqz3rjnTFfxO8mgmzs9y8lM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1593195340; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=exBMseN9TvQ4qzyEbcwp/V21jfsyaYb51WWafgLSxtM=; b=Y5mzWTbe3GexGs7Q/v7Ogt/Wrv/GGuMI8NOF6VuZ9PgGIp7xdZ6N02s8aZTm0p7QfAF4khGUjvIdmbAQWTJyIgZopEdX7ojjcpYUIR8YpboFdw8JClFrQcX0r3CEe8jkrEdF6+SdLb8IJxbT5hjHY4IcmrpzaUhrEV+qh3EJ/u8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1593195340771219.41387144922578; Fri, 26 Jun 2020 11:15:40 -0700 (PDT) Received: from localhost ([::1]:43474 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jost1-0000et-CK for importer@patchew.org; Fri, 26 Jun 2020 14:15:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55934) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1josra-0007Mg-1j for qemu-devel@nongnu.org; Fri, 26 Jun 2020 14:14:11 -0400 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]:39508) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1josrW-0001Gn-RC for qemu-devel@nongnu.org; Fri, 26 Jun 2020 14:14:09 -0400 Received: by mail-wr1-x442.google.com with SMTP id q5so10345945wru.6 for ; Fri, 26 Jun 2020 11:14:05 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id c20sm37120312wrb.65.2020.06.26.11.14.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jun 2020 11:14:02 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id AED931FF91; Fri, 26 Jun 2020 19:13:58 +0100 (BST) 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=exBMseN9TvQ4qzyEbcwp/V21jfsyaYb51WWafgLSxtM=; b=KKe7eY/kx76FiFEaSmz3htP5WrL/Hhkc8RpIGoT9ucmQfshLonSQkCjbhMLaFwC6Zl GHymlAeyKRTc4aFl0cLcNTMDIgb1Oz4p7H36wbP3SMjhVdwhTbgJ8SOeslZEPO04y19H WVb/UJf22GFx4Jgae5eLnLylJhB69tLOofQ3CsEwbFfIITPh+1eS56J3bDA+uI+H9dc4 KoYWAhmxGLlHcMoxaFjQmc+2Bx1u1084BXovZxLXw/o+W/R18o+XsD+O/7bepBLsoQ2n Lzp6KgE5t+t44q2Vmirp/G6UfzNYfd+zzr+IvyoUObh5O1gTCPaE9KudoTIkvdpgj+FQ FySg== 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=exBMseN9TvQ4qzyEbcwp/V21jfsyaYb51WWafgLSxtM=; b=NgY5be7cuob9EDVVuNcSPHsGAo9uVvNabWqK8MwmkWgaWqE6wnIL/26G4H8e0phf5U Uk+1/oTHgpsqMxNBMbKPmGNAKPie5EKDc4OVTGEXhQWKgvJvHukEBybPqSj+l/NykRp+ skQzOmWI/+FTYlo3hBb38/NMLP4TUuCZqPfQeqpON/HebgLcCi9jbS1R1wW2CXFssWZC XNBvOlfiGIn79Py0SNDiO6At1QG8Nd7GZslMf2zF/T6MBcLa7wsTX2Wnk7fr9XYCxk2u WMdSF59SI7F385nmzWs3ZN4QJHH/p5KbthA/Q4dhKnQaz/E7ofxM9B87wOtBQObGjIUk gX9Q== X-Gm-Message-State: AOAM530CtsYvSUAZTgJdslqot/lJkF7BQpRzjfS16zkbLAXzSb9L0lsv Hiom6X3IFa7UjApbhmdUIqSV0g== X-Google-Smtp-Source: ABdhPJy0f/8NDC7UIwRvrJZSS9FGYM+UdD3IpOGo9eMKOrqLi7VbmuT1GUBdpEk3xUhNpbnTUuHhRg== X-Received: by 2002:adf:9307:: with SMTP id 7mr4912875wro.414.1593195244799; Fri, 26 Jun 2020 11:14:04 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v3 05/30] tests/vm: Added configuration file support Date: Fri, 26 Jun 2020 19:13:32 +0100 Message-Id: <20200626181357.26211-6-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200626181357.26211-1-alex.bennee@linaro.org> References: <20200626181357.26211-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::442; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x442.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: fam@euphon.net, berrange@redhat.com, Robert Foley , =?UTF-8?q?Alex=20Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , cota@braap.org, Peter Puhov , aurelien@aurel32.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Robert Foley Changes to tests/vm/basevm.py to allow accepting a configuration file as a parameter. Allows for specifying VM options such as cpu, machine, memory, and arbitrary qemu arguments for specifying options such as NUMA configuration. Also added an example conf_example_aarch64.yml and conf_example_x86.yml. Signed-off-by: Robert Foley Reviewed-by: Peter Puhov Reviewed-by: Alex Benn=C3=A9e Signed-off-by: Alex Benn=C3=A9e Message-Id: <20200601211421.1277-4-robert.foley@linaro.org> --- configure | 9 ++++++ tests/vm/Makefile.include | 6 ++++ tests/vm/basevm.py | 40 +++++++++++++++++++++++- tests/vm/conf_example_aarch64.yml | 51 +++++++++++++++++++++++++++++++ tests/vm/conf_example_x86.yml | 50 ++++++++++++++++++++++++++++++ 5 files changed, 155 insertions(+), 1 deletion(-) create mode 100644 tests/vm/conf_example_aarch64.yml create mode 100644 tests/vm/conf_example_x86.yml diff --git a/configure b/configure index 25b65981142..a9850b1fbea 100755 --- a/configure +++ b/configure @@ -959,6 +959,13 @@ do fi done =20 +# Check for existence of python3 yaml, needed to +# import yaml config files into vm-build. +python_yaml=3D"no" +if $(python3 -c "import yaml" 2> /dev/null); then + python_yaml=3D"yes" +fi + : ${smbd=3D${SMBD-/usr/sbin/smbd}} =20 # Default objcc to clang if available, otherwise use CC @@ -6819,6 +6826,7 @@ if test "$docs" !=3D "no"; then echo "sphinx-build $sphinx_build" fi echo "genisoimage $genisoimage" +echo "python_yaml $python_yaml" echo "slirp support $slirp $(echo_version $slirp $slirp_version)" if test "$slirp" !=3D "no" ; then echo "smbd $smbd" @@ -7899,6 +7907,7 @@ echo "PYTHON=3D$python" >> $config_host_mak echo "SPHINX_BUILD=3D$sphinx_build" >> $config_host_mak echo "SPHINX_WERROR=3D$sphinx_werror" >> $config_host_mak echo "GENISOIMAGE=3D$genisoimage" >> $config_host_mak +echo "PYTHON_YAML=3D$python_yaml" >> $config_host_mak echo "CC=3D$cc" >> $config_host_mak if $iasl -h > /dev/null 2>&1; then echo "IASL=3D$iasl" >> $config_host_mak diff --git a/tests/vm/Makefile.include b/tests/vm/Makefile.include index a253aba4579..f6c3892bb28 100644 --- a/tests/vm/Makefile.include +++ b/tests/vm/Makefile.include @@ -44,6 +44,12 @@ endif @echo " QEMU_LOCAL=3D1 - Use QEMU binary local to this= build." @echo " QEMU=3D/path/to/qemu - Change path to QEMU binary" @echo " QEMU_IMG=3D/path/to/qemu-img - Change path to qemu-img tool" +ifeq ($(PYTHON_YAML),yes) + @echo " QEMU_CONFIG=3D/path/conf.yml - Change path to VM configurati= on .yml file." +else + @echo " (install python3-yaml to enable support for yaml file to confi= gure a VM.)" +endif + @echo " See conf_example_*.yml for file= format details." =20 vm-build-all: $(addprefix vm-build-, $(IMAGES)) =20 diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py index cfe20c58f7e..fa56fbbb4b6 100644 --- a/tests/vm/basevm.py +++ b/tests/vm/basevm.py @@ -481,7 +481,6 @@ class BaseVM(object): cwd=3Dcidir, stdin=3Dself._devnull, stdout=3Dself._stdout, stderr=3Dself._stdout) - return os.path.join(cidir, "cloud-init.iso") =20 def get_qemu_path(arch, build_path=3DNone): @@ -497,6 +496,41 @@ def get_qemu_path(arch, build_path=3DNone): qemu_path =3D "qemu-system-" + arch return qemu_path =20 +def parse_config(config, args): + """ Parse yaml config and populate our config structure. + The yaml config allows the user to override the + defaults for VM parameters. In many cases these + defaults can be overridden without rebuilding the VM.""" + if args.config: + config_file =3D args.config + elif 'QEMU_CONFIG' in os.environ: + config_file =3D os.environ['QEMU_CONFIG'] + else: + return config + if not os.path.exists(config_file): + raise Exception("config file {} does not exist".format(config_file= )) + # We gracefully handle importing the yaml module + # since it might not be installed. + # If we are here it means the user supplied a .yml file, + # so if the yaml module is not installed we will exit with error. + try: + import yaml + except ImportError: + print("The python3-yaml package is needed "\ + "to support config.yaml files") + # Instead of raising an exception we exit to avoid + # a raft of messy (expected) errors to stdout. + exit(1) + with open(config_file) as f: + yaml_dict =3D yaml.safe_load(f) + + if 'qemu-conf' in yaml_dict: + config.update(yaml_dict['qemu-conf']) + else: + raise Exception("config file {} is not valid"\ + " missing qemu-conf".format(config_file)) + return config + def parse_args(vmcls): =20 def get_default_jobs(): @@ -536,6 +570,9 @@ def parse_args(vmcls): help=3D"run tests with a snapshot") parser.add_option("--genisoimage", default=3D"genisoimage", help=3D"iso imaging tool") + parser.add_option("--config", "-c", default=3DNone, + help=3D"Provide config yaml for configuration. "\ + "See config_example.yaml for example.") parser.disable_interspersed_args() return parser.parse_args() =20 @@ -547,6 +584,7 @@ def main(vmcls, config=3DNone): if not argv and not args.build_qemu and not args.build_image: print("Nothing to do?") return 1 + config =3D parse_config(config, args) logging.basicConfig(level=3D(logging.DEBUG if args.debug else logging.WARN)) vm =3D vmcls(args, config=3Dconfig) diff --git a/tests/vm/conf_example_aarch64.yml b/tests/vm/conf_example_aarc= h64.yml new file mode 100644 index 00000000000..9d44ae356f7 --- /dev/null +++ b/tests/vm/conf_example_aarch64.yml @@ -0,0 +1,51 @@ +# +# Example yaml for use by any of the scripts in tests/vm. +# Can be provided as an environment variable QEMU_CONFIG +# +qemu-conf: + + # If any of the below are not provided, we will just use the qemu defa= ults. + + # Login username and password(has to be sudo enabled) + guest_user: qemu + guest_pass: "qemupass" + + # Password for root user can be different from guest. + root_pass: "qemupass" + + # If one key is provided, both must be provided. + #ssh_key: /complete/path/of/your/keyfile/id_rsa + #ssh_pub_key: /complete/path/of/your/keyfile/id_rsa.pub + + cpu: max + machine: virt,gic-version=3Dmax + memory: 16G + + # The below is a example for how to configure NUMA topology with + # 4 NUMA nodes and 2 different NUMA distances. + qemu_args: "-smp cpus=3D16,sockets=3D2,cores=3D8 + -numa node,cpus=3D0-3,nodeid=3D0 -numa node,cpus=3D4-7,nod= eid=3D1 + -numa node,cpus=3D8-11,nodeid=3D2 -numa node,cpus=3D12-15,= nodeid=3D3 + -numa dist,src=3D0,dst=3D1,val=3D15 -numa dist,src=3D2,dst= =3D3,val=3D15 + -numa dist,src=3D0,dst=3D2,val=3D20 -numa dist,src=3D0,dst= =3D3,val=3D20 + -numa dist,src=3D1,dst=3D2,val=3D20 -numa dist,src=3D1,dst= =3D3,val=3D20" + + # By default we do not set the DNS. + # You override the defaults by setting the below. + #dns: 1.234.567.89 + + # By default we will use a "block" device, but + # you can also boot from a "scsi" device. + # Just keep in mind your scripts might need to change + # As you will have /dev/sda instead of /dev/vda (for block device) + boot_dev_type: "block" + + # By default the ssh port is not fixed. + # A fixed ssh port makes it easier for automated tests. + #ssh_port: 5555 + + # To install a different set of packages, provide a command to issue + #install_cmds: "apt-get update ; apt-get build-dep -y qemu" + + # Or to skip the install entirely, just provide "" + #install_cmds: "" diff --git a/tests/vm/conf_example_x86.yml b/tests/vm/conf_example_x86.yml new file mode 100644 index 00000000000..78d3f5830fa --- /dev/null +++ b/tests/vm/conf_example_x86.yml @@ -0,0 +1,50 @@ +# +# Example yaml for use by any of the x86 based scripts in tests/vm. +# Can be provided as an environment variable QEMU_CONFIG +# +qemu-conf: + + # If any of the below are not provided, we will just use the qemu defa= ults. + + # Login username and password(has to be sudo enabled) + guest_user: "qemu" + guest_pass: "qemupass" + + # Password for root user can be different from guest. + root_pass: "qemupass" + + # Provide default ssh keys of current user. + # You need to edit the below for your user. + #ssh_key_file: /home//.ssh/id_rsa + #ssh_pub_key_file: /home//.ssh/id_rsa.pub + + cpu: max + machine: pc + memory: 8G + + # The below is a example for how to configure NUMA topology with + # 4 NUMA nodes and 2 different NUMA distances. + qemu_args: "-smp cpus=3D8,sockets=3D2,cores=3D4 + -object memory-backend-ram,size=3D4G,policy=3Dbind,host-no= des=3D0,id=3Dram-node0 + -object memory-backend-ram,size=3D4G,policy=3Dbind,host-no= des=3D0,id=3Dram-node1 + -object memory-backend-ram,size=3D4G,policy=3Dbind,host-no= des=3D1,id=3Dram-node2 + -object memory-backend-ram,size=3D4G,policy=3Dbind,host-no= des=3D1,id=3Dram-node3 + -numa node,cpus=3D0-1,nodeid=3D0 -numa node,cpus=3D2-3,nod= eid=3D1 + -numa node,cpus=3D4-5,nodeid=3D2 -numa node,cpus=3D6-7,nod= eid=3D3 + -numa dist,src=3D0,dst=3D1,val=3D15 -numa dist,src=3D2,dst= =3D3,val=3D15 + -numa dist,src=3D0,dst=3D2,val=3D20 -numa dist,src=3D0,dst= =3D3,val=3D20 + -numa dist,src=3D1,dst=3D2,val=3D20 -numa dist,src=3D1,dst= =3D3,val=3D20" + + # By default we do not set the DNS. + # You override the defaults by setting the below. + #dns: "1.234.567.89" + + # By default we will use a "block" device, but + # you can also boot from a "scsi" device. + # Just keep in mind your scripts might need to change + # As you will have /dev/sda instead of /dev/vda (for block device) + boot_dev_type: "block" + + # By default the ssh port is not fixed. + # A fixed ssh port makes it easier for automated tests. + ssh_port: 5555 --=20 2.20.1 From nobody Mon May 6 20:47:38 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1593195652; cv=none; d=zohomail.com; s=zohoarc; b=bf59sAs3eSTmF5a7KjYuWp30PkyYl3sswHYZMrkeamIf0cmATdgyPYFi8yc4kS4VXdCxrjtjqWR/nOtAAgMUtkNDhu5VYpzC19Se4Gdoqu+yE3YEc68d2UrjOuBU81Txtwmduu5R9SGM6oLsRcWYJP1Uw3fJqGnOORpub8zkXT4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1593195652; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=yfaWvkBHiSQ15nCnLOaiCfwwNxNyBgCuiCJ/EYYdU+8=; b=Iok9/bnVUwPY9f1i3SwmmgYuvQahuzhE7CIGWSXpEDfF8d+NTKGoUheGK5YQbek4TsKuI2jptBlNwEmTEw3+Yy9W93aE79vkeX0dw7L3QyRnMciOpOiDY2BNA9sMbHwVlmYW3ZnwIHgo5WrvUw1SJUXkpfZp3iymh0N9Rdc+iCc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1593195652250870.2151104565777; Fri, 26 Jun 2020 11:20:52 -0700 (PDT) Received: from localhost ([::1]:34414 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1josy3-0000HI-2f for importer@patchew.org; Fri, 26 Jun 2020 14:20:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55996) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1josrd-0007OL-UQ for qemu-devel@nongnu.org; Fri, 26 Jun 2020 14:14:14 -0400 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]:34576) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1josrX-0001HB-EO for qemu-devel@nongnu.org; Fri, 26 Jun 2020 14:14:13 -0400 Received: by mail-wr1-x436.google.com with SMTP id f7so7363299wrw.1 for ; Fri, 26 Jun 2020 11:14:06 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id w12sm29001370wrm.79.2020.06.26.11.14.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jun 2020 11:14:02 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id D0B8D1FF92; Fri, 26 Jun 2020 19:13:58 +0100 (BST) 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=yfaWvkBHiSQ15nCnLOaiCfwwNxNyBgCuiCJ/EYYdU+8=; b=H9y8qnqV/C/E1j2VRlzjUtgmVPCJv4XRdL0It4X+SXP4L7fUDROyr2OsHNJu/Ez/IC zH2r4Zazzi8Yvryuv/pSi4frhOS02VItQImTL/fIjxMOF5ys6CSfScml0P5CM2eTQL/e 0E5J0/QorF/tqv9qMDs3nEepKNpcY42Qk+5K0pyzGixCe6TzUl9FJPhplmBy8KhleUSm lgCkNRI19jx2E+M6dYX6P+U08GNIpwtVZZa8/MKrGO+oklj7F4ztYmb0PeYdTx5tM96U kccx2xjvhAPRo1bqxfoEhUFqMgPRXUSFMuciPtUTc/CKPcJuTwMEmwE2F/O4DfhPUmjs IJnA== 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=yfaWvkBHiSQ15nCnLOaiCfwwNxNyBgCuiCJ/EYYdU+8=; b=KODVz1IwMkZqbjS7ZMPkVBFn1sD0Pqft+dksy1xd0eC0r4D/2yof7dbGuM8i8xFKpX FZmwyOd8wW9uFu1HCHDhIZ1MTOPEaDdUmFmjCtnAItohh0hK8WOrpGJNPDHZxZPPl49e BdZeonYVtX6A/MWUu73bpDqeEe4dULBf/sBXJ7e2BtxRiZErBm6UlzOXZ99MSB1DuoW2 rEBtJUQpW9gIIaWj6WdGi9+zNYcCJbmH5nn3NcTBv1GfKy65hrBut33EPn5o2F02Zz9G GAabqakZSCpsPQkCdS3eQrTwc3rKnnx2cV2GCliSZxglrnH1lKNotwyroCm2Yn8X4Db2 sO/g== X-Gm-Message-State: AOAM531XuXQeuVfuasDqJjzeQjrOr3VrLoKCLO1pHOil63DvLtyw3GkO 71uxrbp0HFYghpZfY4oDGdlrnw== X-Google-Smtp-Source: ABdhPJynz9nDwsbsKdSbHMPT2AQPO1SdvPxIAPpRdvwitrw0bwq3/EUK8Ledr60OCPB+jfNOOlt2eQ== X-Received: by 2002:adf:e50a:: with SMTP id j10mr5320023wrm.71.1593195245974; Fri, 26 Jun 2020 11:14:05 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v3 06/30] tests/vm: Add common Ubuntu python module Date: Fri, 26 Jun 2020 19:13:33 +0100 Message-Id: <20200626181357.26211-7-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200626181357.26211-1-alex.bennee@linaro.org> References: <20200626181357.26211-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::436; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x436.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: fam@euphon.net, berrange@redhat.com, Robert Foley , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , richard.henderson@linaro.org, f4bug@amsat.org, =?UTF-8?q?Alex=20Benn=C3=A9e?= , cota@braap.org, aurelien@aurel32.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Robert Foley Add a common Ubuntu python module and make use of it with the ubuntu.i386 script. This is preparation for adding an Ubuntu script ubuntu.aarch64. Splitting out the common logic such as build_image() will reduce duplication. Signed-off-by: Robert Foley Tested-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Alex Benn=C3=A9e Message-Id: <20200601211421.1277-5-robert.foley@linaro.org> --- tests/vm/ubuntu.i386 | 46 +++++++++------------------------ tests/vm/ubuntuvm.py | 60 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 72 insertions(+), 34 deletions(-) create mode 100644 tests/vm/ubuntuvm.py diff --git a/tests/vm/ubuntu.i386 b/tests/vm/ubuntu.i386 index 24527cc78c7..5ce72610a6c 100755 --- a/tests/vm/ubuntu.i386 +++ b/tests/vm/ubuntu.i386 @@ -11,15 +11,22 @@ # the COPYING file in the top-level directory. # =20 -import os import sys -import subprocess import basevm -import time +import ubuntuvm =20 -class UbuntuX86VM(basevm.BaseVM): +DEFAULT_CONFIG =3D { + 'install_cmds' : "apt-get update,"\ + "apt-get build-dep -y qemu,"\ + "apt-get install -y libfdt-dev language-pack-en", +} + +class UbuntuX86VM(ubuntuvm.UbuntuVM): name =3D "ubuntu.i386" arch =3D "i386" + image_link=3D"https://cloud-images.ubuntu.com/releases/bionic/"\ + "release-20191114/ubuntu-18.04-server-cloudimg-i386.img" + image_sha256=3D"28969840626d1ea80bb249c08eef1a4533e8904aa51a327b40f37a= c4b4ff04ef" BUILD_SCRIPT =3D """ set -e; cd $(mktemp -d); @@ -29,34 +36,5 @@ class UbuntuX86VM(basevm.BaseVM): make --output-sync {target} -j{jobs} {verbose}; """ =20 - def build_image(self, img): - cimg =3D self._download_with_cache( - "https://cloud-images.ubuntu.com/releases/bionic/release-20191= 114/ubuntu-18.04-server-cloudimg-i386.img", - sha256sum=3D"28969840626d1ea80bb249c08eef1a4533e8904aa51a327b4= 0f37ac4b4ff04ef") - img_tmp =3D img + ".tmp" - subprocess.check_call(["cp", "-f", cimg, img_tmp]) - self.exec_qemu_img("resize", img_tmp, "50G") - self.boot(img_tmp, extra_args =3D [ - "-device", "VGA", - "-cdrom", self.gen_cloud_init_iso() - ]) - self.wait_ssh() - self.ssh_root_check("touch /etc/cloud/cloud-init.disabled") - self.ssh_root_check("apt-get update") - self.ssh_root_check("apt-get install -y cloud-initramfs-growroot") - # Don't check the status in case the guest hang up too quickly - self.ssh_root("sync && reboot") - time.sleep(5) - self.wait_ssh() - # The previous update sometimes doesn't survive a reboot, so do it= again - self.ssh_root_check("sed -ie s/^#\ deb-src/deb-src/g /etc/apt/sour= ces.list") - self.ssh_root_check("apt-get update") - self.ssh_root_check("apt-get build-dep -y qemu") - self.ssh_root_check("apt-get install -y libfdt-dev language-pack-e= n") - self.ssh_root("poweroff") - self.wait() - os.rename(img_tmp, img) - return 0 - if __name__ =3D=3D "__main__": - sys.exit(basevm.main(UbuntuX86VM)) + sys.exit(basevm.main(UbuntuX86VM, DEFAULT_CONFIG)) diff --git a/tests/vm/ubuntuvm.py b/tests/vm/ubuntuvm.py new file mode 100644 index 00000000000..6689ad87aa8 --- /dev/null +++ b/tests/vm/ubuntuvm.py @@ -0,0 +1,60 @@ +#!/usr/bin/env python3 +# +# Ubuntu VM testing library +# +# Copyright 2017 Red Hat Inc. +# Copyright 2020 Linaro +# +# Authors: +# Robert Foley +# Originally based on ubuntu.i386 Fam Zheng +# +# This code is licensed under the GPL version 2 or later. See +# the COPYING file in the top-level directory. + +import os +import subprocess +import basevm + +class UbuntuVM(basevm.BaseVM): + + def __init__(self, args, config=3DNone): + self.login_prompt =3D "ubuntu-{}-guest login:".format(self.arch) + basevm.BaseVM.__init__(self, args, config) + + def build_image(self, img): + """Build an Ubuntu VM image. The child class will + define the install_cmds to init the VM.""" + os_img =3D self._download_with_cache(self.image_link, + sha256sum=3Dself.image_sha256) + img_tmp =3D img + ".tmp" + subprocess.check_call(["cp", "-f", os_img, img_tmp]) + self.exec_qemu_img("resize", img_tmp, "+50G") + ci_img =3D self.gen_cloud_init_iso() + + self.boot(img_tmp, extra_args =3D [ "-device", "VGA", "-cdrom", ci= _img, ]) + + # First command we issue is fix for slow ssh login. + self.wait_ssh(wait_root=3DTrue, + cmd=3D"chmod -x /etc/update-motd.d/*") + # Wait for cloud init to finish + self.wait_ssh(wait_root=3DTrue, + cmd=3D"ls /var/lib/cloud/instance/boot-finished") + self.ssh_root("touch /etc/cloud/cloud-init.disabled") + # Disable auto upgrades. + # We want to keep the VM system state stable. + self.ssh_root('sed -ie \'s/"1"/"0"/g\' '\ + '/etc/apt/apt.conf.d/20auto-upgrades') + self.ssh_root("sed -ie s/^#\ deb-src/deb-src/g /etc/apt/sources.li= st") + + # If the user chooses not to do the install phase, + # then we will jump right to the graceful shutdown + if self._config['install_cmds'] !=3D "": + # Issue the install commands. + # This can be overriden by the user in the config .yml. + install_cmds =3D self._config['install_cmds'].split(',') + for cmd in install_cmds: + self.ssh_root(cmd) + self.graceful_shutdown() + os.rename(img_tmp, img) + return 0 --=20 2.20.1 From nobody Mon May 6 20:47:38 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1593195735; cv=none; d=zohomail.com; s=zohoarc; b=IW4eIwKLr34Gz+98HuhLlt6nVy3J2/NH09eulEEH66gU7Owoo4+SHqlFWLTCQmQzmydp3Ij37vIOtNNAcHcn1eVU6R35OtwJzrArk4l7+eySBSmwdkJf4RqrLj3Rs5rQX6SWUg5yx2xPjJ9V92PBIgcOd2HTa7X8hn9kDVYWXHQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1593195735; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=cVi5NHLgjEFhTHyOjhgA64ZHWIO8zaXgNTQ2jePoJjg=; b=C7Btewta/qUyRZF8vBsjk3uKm4fiX/CFspFHhRoSYUkT6OQQMDV+nS+UhY49RCh8Vv2vnvC62vNEXLEuI3mcqZQMteR2rVz8ZZJkvteLGo7AWE0WADLGM3C95eSZl0RoViFShfDHP06w0fCznEbPHUJADELrE+qTwXVyOwIt1jg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1593195735627586.967733324841; Fri, 26 Jun 2020 11:22:15 -0700 (PDT) Received: from localhost ([::1]:38712 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1joszO-00022Q-93 for importer@patchew.org; Fri, 26 Jun 2020 14:22:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56030) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1josrf-0007Ok-OP for qemu-devel@nongnu.org; Fri, 26 Jun 2020 14:14:15 -0400 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]:35115) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1josra-0001Hv-91 for qemu-devel@nongnu.org; Fri, 26 Jun 2020 14:14:15 -0400 Received: by mail-wr1-x42d.google.com with SMTP id g18so10398889wrm.2 for ; Fri, 26 Jun 2020 11:14:09 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id n16sm31070093wrq.39.2020.06.26.11.14.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jun 2020 11:14:02 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 1134B1FF93; Fri, 26 Jun 2020 19:13:59 +0100 (BST) 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=cVi5NHLgjEFhTHyOjhgA64ZHWIO8zaXgNTQ2jePoJjg=; b=d+pc3NFoVfnNlkitri8sBFEZftlPnR4jPIOw6AP50vUOhKXo/Buh7i0Y2aQn+jGIXS zKpcdan8JTc26zQnnJA9pwKL4iSeWXDg7XCkMjccoY2I3jj14UHNM65XSEHY6IW9ou/U 0a09hrR3IAHgPLyyK3QjCbmIdmFemPPbXx8s+eIN8H7wDgV++oxQu1wfdEt5OO7pFm1t 58YMhLYcZnFHlFw/bYogTsc2Rauax2eShpu5JKqwiW6uU+Iw5npFdBOsz4yW41YMwxOo xkLchGnFXTTS56Kahb3W6J8RmdSIS5xpwnHkQasoe7pfnqM/fgl28gHSus/kSzecn7EP gbGg== 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=cVi5NHLgjEFhTHyOjhgA64ZHWIO8zaXgNTQ2jePoJjg=; b=dmys1uRRjZMFwGPAZA2UoeLrZ8UL5oBhDtnsS3TMVYoG/6xTJ/yDg4D1o4DesZj8p/ cwEexWXofHIaLpVwVWnBxg8UyP/3er1byaoUD6VRgG0v7lYQSKf5vBXmB2I1iQi3efeC G2+g4eU+qYx7q43uOSnSb2Hh53JHxJ94knkoBdwYQ/UWF/fu1qOg+viPIigqIgtd4reW mcwwIl7US7OgxxrOWC1bgelGeDKmJ9aB/LKwkRO60fa71rX1NZ6Xkw7OSAEOeZWNii44 5PrNn1Fkj/Z+zFU60DTptDKIqPX51/JPWitmPixAmwPxuaRF723sL5QM26UEHF7smv9D slDQ== X-Gm-Message-State: AOAM533AVSYpDdQUXnBcgXnSJ3EjkxkRRCk/LdvJKvL5RxIXDFQHgK8b fTm7kIg85Cosf1yy40tTzUWuVg== X-Google-Smtp-Source: ABdhPJyWkzYrOcZu2WgvbyskJcEYyjKX7/+5bxQbqnxhE3CB1Tm9nitfhdpNDS8VydWhwNs7psbC+g== X-Received: by 2002:a5d:4e81:: with SMTP id e1mr4772489wru.22.1593195248769; Fri, 26 Jun 2020 11:14:08 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v3 07/30] tests/vm: Added a new script for ubuntu.aarch64. Date: Fri, 26 Jun 2020 19:13:34 +0100 Message-Id: <20200626181357.26211-8-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200626181357.26211-1-alex.bennee@linaro.org> References: <20200626181357.26211-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42d; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42d.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: fam@euphon.net, berrange@redhat.com, Robert Foley , =?UTF-8?q?Alex=20Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , cota@braap.org, Peter Puhov , aurelien@aurel32.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Robert Foley ubuntu.aarch64 provides a script to create an Ubuntu 18.04 VM. Another new file is also added aarch64vm.py, which is a module with common methods used by aarch64 VMs, such as how to create the flash images. Signed-off-by: Robert Foley Reviewed-by: Peter Puhov Signed-off-by: Alex Benn=C3=A9e Message-Id: <20200601211421.1277-6-robert.foley@linaro.org> --- configure | 20 +++++++ tests/vm/Makefile.include | 11 ++++ tests/vm/aarch64vm.py | 106 ++++++++++++++++++++++++++++++++++++++ tests/vm/basevm.py | 12 +++++ tests/vm/ubuntu.aarch64 | 68 ++++++++++++++++++++++++ 5 files changed, 217 insertions(+) create mode 100644 tests/vm/aarch64vm.py create mode 100755 tests/vm/ubuntu.aarch64 diff --git a/configure b/configure index a9850b1fbea..0750049e017 100755 --- a/configure +++ b/configure @@ -418,6 +418,7 @@ prefix=3D"/usr/local" mandir=3D"\${prefix}/share/man" datadir=3D"\${prefix}/share" firmwarepath=3D"\${prefix}/share/qemu-firmware" +efi_aarch64=3D"" qemu_docdir=3D"\${prefix}/share/doc/qemu" bindir=3D"\${prefix}/bin" libdir=3D"\${prefix}/lib" @@ -1108,6 +1109,8 @@ for opt do ;; --firmwarepath=3D*) firmwarepath=3D"$optarg" ;; + --efi-aarch64=3D*) efi_aarch64=3D"$optarg" + ;; --host=3D*|--build=3D*|\ --disable-dependency-tracking|\ --sbindir=3D*|--sharedstatedir=3D*|\ @@ -1782,6 +1785,7 @@ Advanced options (experts only): --sysconfdir=3DPATH install config in PATH$confsuffix --localstatedir=3DPATH install local state in PATH (set at runtime o= n win32) --firmwarepath=3DPATH search PATH for firmware files + --efi-aarch64=3DPATH PATH of efi file to use for aarch64 VMs. --with-confsuffix=3DSUFFIX suffix for QEMU data inside datadir/libdir/sy= sconfdir [$confsuffix] --with-pkgversion=3DVERS use specified string as sub-version of the pa= ckage --enable-debug enable common debug build options @@ -3600,6 +3604,20 @@ EOF fi fi =20 +############################################ +# efi-aarch64 probe +# Check for efi files needed by aarch64 VMs. +# By default we will use the efi included with QEMU. +# Allow user to override the path for efi also. +if ! test -f "$efi_aarch64"; then + if test -f $source_path/pc-bios/edk2-aarch64-code.fd.bz2; then + # valid after build + efi_aarch64=3D$PWD/pc-bios/edk2-aarch64-code.fd + else + efi_aarch64=3D"" + fi +fi + ########################################## # libcap-ng library probe if test "$cap_ng" !=3D "no" ; then @@ -6826,6 +6844,7 @@ if test "$docs" !=3D "no"; then echo "sphinx-build $sphinx_build" fi echo "genisoimage $genisoimage" +echo "efi_aarch64 $efi_aarch64" echo "python_yaml $python_yaml" echo "slirp support $slirp $(echo_version $slirp $slirp_version)" if test "$slirp" !=3D "no" ; then @@ -7907,6 +7926,7 @@ echo "PYTHON=3D$python" >> $config_host_mak echo "SPHINX_BUILD=3D$sphinx_build" >> $config_host_mak echo "SPHINX_WERROR=3D$sphinx_werror" >> $config_host_mak echo "GENISOIMAGE=3D$genisoimage" >> $config_host_mak +echo "EFI_AARCH64=3D$efi_aarch64" >> $config_host_mak echo "PYTHON_YAML=3D$python_yaml" >> $config_host_mak echo "CC=3D$cc" >> $config_host_mak if $iasl -h > /dev/null 2>&1; then diff --git a/tests/vm/Makefile.include b/tests/vm/Makefile.include index f6c3892bb28..4fa292765d5 100644 --- a/tests/vm/Makefile.include +++ b/tests/vm/Makefile.include @@ -5,6 +5,9 @@ IMAGES :=3D freebsd netbsd openbsd centos fedora ifneq ($(GENISOIMAGE),) IMAGES +=3D ubuntu.i386 centos +ifneq ($(EFI_AARCH64),) +IMAGES +=3D ubuntu.aarch64 +endif endif =20 IMAGES_DIR :=3D $(HOME)/.cache/qemu-vm/images @@ -23,6 +26,11 @@ vm-help vm-test: ifneq ($(GENISOIMAGE),) @echo " vm-build-centos - Build QEMU in CentOS VM, with = Docker" @echo " vm-build-ubuntu.i386 - Build QEMU in ubuntu i386 VM" +ifneq ($(EFI_AARCH64),) + @echo " vm-build-ubuntu.aarch64 - Build QEMU in ubuntu aarch64 V= M" +else + @echo " (to build centos/ubuntu aarch64 images use configure --efi-aarch= 64)" +endif else @echo " (install genisoimage to build centos/ubuntu images)" endif @@ -65,6 +73,7 @@ $(IMAGES_DIR)/%.img: $(SRC_PATH)/tests/vm/% \ $(if $(V)$(DEBUG), --debug) \ $(if $(GENISOIMAGE),--genisoimage $(GENISOIMAGE)) \ $(if $(QEMU_LOCAL),--build-path $(BUILD_DIR)) \ + $(if $(EFI_AARCH64),--efi-aarch64 $(EFI_AARCH64)) \ --image "$@" \ --force \ --build-image $@, \ @@ -80,6 +89,7 @@ vm-build-%: $(IMAGES_DIR)/%.img $(if $(J),--jobs $(J)) \ $(if $(V),--verbose) \ $(if $(QEMU_LOCAL),--build-path $(BUILD_DIR)) \ + $(if $(EFI_AARCH64),--efi-aarch64 $(EFI_AARCH64)) \ --image "$<" \ $(if $(BUILD_TARGET),--build-target $(BUILD_TARGET)) \ --snapshot \ @@ -102,6 +112,7 @@ vm-boot-ssh-%: $(IMAGES_DIR)/%.img $(if $(J),--jobs $(J)) \ $(if $(V)$(DEBUG), --debug) \ $(if $(QEMU_LOCAL),--build-path $(BUILD_DIR)) \ + $(if $(EFI_AARCH64),--efi-aarch64 $(EFI_AARCH64)) \ --image "$<" \ --interactive \ false, \ diff --git a/tests/vm/aarch64vm.py b/tests/vm/aarch64vm.py new file mode 100644 index 00000000000..bb04cb19c91 --- /dev/null +++ b/tests/vm/aarch64vm.py @@ -0,0 +1,106 @@ +#!/usr/bin/env python3 +# +# VM testing aarch64 library +# +# Copyright 2020 Linaro +# +# Authors: +# Robert Foley +# +# This code is licensed under the GPL version 2 or later. See +# the COPYING file in the top-level directory. +# +import os +import sys +import subprocess +import basevm +from qemu.accel import kvm_available + +# This is the config needed for current version of QEMU. +# This works for both kvm and tcg. +CURRENT_CONFIG =3D { + 'cpu' : "max", + 'machine' : "virt,gic-version=3Dmax", +} + +# The minimum minor version of QEMU we will support with aarch64 VMs is 3. +# QEMU versions less than 3 have various issues running these VMs. +QEMU_AARCH64_MIN_VERSION =3D 3 + +# The DEFAULT_CONFIG will default to a version of +# parameters that works for backwards compatibility. +DEFAULT_CONFIG =3D {'kvm' : {'cpu' : "host", + 'machine' : "virt,gic-version=3Dhost"}, + 'tcg' : {'cpu' : "cortex-a57", + 'machine' : "virt"}, +} + +def get_config_defaults(vmcls, default_config): + """Fetch the configuration defaults for this VM, + taking into consideration the defaults for + aarch64 first, followed by the defaults for this VM.""" + config =3D default_config + config.update(aarch_get_config_defaults(vmcls)) + return config + +def aarch_get_config_defaults(vmcls): + """Set the defaults for current version of QEMU.""" + config =3D CURRENT_CONFIG + args, argv =3D basevm.parse_args(vmcls) + qemu_path =3D basevm.get_qemu_path(vmcls.arch, args.build_path) + qemu_version =3D basevm.get_qemu_version(qemu_path) + if qemu_version < QEMU_AARCH64_MIN_VERSION: + error =3D "\nThis major version of QEMU {} is to old for aarch64 V= Ms.\n"\ + "The major version must be at least {}.\n"\ + "To continue with the current build of QEMU, "\ + "please restart with QEMU_LOCAL=3D1 .\n" + print(error.format(qemu_version, QEMU_AARCH64_MIN_VERSION)) + exit(1) + if qemu_version =3D=3D QEMU_AARCH64_MIN_VERSION: + # We have an older version of QEMU, + # set the config values for backwards compatibility. + if kvm_available('aarch64'): + config.update(DEFAULT_CONFIG['kvm']) + else: + config.update(DEFAULT_CONFIG['tcg']) + return config + +def create_flash_images(flash_dir=3D"./", efi_img=3D""): + """Creates the appropriate pflash files + for an aarch64 VM.""" + flash0_path =3D get_flash_path(flash_dir, "flash0") + flash1_path =3D get_flash_path(flash_dir, "flash1") + fd_null =3D open(os.devnull, 'w') + subprocess.check_call(["dd", "if=3D/dev/zero", "of=3D{}".format(flash0= _path), + "bs=3D1M", "count=3D64"], + stdout=3Dfd_null, stderr=3Dsubprocess.STDOUT) + # A reliable way to get the QEMU EFI image is via an installed package= or + # via the bios included with qemu. + if not os.path.exists(efi_img): + sys.stderr.write("*** efi argument is invalid ({})\n".format(efi_i= mg)) + sys.stderr.write("*** please check --efi-aarch64 argument or "\ + "install qemu-efi-aarch64 package\n") + exit(3) + subprocess.check_call(["dd", "if=3D{}".format(efi_img), + "of=3D{}".format(flash0_path), + "conv=3Dnotrunc"], + stdout=3Dfd_null, stderr=3Dsubprocess.STDOUT) + subprocess.check_call(["dd", "if=3D/dev/zero", + "of=3D{}".format(flash1_path), + "bs=3D1M", "count=3D64"], + stdout=3Dfd_null, stderr=3Dsubprocess.STDOUT) + fd_null.close() + +def get_pflash_args(flash_dir=3D"./"): + """Returns a string that can be used to + boot qemu using the appropriate pflash files + for aarch64.""" + flash0_path =3D get_flash_path(flash_dir, "flash0") + flash1_path =3D get_flash_path(flash_dir, "flash1") + pflash_args_str =3D "-drive file=3D{},format=3Draw,if=3Dpflash "\ + "-drive file=3D{},format=3Draw,if=3Dpflash" + pflash_args =3D pflash_args_str.format(flash0_path, flash1_path) + return pflash_args.split(" ") + +def get_flash_path(flash_dir, name): + return os.path.join(flash_dir, "{}.img".format(name)) diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py index fa56fbbb4b6..5fd66f6b26a 100644 --- a/tests/vm/basevm.py +++ b/tests/vm/basevm.py @@ -92,6 +92,7 @@ class BaseVM(object): self._guest =3D None self._genisoimage =3D args.genisoimage self._build_path =3D args.build_path + self._efi_aarch64 =3D args.efi_aarch64 # Allow input config to override defaults. self._config =3D DEFAULT_CONFIG.copy() if config !=3D None: @@ -496,6 +497,14 @@ def get_qemu_path(arch, build_path=3DNone): qemu_path =3D "qemu-system-" + arch return qemu_path =20 +def get_qemu_version(qemu_path): + """Get the version number from the current QEMU, + and return the major number.""" + output =3D subprocess.check_output([qemu_path, '--version']) + version_line =3D output.decode("utf-8") + version_num =3D re.split(' |\(', version_line)[3].split('.')[0] + return int(version_num) + def parse_config(config, args): """ Parse yaml config and populate our config structure. The yaml config allows the user to override the @@ -573,6 +582,9 @@ def parse_args(vmcls): parser.add_option("--config", "-c", default=3DNone, help=3D"Provide config yaml for configuration. "\ "See config_example.yaml for example.") + parser.add_option("--efi-aarch64", + default=3D"/usr/share/qemu-efi-aarch64/QEMU_EFI.fd", + help=3D"Path to efi image for aarch64 VMs.") parser.disable_interspersed_args() return parser.parse_args() =20 diff --git a/tests/vm/ubuntu.aarch64 b/tests/vm/ubuntu.aarch64 new file mode 100755 index 00000000000..21d454c27f1 --- /dev/null +++ b/tests/vm/ubuntu.aarch64 @@ -0,0 +1,68 @@ +#!/usr/bin/env python3 +# +# Ubuntu aarch64 image +# +# Copyright 2020 Linaro +# +# Authors: +# Robert Foley +# Originally based on ubuntu.i386 Fam Zheng +# +# This code is licensed under the GPL version 2 or later. See +# the COPYING file in the top-level directory. +# + +import sys +import basevm +import aarch64vm +import ubuntuvm + +DEFAULT_CONFIG =3D { + 'cpu' : "cortex-a57", + 'machine' : "virt,gic-version=3D3", + 'install_cmds' : "apt-get update,"\ + "apt-get build-dep -y --arch-only qemu,"\ + "apt-get install -y libfdt-dev pkg-config language-pa= ck-en", + # We increase beyond the default time since during boot + # it can take some time (many seconds) to log into the VM + # especially using softmmu. + 'ssh_timeout' : 60, +} + +class UbuntuAarch64VM(ubuntuvm.UbuntuVM): + name =3D "ubuntu.aarch64" + arch =3D "aarch64" + image_name =3D "ubuntu-18.04-server-cloudimg-arm64.img" + image_link =3D "https://cloud-images.ubuntu.com/releases/18.04/release= /" + image_name + image_sha256=3D"0fdcba761965735a8a903d8b88df8e47f156f48715c00508e4315c= 506d7d3cb1" + BUILD_SCRIPT =3D """ + set -e; + cd $(mktemp -d); + sudo chmod a+r /dev/vdb; + tar --checkpoint=3D.10 -xf /dev/vdb; + ./configure {configure_opts}; + make --output-sync {target} -j{jobs} {verbose}; + """ + def boot(self, img, extra_args=3DNone): + aarch64vm.create_flash_images(self._tmpdir, self._efi_aarch64) + default_args =3D aarch64vm.get_pflash_args(self._tmpdir) + if extra_args: + extra_args.extend(default_args) + else: + extra_args =3D default_args + # We always add these performance tweaks + # because without them, we boot so slowly that we + # can time out finding the boot efi device. + if '-smp' not in extra_args and \ + '-smp' not in self._config['extra_args'] and \ + '-smp' not in self._args: + # Only add if not already there to give caller option to chang= e it. + extra_args.extend(["-smp", "8"]) + + # We have overridden boot() since aarch64 has additional parameter= s. + # Call down to the base class method. + super(UbuntuAarch64VM, self).boot(img, extra_args=3Dextra_args) + +if __name__ =3D=3D "__main__": + defaults =3D aarch64vm.get_config_defaults(UbuntuAarch64VM, DEFAULT_CO= NFIG) + sys.exit(basevm.main(UbuntuAarch64VM, defaults)) --=20 2.20.1 From nobody Mon May 6 20:47:38 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1593195826; cv=none; d=zohomail.com; s=zohoarc; b=KmQa2qyHUtWmd6TCAB6KynxTS9g1itfrgqeBUE9kKvf5j+kJCbuc7WrjyDiftoVVM8KO9m4OSZsNvqrrA9HYpzy5gJpY/I29FvRcj/UhMLeyeBuLgv507+JcwUVaGpVxzvlyRiRTbcd2q3gKZfyapfKOPbz0r7lv3dUIFzqzeMQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1593195826; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=kdMIZtPe+aZda1/mXQW7aQb8KseTM0tT+oUaOxEz8I4=; b=BK7CrLAJIphrMTx5Ipczvzn4oW6f3lnZ+KwTba9g08MIq1WXUFRxifQU3eK6rl07m8Zb65xYHXtaoc74e3HwDx8Z95k9B3TQPv7XL2UT6enLp/cMGs7/TEkO3WT75+MYkAhqUCSkIjdjvHunSB5FUJzEFKabyWKRWlYjWlPLSzs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1593195826170515.3119388253316; Fri, 26 Jun 2020 11:23:46 -0700 (PDT) Received: from localhost ([::1]:45306 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jot0q-0004jp-RC for importer@patchew.org; Fri, 26 Jun 2020 14:23:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56054) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1josrg-0007Pt-P2 for qemu-devel@nongnu.org; Fri, 26 Jun 2020 14:14:16 -0400 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]:35206) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1josrd-0001IW-Jp for qemu-devel@nongnu.org; Fri, 26 Jun 2020 14:14:16 -0400 Received: by mail-wm1-x32d.google.com with SMTP id l2so8733074wmf.0 for ; Fri, 26 Jun 2020 11:14:12 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id n17sm24992298wrs.2.2020.06.26.11.14.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jun 2020 11:14:03 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 3D16B1FF96; Fri, 26 Jun 2020 19:13:59 +0100 (BST) 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=kdMIZtPe+aZda1/mXQW7aQb8KseTM0tT+oUaOxEz8I4=; b=KDjDK0+jZg6M+2SDMYAfuZ6GiUG1EbLmwxbPOaqIz7lJH6HNnLaSf0WmDyDSzUFZF6 IGkG6oqi+qWC6iEsuzVu3zMsSJ3EdwOsapa55fFOoEjAAZUve6iJ9M8d8dySSIETbhbn QkHd4sz4O6mkgnqmIqAvBQMaw7CTvKA98kmdV2JAwqF31Q1V2Y2Ts+hOvUDqY660S3B0 BGpxB9eTIIwV5QxXMMmc9eVu7PB+VjJQ2ikzCI4RIAHnjyu5cITFrIRI9YH7u3UBiH4D hN42+XTQgsOu/wn7DHq2pOsI4Q39ivZ/gQaeB7j2MS1GPmJKk6Mrp8GMUWvlZCUoAJUj SqrA== 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=kdMIZtPe+aZda1/mXQW7aQb8KseTM0tT+oUaOxEz8I4=; b=egjqVltqsDM1tDqaTklf1aIgw4i47iLo3wX4ocOmVlOq8wWMDpvdHbcec/lx1p8Uvz oiRdWfjkgxe995BRFDwGHi2dFD4w4M8Nq6i33gSf2NjyEcgNmLyAxgUNGG8RC3xtWxSc iOBMjCAhnfqAjvvEQG9YmQXcCxozGPICGuo1EbKgL/4Kv6WTBRnH8IXqrJGMPLicHj/b cCKY3ILcomQsCc5iWnkdn8H9TQ8LStUrleFK6pGBqCImaQRUqgY3RFX/F+O1qjZ40V13 wJRihCqCPeCGiee93w0vVP8NUdfkFuNZAxASIcdtQIXFr0sSZ9oRNH9PxXOHMeC06UyZ EQig== X-Gm-Message-State: AOAM533Yet+YuYSa05Ech6REQgG0jkunFN+mxI04Dcamr/h47he4bN7N 4hqIx8n/SYa7LVfzwFFqfPtU2g== X-Google-Smtp-Source: ABdhPJw+vafbblC7GxH1Vs5EHdB0UWB0Dck9kgssQaLwMpm5KYVlv9k9Ppoyhu2iJsWQhzyGjMxqnw== X-Received: by 2002:a1c:6102:: with SMTP id v2mr4874910wmb.6.1593195250187; Fri, 26 Jun 2020 11:14:10 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v3 08/30] tests/vm: Added a new script for centos.aarch64. Date: Fri, 26 Jun 2020 19:13:35 +0100 Message-Id: <20200626181357.26211-9-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200626181357.26211-1-alex.bennee@linaro.org> References: <20200626181357.26211-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32d.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: fam@euphon.net, berrange@redhat.com, Robert Foley , =?UTF-8?q?Alex=20Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , cota@braap.org, Peter Puhov , aurelien@aurel32.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Robert Foley centos.aarch64 creates a CentOS 8 image. Also added a new kickstart script used to build the centos.aarch64 image. Signed-off-by: Robert Foley Reviewed-by: Peter Puhov Reviewed-by: Alex Benn=C3=A9e Signed-off-by: Alex Benn=C3=A9e Message-Id: <20200601211421.1277-7-robert.foley@linaro.org> --- tests/vm/Makefile.include | 3 +- tests/vm/centos-8-aarch64.ks | 51 ++++++++ tests/vm/centos.aarch64 | 227 +++++++++++++++++++++++++++++++++++ 3 files changed, 280 insertions(+), 1 deletion(-) create mode 100644 tests/vm/centos-8-aarch64.ks create mode 100755 tests/vm/centos.aarch64 diff --git a/tests/vm/Makefile.include b/tests/vm/Makefile.include index 4fa292765d5..39f918a430a 100644 --- a/tests/vm/Makefile.include +++ b/tests/vm/Makefile.include @@ -6,7 +6,7 @@ IMAGES :=3D freebsd netbsd openbsd centos fedora ifneq ($(GENISOIMAGE),) IMAGES +=3D ubuntu.i386 centos ifneq ($(EFI_AARCH64),) -IMAGES +=3D ubuntu.aarch64 +IMAGES +=3D ubuntu.aarch64 centos.aarch64 endif endif =20 @@ -28,6 +28,7 @@ ifneq ($(GENISOIMAGE),) @echo " vm-build-ubuntu.i386 - Build QEMU in ubuntu i386 VM" ifneq ($(EFI_AARCH64),) @echo " vm-build-ubuntu.aarch64 - Build QEMU in ubuntu aarch64 V= M" + @echo " vm-build-centos.aarch64 - Build QEMU in CentOS aarch64 V= M" else @echo " (to build centos/ubuntu aarch64 images use configure --efi-aarch= 64)" endif diff --git a/tests/vm/centos-8-aarch64.ks b/tests/vm/centos-8-aarch64.ks new file mode 100644 index 00000000000..fd6ebe4d49e --- /dev/null +++ b/tests/vm/centos-8-aarch64.ks @@ -0,0 +1,51 @@ +# CentOS aarch64 image kickstart file. +# This file is used by the CentOS installer to +# script the generation of the image. +# +# Copyright 2020 Linaro +# +ignoredisk --only-use=3Dvda +# System bootloader configuration +bootloader --append=3D" crashkernel=3Dauto" --location=3Dmbr --boot-drive= =3Dvda +autopart --type=3Dplain +# Partition clearing information +clearpart --linux --initlabel --drives=3Dvda +# Use text mode install +text +repo --name=3D"AppStream" --baseurl=3Dfile:///run/install/repo/AppStream +# Use CDROM installation media +cdrom +# Keyboard layouts +keyboard --vckeymap=3Dus --xlayouts=3D'' +# System language +lang en_US.UTF-8 + +# Network information +network --bootproto=3Ddhcp --device=3Denp0s1 --onboot=3Doff --ipv6=3Dauto= --no-activate +network --hostname=3Dlocalhost.localdomain +# Run the Setup Agent on first boot +firstboot --enable +# Do not configure the X Window System +skipx +# System services +services --enabled=3D"chronyd" +# System timezone +timezone America/New_York --isUtc + +# Shutdown after installation is complete. +shutdown + +%packages +@^server-product-environment +kexec-tools + +%end + +%addon com_redhat_kdump --enable --reserve-mb=3D'auto' + +%end +%anaconda +pwpolicy root --minlen=3D6 --minquality=3D1 --notstrict --nochanges --note= mpty +pwpolicy user --minlen=3D6 --minquality=3D1 --notstrict --nochanges --empt= yok +pwpolicy luks --minlen=3D6 --minquality=3D1 --notstrict --nochanges --note= mpty +%end diff --git a/tests/vm/centos.aarch64 b/tests/vm/centos.aarch64 new file mode 100755 index 00000000000..d5232ecdb8c --- /dev/null +++ b/tests/vm/centos.aarch64 @@ -0,0 +1,227 @@ +#!/usr/bin/env python3 +# +# Centos aarch64 image +# +# Copyright 2020 Linaro +# +# Authors: +# Robert Foley +# Originally based on ubuntu.aarch64 +# +# This code is licensed under the GPL version 2 or later. See +# the COPYING file in the top-level directory. +# + +import os +import sys +import subprocess +import basevm +import time +import traceback +import aarch64vm + +DEFAULT_CONFIG =3D { + 'cpu' : "max", + 'machine' : "virt,gic-version=3Dmax", + 'install_cmds' : "yum install -y make git python3 gcc gcc-c++ flex bis= on, "\ + "yum install -y glib2-devel pixman-devel zlib-devel, "\ + "yum install -y perl-Test-Harness, "\ + "alternatives --set python /usr/bin/python3, "\ + "sudo dnf config-manager "\ + "--add-repo=3Dhttps://download.docker.com/linux/centos/docker-ce.r= epo,"\ + "sudo dnf install --nobest -y docker-ce.aarch64,"\ + "systemctl enable docker", + # We increase beyond the default time since during boot + # it can take some time (many seconds) to log into the VM. + 'ssh_timeout' : 60, +} + +class CentosAarch64VM(basevm.BaseVM): + name =3D "centos.aarch64" + arch =3D "aarch64" + login_prompt =3D "localhost login:" + prompt =3D '[root@localhost ~]#' + image_name =3D "CentOS-8-aarch64-1905-dvd1.iso" + image_link =3D "http://mirrors.usc.edu/pub/linux/distributions/centos/= 8.0.1905/isos/aarch64/" + image_link +=3D image_name + BUILD_SCRIPT =3D """ + set -e; + cd $(mktemp -d); + sudo chmod a+r /dev/vdb; + tar --checkpoint=3D.10 -xf /dev/vdb; + ./configure {configure_opts}; + make --output-sync {target} -j{jobs} {verbose}; + """ + def set_key_perm(self): + """Set permissions properly on certain files to allow + ssh access.""" + self.console_wait_send(self.prompt, + "/usr/sbin/restorecon -R -v /root/.ssh\n") + self.console_wait_send(self.prompt, + "/usr/sbin/restorecon -R -v "\ + "/home/{}/.ssh\n".format(self._config["guest_user"])) + + def create_kickstart(self): + """Generate the kickstart file used to generate the centos image."= "" + # Start with the template for the kickstart. + ks_file =3D "../tests/vm/centos-8-aarch64.ks" + subprocess.check_call("cp {} ./ks.cfg".format(ks_file), shell=3DTr= ue) + # Append the ssh keys to the kickstart file + # as the post processing phase of installation. + with open("ks.cfg", "a") as f: + # Add in the root pw and guest user. + rootpw =3D "rootpw --plaintext {}\n" + f.write(rootpw.format(self._config["root_pass"])) + add_user =3D "user --groups=3Dwheel --name=3D{} "\ + "--password=3D{} --plaintext\n" + f.write(add_user.format(self._config["guest_user"], + self._config["guest_pass"])) + # Add the ssh keys. + f.write("%post --log=3D/root/ks-post.log\n") + f.write("mkdir -p /root/.ssh\n") + addkey =3D 'echo "{}" >> /root/.ssh/authorized_keys\n' + addkey_cmd =3D addkey.format(self._config["ssh_pub_key"]) + f.write(addkey_cmd) + f.write('mkdir -p /home/{}/.ssh\n'.format(self._config["guest_= user"])) + addkey =3D 'echo "{}" >> /home/{}/.ssh/authorized_keys\n' + addkey_cmd =3D addkey.format(self._config["ssh_pub_key"], + self._config["guest_user"]) + f.write(addkey_cmd) + f.write("%end\n") + # Take our kickstart file and create an .iso from it. + # The .iso will be provided to qemu as we boot + # from the install dvd. + # Anaconda will recognize the label "OEMDRV" and will + # start the automated installation. + gen_iso_img =3D 'genisoimage -output ks.iso -volid "OEMDRV" ks.cfg' + subprocess.check_call(gen_iso_img, shell=3DTrue) + + def wait_for_shutdown(self): + """We wait for qemu to shutdown the VM and exit. + While this happens we display the console view + for easier debugging.""" + # The image creation is essentially done, + # so whether or not the wait is successful we want to + # wait for qemu to exit (the self.wait()) before we return. + try: + self.console_wait("reboot: Power down") + except Exception as e: + sys.stderr.write("Exception hit\n") + if isinstance(e, SystemExit) and e.code =3D=3D 0: + return 0 + traceback.print_exc() + finally: + self.wait() + + def build_base_image(self, dest_img): + """Run through the centos installer to create + a base image with name dest_img.""" + # We create the temp image, and only rename + # to destination when we are done. + img =3D dest_img + ".tmp" + # Create an empty image. + # We will provide this as the install destination. + qemu_img_create =3D "qemu-img create {} 50G".format(img) + subprocess.check_call(qemu_img_create, shell=3DTrue) + + # Create our kickstart file to be fed to the installer. + self.create_kickstart() + # Boot the install dvd with the params as our ks.iso + os_img =3D self._download_with_cache(self.image_link) + dvd_iso =3D "centos-8-dvd.iso" + subprocess.check_call(["cp", "-f", os_img, dvd_iso]) + extra_args =3D "-cdrom ks.iso" + extra_args +=3D " -drive file=3D{},if=3Dnone,id=3Ddrive1,cache=3Dw= riteback" + extra_args +=3D " -device virtio-blk,drive=3Ddrive1,bootindex=3D1" + extra_args =3D extra_args.format(dvd_iso).split(" ") + self.boot(img, extra_args=3Dextra_args) + self.console_wait_send("change the selection", "\n") + # We seem to need to hit esc (chr(27)) twice to abort the + # media check, which takes a long time. + # Waiting a bit seems to be more reliable before hitting esc. + self.console_wait("Checking") + time.sleep(5) + self.console_wait_send("Checking", chr(27)) + time.sleep(5) + self.console_wait_send("Checking", chr(27)) + print("Found Checking") + # Give sufficient time for the installer to create the image. + self.console_init(timeout=3D7200) + self.wait_for_shutdown() + os.rename(img, dest_img) + print("Done with base image build: {}".format(dest_img)) + + def check_create_base_img(self, img_base, img_dest): + """Create a base image using the installer. + We will use the base image if it exists. + This helps cut down on install time in case we + need to restart image creation, + since the base image creation can take a long time.""" + if not os.path.exists(img_base): + print("Generate new base image: {}".format(img_base)) + self.build_base_image(img_base); + else: + print("Use existing base image: {}".format(img_base)) + # Save a copy of the base image and copy it to dest. + # which we will use going forward. + subprocess.check_call(["cp", img_base, img_dest]) + + def boot(self, img, extra_args=3DNone): + aarch64vm.create_flash_images(self._tmpdir, self._efi_aarch64) + default_args =3D aarch64vm.get_pflash_args(self._tmpdir) + if extra_args: + extra_args.extend(default_args) + else: + extra_args =3D default_args + # We always add these performance tweaks + # because without them, we boot so slowly that we + # can time out finding the boot efi device. + if '-smp' not in extra_args and \ + '-smp' not in self._config['extra_args'] and \ + '-smp' not in self._args: + # Only add if not already there to give caller option to chang= e it. + extra_args.extend(["-smp", "8"]) + # We have overridden boot() since aarch64 has additional parameter= s. + # Call down to the base class method. + super(CentosAarch64VM, self).boot(img, extra_args=3Dextra_args) + + def build_image(self, img): + img_tmp =3D img + ".tmp" + self.check_create_base_img(img + ".base", img_tmp) + + # Boot the new image for the first time to finish installation. + self.boot(img_tmp) + self.console_init() + self.console_wait_send(self.login_prompt, "root\n") + self.console_wait_send("Password:", + "{}\n".format(self._config["root_pass"])) + + self.set_key_perm() + self.console_wait_send(self.prompt, "rpm -q centos-release\n") + enable_adapter =3D "sed -i 's/ONBOOT=3Dno/ONBOOT=3Dyes/g'" \ + " /etc/sysconfig/network-scripts/ifcfg-enp0s1\n" + self.console_wait_send(self.prompt, enable_adapter) + self.console_wait_send(self.prompt, "ifup enp0s1\n") + self.console_wait_send(self.prompt, + 'echo "qemu ALL=3D(ALL) NOPASSWD:ALL" | '\ + 'sudo tee /etc/sudoers.d/qemu\n') + self.console_wait(self.prompt) + + # Rest of the commands we issue through ssh. + self.wait_ssh(wait_root=3DTrue) + + # If the user chooses *not* to do the second phase, + # then we will jump right to the graceful shutdown + if self._config['install_cmds'] !=3D "": + install_cmds =3D self._config['install_cmds'].split(',') + for cmd in install_cmds: + self.ssh_root(cmd) + self.ssh_root("poweroff") + self.wait_for_shutdown() + os.rename(img_tmp, img) + print("image creation complete: {}".format(img)) + return 0 + +if __name__ =3D=3D "__main__": + defaults =3D aarch64vm.get_config_defaults(CentosAarch64VM, DEFAULT_CO= NFIG) + sys.exit(basevm.main(CentosAarch64VM, defaults)) --=20 2.20.1 From nobody Mon May 6 20:47:38 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1593196057; cv=none; d=zohomail.com; s=zohoarc; b=eWLjURwPc5d4Pn7yRoZKImYh+XhVSpSu82mGImZQhluzKsRermG7BCeUDorBWObCJbSYiwdYuseqfBwhBBD1LBYwYGxaU9EcQj9qzZRWfw44JJ/xowWfonI6TKnyAuEAbqka6NPOiZsgDwsh4GD7leEMXDsno5GJRuQRBHpkecU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1593196057; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=qDw5tmNjtaEA2MrxzXTWX9WRb/d3hDPxln94PjTXX2k=; b=nUlKhrbMJAfoNq8ZTSfpI8x/By0p86W0v27CVQWRmrptFK9n09RDhdcq9Cgp7HbwgDCpwexWQuDhxePRGyoOzkksehcnEvLNzE18n7alNIIt0NQt11LZd7V4vpuD4DsdFeD0XoAXNVDHyeCzwg6QGXH1fPMAxD52BgWt9gwh0JQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 159319605742858.48087422396907; Fri, 26 Jun 2020 11:27:37 -0700 (PDT) Received: from localhost ([::1]:34120 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jot4a-0003JQ-70 for importer@patchew.org; Fri, 26 Jun 2020 14:27:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56086) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1josrk-0007SX-T0 for qemu-devel@nongnu.org; Fri, 26 Jun 2020 14:14:20 -0400 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]:53347) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1josrf-0001JA-DV for qemu-devel@nongnu.org; Fri, 26 Jun 2020 14:14:19 -0400 Received: by mail-wm1-x344.google.com with SMTP id j18so9641070wmi.3 for ; Fri, 26 Jun 2020 11:14:14 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id 3sm12669605wmi.45.2020.06.26.11.14.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jun 2020 11:14:07 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 7B6151FF98; Fri, 26 Jun 2020 19:13:59 +0100 (BST) 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=qDw5tmNjtaEA2MrxzXTWX9WRb/d3hDPxln94PjTXX2k=; b=EQyjrExPcikg9C74seF3s35U/80VETqAjs2cwnbpyDCVzCXw7/QJ+TjMJx08xSqkuC uH4inj0YPBks67O7LchaudyDpQR5x3oZhzrsNHZCWCiNApx4lBlzcFMRehV+3zlAJQTa p4xGKix7AlmVuhM2MQr7w/CHtUeQzbZq48duDGIMHMGYNkaKVq93P+xTiHX+bJBRc5wN PLbPyYsql+D71/OA1BbOfWhgBpi2PuOMdDoFtwJZhOOcp2MPjwGrBdHaCflvKNUM9YkH kJ3gjeAL0mKJ8ziB/c9mHQPRasCSia5vvdx/wAZOarRMLHtbDJufBBYYYi1Vhsol83dS UpTw== 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=qDw5tmNjtaEA2MrxzXTWX9WRb/d3hDPxln94PjTXX2k=; b=d+VgWqVUCXU/K4xb3iYYcEQV/RKrlqM+vhk4TgRhEpjaPbDvKK4VAOPHEsAmZZzUOt EX9j2ARQyOJ9KNYYgwJa3eFNRy5hcB6YGClyZgFp0ZCfJLYZOwdGsmlDKWGjRYDCC2Lm AKl6+3FeWasCMI2Jl03nWWXyfsTMrdB/LIRu+A3cTDNjv810XgpsmkFMGiUNVa9O1FTN Zgq42zbb5c4wnvCQNWuZe5+rmtDdqut4z1uRS2G4cmh5ACQxRlQ3rht9YHB84a6iMNwd zeM3He443iYC5LqAFbtvMUdOUlu6AcLka6sJClJrdxh/I9Mi4KT9vYctruv0aoc23DOr 3FXQ== X-Gm-Message-State: AOAM532VVoa8+eVSEBZgNVGWmh3smuGGmJDHfTzSE3AGlCq9zIuubE37 UnHk14+yJ41kwelzNOEGPx4HoA== X-Google-Smtp-Source: ABdhPJzIfxDgYiN6jLh2fwvTlJSk5GjR5Zit8tighI61zX4fXYl3WWcbcStn/B//m4eLsjWL9tliWw== X-Received: by 2002:a1c:a986:: with SMTP id s128mr4999454wme.121.1593195253695; Fri, 26 Jun 2020 11:14:13 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v3 09/30] tests/vm: change scripts to use self._config Date: Fri, 26 Jun 2020 19:13:36 +0100 Message-Id: <20200626181357.26211-10-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200626181357.26211-1-alex.bennee@linaro.org> References: <20200626181357.26211-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::344; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x344.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: fam@euphon.net, berrange@redhat.com, Robert Foley , =?UTF-8?q?Alex=20Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , cota@braap.org, Peter Puhov , aurelien@aurel32.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Robert Foley This change converts existing scripts to using for example self.ROOT_PASS, to self._config['root_pass']. We made similar changes for GUEST_USER, and GUEST_PASS. This allows us also to remove the change in basevm.py, which adds __getattr__ for backwards compatibility. Signed-off-by: Robert Foley Reviewed-by: Peter Puhov Signed-off-by: Alex Benn=C3=A9e Message-Id: <20200601211421.1277-8-robert.foley@linaro.org> Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- tests/vm/basevm.py | 11 ++--------- tests/vm/fedora | 17 +++++++++-------- tests/vm/freebsd | 16 ++++++++-------- tests/vm/netbsd | 19 ++++++++++--------- tests/vm/openbsd | 17 +++++++++-------- 5 files changed, 38 insertions(+), 42 deletions(-) diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py index 5fd66f6b26a..f716798b405 100644 --- a/tests/vm/basevm.py +++ b/tests/vm/basevm.py @@ -183,13 +183,6 @@ class BaseVM(object): self.console_init(timeout=3Dtimeout) self.console_wait(wait_string) =20 - def __getattr__(self, name): - # Support direct access to config by key. - # for example, access self._config['cpu'] by self.cpu - if name.lower() in self._config.keys(): - return self._config[name.lower()] - return object.__getattribute__(self, name) - def _download_with_cache(self, url, sha256sum=3DNone, sha512sum=3DNone= ): def check_sha256sum(fname): if not sha256sum: @@ -239,13 +232,13 @@ class BaseVM(object): return r =20 def ssh(self, *cmd): - return self._ssh_do(self.GUEST_USER, cmd, False) + return self._ssh_do(self._config["guest_user"], cmd, False) =20 def ssh_root(self, *cmd): return self._ssh_do("root", cmd, False) =20 def ssh_check(self, *cmd): - self._ssh_do(self.GUEST_USER, cmd, True) + self._ssh_do(self._config["guest_user"], cmd, True) =20 def ssh_root_check(self, *cmd): self._ssh_do("root", cmd, True) diff --git a/tests/vm/fedora b/tests/vm/fedora index a9195670f4b..b2b478fdbca 100755 --- a/tests/vm/fedora +++ b/tests/vm/fedora @@ -108,20 +108,20 @@ class FedoraVM(basevm.BaseVM): =20 self.console_wait_send("7) [!] Root password", "7\n") self.console_wait("Password:") - self.console_send("%s\n" % self.ROOT_PASS) + self.console_send("%s\n" % self._config["root_pass"]) self.console_wait("Password (confirm):") - self.console_send("%s\n" % self.ROOT_PASS) + self.console_send("%s\n" % self._config["root_pass"]) =20 self.console_wait_send("8) [ ] User creation", "8\n") self.console_wait_send("1) [ ] Create user", "1\n") self.console_wait_send("3) User name", "3\n") - self.console_wait_send("ENTER:", "%s\n" % self.GUEST_USER) + self.console_wait_send("ENTER:", "%s\n" % self._config["guest_user= "]) self.console_wait_send("4) [ ] Use password", "4\n") self.console_wait_send("5) Password", "5\n") self.console_wait("Password:") - self.console_send("%s\n" % self.GUEST_PASS) + self.console_send("%s\n" % self._config["guest_pass"]) self.console_wait("Password (confirm):") - self.console_send("%s\n" % self.GUEST_PASS) + self.console_send("%s\n" % self._config["guest_pass"]) self.console_wait_send("7) Groups", "c\n") =20 while True: @@ -139,7 +139,7 @@ class FedoraVM(basevm.BaseVM): if good: break time.sleep(10) - self.console_send("r\n" % self.GUEST_PASS) + self.console_send("r\n" % self._config["guest_pass"]) =20 self.console_wait_send("'b' to begin install", "b\n") =20 @@ -150,12 +150,13 @@ class FedoraVM(basevm.BaseVM): =20 # setup qemu user prompt =3D " ~]$" - self.console_ssh_init(prompt, self.GUEST_USER, self.GUEST_PASS) + self.console_ssh_init(prompt, self._config["guest_user"], + self._config["guest_pass"]) self.console_wait_send(prompt, "exit\n") =20 # setup root user prompt =3D " ~]#" - self.console_ssh_init(prompt, "root", self.ROOT_PASS) + self.console_ssh_init(prompt, "root", self._config["root_pass"]) self.console_sshd_config(prompt) =20 # setup virtio-blk #1 (tarfile) diff --git a/tests/vm/freebsd b/tests/vm/freebsd index f87db2b126e..29252fa4a64 100755 --- a/tests/vm/freebsd +++ b/tests/vm/freebsd @@ -113,9 +113,9 @@ class FreeBSDVM(basevm.BaseVM): =20 # post-install configuration self.console_wait("New Password:") - self.console_send("%s\n" % self.ROOT_PASS) + self.console_send("%s\n" % self._config["root_pass"]) self.console_wait("Retype New Password:") - self.console_send("%s\n" % self.ROOT_PASS) + self.console_send("%s\n" % self._config["root_pass"]) =20 self.console_wait_send("Network Configuration", "\n") self.console_wait_send("IPv4", "y") @@ -134,9 +134,9 @@ class FreeBSDVM(basevm.BaseVM): # qemu user self.console_wait_send("Add User Accounts", "y") self.console_wait("Username") - self.console_send("%s\n" % self.GUEST_USER) + self.console_send("%s\n" % self._config["guest_user"]) self.console_wait("Full name") - self.console_send("%s\n" % self.GUEST_USER) + self.console_send("%s\n" % self._config["guest_user"]) self.console_wait_send("Uid", "\n") self.console_wait_send("Login group", "\n") self.console_wait_send("Login group", "\n") @@ -148,9 +148,9 @@ class FreeBSDVM(basevm.BaseVM): self.console_wait_send("Use an empty password", "\n") self.console_wait_send("Use a random password", "\n") self.console_wait("Enter password:") - self.console_send("%s\n" % self.GUEST_PASS) + self.console_send("%s\n" % self._config["guest_pass"]) self.console_wait("Enter password again:") - self.console_send("%s\n" % self.GUEST_PASS) + self.console_send("%s\n" % self._config["guest_pass"]) self.console_wait_send("Lock out", "\n") self.console_wait_send("OK", "yes\n") self.console_wait_send("Add another user", "no\n") @@ -164,12 +164,12 @@ class FreeBSDVM(basevm.BaseVM): =20 # setup qemu user prompt =3D "$" - self.console_ssh_init(prompt, self.GUEST_USER, self.GUEST_PASS) + self.console_ssh_init(prompt, self._config["guest_user"], self._co= nfig["guest_pass"]) self.console_wait_send(prompt, "exit\n") =20 # setup root user prompt =3D "root@freebsd:~ #" - self.console_ssh_init(prompt, "root", self.ROOT_PASS) + self.console_ssh_init(prompt, "root", self._config["root_pass"]) self.console_sshd_config(prompt) =20 # setup serial console diff --git a/tests/vm/netbsd b/tests/vm/netbsd index cdac502dad8..dc0e45c1d45 100755 --- a/tests/vm/netbsd +++ b/tests/vm/netbsd @@ -120,24 +120,24 @@ class NetBSDVM(basevm.BaseVM): self.console_wait_send("d: Change root password", "d\n") self.console_wait_send("a: Yes", "a\n") self.console_wait("New password:") - self.console_send("%s\n" % self.ROOT_PASS) + self.console_send("%s\n" % self._config["root_pass"]) self.console_wait("New password:") - self.console_send("%s\n" % self.ROOT_PASS) + self.console_send("%s\n" % self._config["root_pass"]) self.console_wait("Retype new password:") - self.console_send("%s\n" % self.ROOT_PASS) + self.console_send("%s\n" % self._config["root_pass"]) =20 self.console_wait_send("o: Add a user", "o\n") self.console_wait("username") - self.console_send("%s\n" % self.GUEST_USER) + self.console_send("%s\n" % self._config["guest_pass"]) self.console_wait("to group wheel") self.console_wait_send("a: Yes", "a\n") self.console_wait_send("a: /bin/sh", "a\n") self.console_wait("New password:") - self.console_send("%s\n" % self.GUEST_PASS) + self.console_send("%s\n" % self._config["guest_pass"]) self.console_wait("New password:") - self.console_send("%s\n" % self.GUEST_PASS) + self.console_send("%s\n" % self._config["guest_pass"]) self.console_wait("Retype new password:") - self.console_send("%s\n" % self.GUEST_PASS) + self.console_send("%s\n" % self._config["guest_pass"]) =20 self.console_wait_send("a: Configure network", "a\n") self.console_wait_send("a: vioif0", "a\n") @@ -170,12 +170,13 @@ class NetBSDVM(basevm.BaseVM): =20 # setup qemu user prompt =3D "localhost$" - self.console_ssh_init(prompt, self.GUEST_USER, self.GUEST_PASS) + self.console_ssh_init(prompt, self._config["guest_user"], + self._config["guest_pass"]) self.console_wait_send(prompt, "exit\n") =20 # setup root user prompt =3D "localhost#" - self.console_ssh_init(prompt, "root", self.ROOT_PASS) + self.console_ssh_init(prompt, "root", self._config["root_pass"]) self.console_sshd_config(prompt) =20 # setup virtio-blk #1 (tarfile) diff --git a/tests/vm/openbsd b/tests/vm/openbsd index 13e7f9a6d56..dfe633e4532 100755 --- a/tests/vm/openbsd +++ b/tests/vm/openbsd @@ -98,9 +98,9 @@ class OpenBSDVM(basevm.BaseVM): self.console_wait_send("Which network interface", "done\n") self.console_wait_send("DNS domain name", "localnet\n") self.console_wait("Password for root account") - self.console_send("%s\n" % self.ROOT_PASS) + self.console_send("%s\n" % self._config["root_pass"]) self.console_wait("Password for root account") - self.console_send("%s\n" % self.ROOT_PASS) + self.console_send("%s\n" % self._config["root_pass"]) self.console_wait_send("Start sshd(8)", "yes\n") self.console_wait_send("X Window System", "\n") self.console_wait_send("xenodm", "\n") @@ -108,13 +108,13 @@ class OpenBSDVM(basevm.BaseVM): self.console_wait_send("Which speed", "\n") =20 self.console_wait("Setup a user") - self.console_send("%s\n" % self.GUEST_USER) + self.console_send("%s\n" % self._config["guest_user"]) self.console_wait("Full name") - self.console_send("%s\n" % self.GUEST_USER) + self.console_send("%s\n" % self._config["guest_user"]) self.console_wait("Password") - self.console_send("%s\n" % self.GUEST_PASS) + self.console_send("%s\n" % self._config["guest_pass"]) self.console_wait("Password") - self.console_send("%s\n" % self.GUEST_PASS) + self.console_send("%s\n" % self._config["guest_pass"]) =20 self.console_wait_send("Allow root ssh login", "yes\n") self.console_wait_send("timezone", "UTC\n") @@ -135,12 +135,13 @@ class OpenBSDVM(basevm.BaseVM): =20 # setup qemu user prompt =3D "$" - self.console_ssh_init(prompt, self.GUEST_USER, self.GUEST_PASS) + self.console_ssh_init(prompt, self._config["guest_user"], + self._config["guest_pass"]) self.console_wait_send(prompt, "exit\n") =20 # setup root user prompt =3D "openbsd#" - self.console_ssh_init(prompt, "root", self.ROOT_PASS) + self.console_ssh_init(prompt, "root", self._config["root_pass"]) self.console_sshd_config(prompt) =20 # setup virtio-blk #1 (tarfile) --=20 2.20.1 From nobody Mon May 6 20:47:38 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1593195928; cv=none; d=zohomail.com; s=zohoarc; b=m/LSbidcScag47B786/s2rBuEjsQFk9GX8RiwyUao1j0qJGQZsCXqwjSl5UOv2QeDHEFh0GfF64qM6oqdIje+TmpkZy1s73VjbwBgE0PVE/dmmPNZQYuoqmevKXSLebVZfdELRYYI4lPuVZjPpSIbY1qGBuHdR5axFG/CKYB2DE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1593195928; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=SfCKKjXRpSzktD2zHuCdVYnzBzWod3odSIiX8dUA3RA=; b=DAcCa98C+iClaCJyKhz9sqVx1/c3g+LUeLtFlBlpyptdICZbmLyJB5L1ny5ZkJPNBF9/EV71nM/8eqCpMbUZmjF6iETwxxr1qt6Jltk7GWe/CRbbU9D7AGsU3yRqzMpKfpvDbPCd7ZBcvv5VjtQ9AjQlEimfUVj6OrKptfJHv1k= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1593195928403395.97463218703433; Fri, 26 Jun 2020 11:25:28 -0700 (PDT) Received: from localhost ([::1]:53844 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jot2V-0008Bx-1W for importer@patchew.org; Fri, 26 Jun 2020 14:25:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56068) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1josrh-0007RA-Kk for qemu-devel@nongnu.org; Fri, 26 Jun 2020 14:14:17 -0400 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]:36184) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1josrf-0001Ik-Ds for qemu-devel@nongnu.org; Fri, 26 Jun 2020 14:14:17 -0400 Received: by mail-wm1-x336.google.com with SMTP id 17so10212553wmo.1 for ; Fri, 26 Jun 2020 11:14:13 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id c5sm18143873wmb.24.2020.06.26.11.14.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jun 2020 11:14:07 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id A8A391FF99; Fri, 26 Jun 2020 19:13:59 +0100 (BST) 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=SfCKKjXRpSzktD2zHuCdVYnzBzWod3odSIiX8dUA3RA=; b=VZmTIHb8Y8lSS0gdou4ehtJIqjc1x08nOWL9x1PFQGk3KTwvVirkCReT1BQntLqLXh 1gb+X7Go2rWrhaRrQAss81X44jUmPaazKaq46woGTCvgVBJE0wZ6vZr6uahjVgBngw/q HQnJ9IXxz1BCYstoezTiD6gdTJqXN8H8BGpfOoMDsPJ0y3aUxrMfjNgh2Orl4eBqv6Ea JMkvqkHJ3TXXwRZrVGKk8rGCC8GMwP6L1s15jKq5XgB/joSPrjJswEGs84mKb7CIJth6 zdi5Ss0yTfJ6XETpnkWvUHGroYxELKMQdLTKwJ3pQqNRahXQWMYgKr8McMnh6fbR9N3+ BV2w== 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=SfCKKjXRpSzktD2zHuCdVYnzBzWod3odSIiX8dUA3RA=; b=rwnw+3X4Eno9UbmD+T/QCiy1oLnl73H/iklSrSLncQer4kaoHGfx6zcoVtiNOq71T0 Ey/BnbynOFJTVRK2mRvCEgbFnbjPZbjZTAR3p2r6eb6nAk8zvyfzzz7MFbeoun0zz3as 5ySrdmCpn735AQtKXfuF3pAtjEOJhLCoafvxseAzJfuLwpepYRA18sFiqBgn2JRl+4iB ORi8DmrHS9aQjZuLjXyd0Sqh8SfzRttafszpaV6vH4W3Km6S+qcMJeAFWk8WEY5bQfdh ENfjUlbscfqRIfeIlKTKlH0Ye6rNaDHZx6OJRmjLBO3mHVxDhYMwel23iGHuvOmSarsD B+aQ== X-Gm-Message-State: AOAM533Rg0jodz81hko7picuc73nPur1ztR+FqDmEyBnrGctjInxtlaO dT2ljZy+JGogcjNKR5SB2kzvlg== X-Google-Smtp-Source: ABdhPJzwQRpqpI9k2/hZlB6nPsha6EqxusWi3lmLt3NpfdBCjDfDd5HO3su0cnTQTaA6RZGIadntRw== X-Received: by 2002:a1c:bb44:: with SMTP id l65mr4965888wmf.51.1593195252530; Fri, 26 Jun 2020 11:14:12 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v3 10/30] python/qemu: Add ConsoleSocket for optional use in QEMUMachine Date: Fri, 26 Jun 2020 19:13:37 +0100 Message-Id: <20200626181357.26211-11-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200626181357.26211-1-alex.bennee@linaro.org> References: <20200626181357.26211-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::336; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x336.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: fam@euphon.net, berrange@redhat.com, Robert Foley , =?UTF-8?q?Alex=20Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , cota@braap.org, Cleber Rosa , Peter Puhov , aurelien@aurel32.net, Eduardo Habkost Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Robert Foley We add the ConsoleSocket object, which has a socket interface and which will consume all arriving characters on the socket, placing them into an in memory buffer. This will also provide those chars via recv() as would a regular socket. ConsoleSocket also has the option of dumping the console bytes to a log file. We also give QEMUMachine the option of using ConsoleSocket to drain and to use for logging console to a file. By default QEMUMachine does not use ConsoleSocket. This is added in preparation for use by basevm.py in a later commit. This is a workaround we found was needed for basevm.py since there is a known issue where QEMU will hang waiting for console characters to be consumed. Cc: Eduardo Habkost Cc: Cleber Rosa Signed-off-by: Robert Foley Reviewed-by: Peter Puhov Acked-by: Alex Benn=C3=A9e Tested-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Alex Benn=C3=A9e Message-Id: <20200601211421.1277-9-robert.foley@linaro.org> --- python/qemu/console_socket.py | 110 ++++++++++++++++++++++++++++++++++ python/qemu/machine.py | 23 +++++-- 2 files changed, 129 insertions(+), 4 deletions(-) create mode 100644 python/qemu/console_socket.py diff --git a/python/qemu/console_socket.py b/python/qemu/console_socket.py new file mode 100644 index 00000000000..830cb7c6282 --- /dev/null +++ b/python/qemu/console_socket.py @@ -0,0 +1,110 @@ +#!/usr/bin/env python3 +# +# This python module implements a ConsoleSocket object which is +# designed always drain the socket itself, and place +# the bytes into a in memory buffer for later processing. +# +# Optionally a file path can be passed in and we will also +# dump the characters to this file for debug. +# +# Copyright 2020 Linaro +# +# Authors: +# Robert Foley +# +# This code is licensed under the GPL version 2 or later. See +# the COPYING file in the top-level directory. +# +import asyncore +import socket +import threading +import io +import os +import sys +from collections import deque +import time +import traceback + +class ConsoleSocket(asyncore.dispatcher): + + def __init__(self, address, file=3DNone): + self._recv_timeout_sec =3D 300 + self._buffer =3D deque() + self._asyncore_thread =3D None + self._sock =3D socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) + self._sock.connect(address) + self._logfile =3D None + if file: + self._logfile =3D open(file, "w") + asyncore.dispatcher.__init__(self, sock=3Dself._sock) + self._open =3D True + self._thread_start() + + def _thread_start(self): + """Kick off a thread to wait on the asyncore.loop""" + if self._asyncore_thread is not None: + return + self._asyncore_thread =3D threading.Thread(target=3Dasyncore.loop, + kwargs=3D{'timeout':1}) + self._asyncore_thread.daemon =3D True + self._asyncore_thread.start() + + def handle_close(self): + """redirect close to base class""" + # Call the base class close, but not self.close() since + # handle_close() occurs in the context of the thread which + # self.close() attempts to join. + asyncore.dispatcher.close(self) + + def close(self): + """Close the base object and wait for the thread to terminate""" + if self._open: + self._open =3D False + asyncore.dispatcher.close(self) + if self._asyncore_thread is not None: + thread, self._asyncore_thread =3D self._asyncore_thread, N= one + thread.join() + if self._logfile: + self._logfile.close() + self._logfile =3D None + + def handle_read(self): + """process arriving characters into in memory _buffer""" + try: + data =3D asyncore.dispatcher.recv(self, 1) + # latin1 is needed since there are some chars + # we are receiving that cannot be encoded to utf-8 + # such as 0xe2, 0x80, 0xA6. + string =3D data.decode("latin1") + except: + print("Exception seen.") + traceback.print_exc() + return + if self._logfile: + self._logfile.write("{}".format(string)) + self._logfile.flush() + for c in string: + self._buffer.extend(c) + + def recv(self, n=3D1, sleep_delay_s=3D0.1): + """Return chars from in memory buffer""" + start_time =3D time.time() + while len(self._buffer) < n: + time.sleep(sleep_delay_s) + elapsed_sec =3D time.time() - start_time + if elapsed_sec > self._recv_timeout_sec: + raise socket.timeout + chars =3D ''.join([self._buffer.popleft() for i in range(n)]) + # We choose to use latin1 to remain consistent with + # handle_read() and give back the same data as the user would + # receive if they were reading directly from the + # socket w/o our intervention. + return chars.encode("latin1") + + def set_blocking(self): + """Maintain compatibility with socket API""" + pass + + def settimeout(self, seconds): + """Set current timeout on recv""" + self._recv_timeout_sec =3D seconds diff --git a/python/qemu/machine.py b/python/qemu/machine.py index 041c615052e..c25f0b42cf6 100644 --- a/python/qemu/machine.py +++ b/python/qemu/machine.py @@ -26,6 +26,7 @@ import socket import tempfile from typing import Optional, Type from types import TracebackType +from qemu.console_socket import ConsoleSocket =20 from . import qmp =20 @@ -75,7 +76,8 @@ class QEMUMachine: =20 def __init__(self, binary, args=3DNone, wrapper=3DNone, name=3DNone, test_dir=3D"/var/tmp", monitor_address=3DNone, - socket_scm_helper=3DNone, sock_dir=3DNone): + socket_scm_helper=3DNone, sock_dir=3DNone, + drain_console=3DFalse, console_log=3DNone): ''' Initialize a QEMUMachine =20 @@ -86,6 +88,9 @@ class QEMUMachine: @param test_dir: where to create socket and log file @param monitor_address: address for QMP monitor @param socket_scm_helper: helper program, required for send_fd_scm= () + @param sock_dir: where to create socket (overrides test_dir for so= ck) + @param console_log: (optional) path to console log file + @param drain_console: (optional) True to drain console socket to b= uffer @note: Qemu process is not started until launch() is used. ''' if args is None: @@ -122,6 +127,12 @@ class QEMUMachine: self._console_address =3D None self._console_socket =3D None self._remove_files =3D [] + self._console_log_path =3D console_log + if self._console_log_path: + # In order to log the console, buffering needs to be enabled. + self._drain_console =3D True + else: + self._drain_console =3D drain_console =20 def __enter__(self): return self @@ -580,7 +591,11 @@ class QEMUMachine: Returns a socket connected to the console """ if self._console_socket is None: - self._console_socket =3D socket.socket(socket.AF_UNIX, - socket.SOCK_STREAM) - self._console_socket.connect(self._console_address) + if self._drain_console: + self._console_socket =3D ConsoleSocket(self._console_addre= ss, + file=3Dself._console_l= og_path) + else: + self._console_socket =3D socket.socket(socket.AF_UNIX, + socket.SOCK_STREAM) + self._console_socket.connect(self._console_address) return self._console_socket --=20 2.20.1 From nobody Mon May 6 20:47:38 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1593195583; cv=none; d=zohomail.com; s=zohoarc; b=i1QLlZ0hZHStzPT74Ic/Rw0f9hoYJnOTkW3QZIzusqtr+5nPIMMyxFY28AvPb8QIr2NEF3w+S7CHNz85tuSWw/4J4O7RpiyzGeOALLdOXwtVIpk3PdE21JFL6kxy9K3QW6QzqVOOU946ztI+5A/nKPL0eDFZ/kY4O8sGuNJVUu4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1593195583; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=5xSn2L6kzBKcKjTR8zPwxbT757SBhdGuGZ/3k/jBdz8=; b=kcY32CVS4eZcLSoL3SYwO0F2a4iQ94XPtFWwp+xX6/IsXL0e32xn6rryYJBA7ul/mdJ6Kkc4pCFsDzpVyBaxzTh7K/1us6LsjR0EiPWCcxSbKw+cDGlM8zcv2lx4Qd7VMa6isRabbJyntbOOpNDq51YhpVaV3k7thlT13fRevjM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1593195583243979.6993858734008; Fri, 26 Jun 2020 11:19:43 -0700 (PDT) Received: from localhost ([::1]:58424 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1josww-0006wy-24 for importer@patchew.org; Fri, 26 Jun 2020 14:19:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56088) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1josrk-0007Sm-Vy for qemu-devel@nongnu.org; Fri, 26 Jun 2020 14:14:21 -0400 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]:40011) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1josrg-0001JZ-UO for qemu-devel@nongnu.org; Fri, 26 Jun 2020 14:14:20 -0400 Received: by mail-wr1-x436.google.com with SMTP id h5so10349777wrc.7 for ; Fri, 26 Jun 2020 11:14:16 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id r10sm20651346wrm.17.2020.06.26.11.14.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jun 2020 11:14:10 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id E489B1FF7E; Fri, 26 Jun 2020 19:13:59 +0100 (BST) 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=5xSn2L6kzBKcKjTR8zPwxbT757SBhdGuGZ/3k/jBdz8=; b=XrDg1n0PjAQT78IkjIUyr+ccwBzU3p7Nwprz9mjAFr4Q/47+kfrGvrnRqZnQ1P4cSU 26dBXNoyEzc42mO4a0SVTbZ+lNE4p65eEOZ+BDOGDc/B+aJBSf30a9irhhWPpoHgaTgg 2GWz92w+vMthbopZOH7J0OkIRNP1mPcOaOozWx65aO+SL9b81hRdCDNE7weJHfyJ9q20 +sMG3owew+bMLA+DwG8okzHlFPsqFWWxwSdE+jibo3HqvQsHwztjippbCBOwzwOtKLHH Ad3Te2Bgvfq/pB9/VPoVrFaO1P04DXLsBC/mrUA7wUM4QMMaBtedtqYDLN8DOCy/iu7+ Faog== 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=5xSn2L6kzBKcKjTR8zPwxbT757SBhdGuGZ/3k/jBdz8=; b=qkkVezgM6L/ub8or6qEWpE7rij2BmQ7yiqm63okjnF2jGcNPb9UgAt/c1pXSAzl3ee aVCm+w5T2aioTHGw9jhbpOBjaJtVf1f16Lkoo+v8tCqFfiuzjiFCSG0VePxQdxAZxwPg HRnKnTho84HdaxiAsHJAi4ugEa1arTDY0KM6euE2bUC3Xs6GkCegxAMuK3qc3Q17/gyA rI6r8PDZr3cijof3pbUqZum7UIZdOk6L8hGmRpZqyOdpg9KH0hRG+j9rGJ291oyE3AwA Knv5Ppobv05L39803ExkVJhEJvZKHVwEqw/ifQ5ECTW9q7mG5qGKRSPwk80xcajrrwBQ 1BEg== X-Gm-Message-State: AOAM531xdPWr/tjywqW9Te60EDUCcK78btVdX46ioff3kwAG1SLLMI9B Q+sLlYg6dMw5kuWBQOgvnWCQzA== X-Google-Smtp-Source: ABdhPJwJo+iBW26KPYUL8AJmby8+zjFPrluq+Zg1Wip9Gav3911xRLX+Fq4V5OgNlc8vFvJkh1xZrw== X-Received: by 2002:adf:e9c4:: with SMTP id l4mr5248339wrn.9.1593195255648; Fri, 26 Jun 2020 11:14:15 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v3 11/30] tests/vm: Add workaround to consume console Date: Fri, 26 Jun 2020 19:13:38 +0100 Message-Id: <20200626181357.26211-12-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200626181357.26211-1-alex.bennee@linaro.org> References: <20200626181357.26211-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::436; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x436.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: fam@euphon.net, berrange@redhat.com, Robert Foley , =?UTF-8?q?Alex=20Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , cota@braap.org, Peter Puhov , aurelien@aurel32.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Robert Foley This adds support to basevm.py so that we always drain the console chars. This makes use of support added in an earlier commit that allows QEMUMachine to use the ConsoleSocket. This is a workaround we found was needed since there is a known issue where QEMU will hang waiting for console characters to be consumed. We also added the option of logging the console to a file. LOG_CONSOLE=3D1 will now log the output to a file. Signed-off-by: Robert Foley Reviewed-by: Peter Puhov Acked-by: Alex Benn=C3=A9e Signed-off-by: Alex Benn=C3=A9e Message-Id: <20200601211421.1277-10-robert.foley@linaro.org> --- tests/vm/Makefile.include | 4 ++++ tests/vm/basevm.py | 21 +++++++++++++++++++-- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/tests/vm/Makefile.include b/tests/vm/Makefile.include index 39f918a430a..f21948c46a5 100644 --- a/tests/vm/Makefile.include +++ b/tests/vm/Makefile.include @@ -49,6 +49,7 @@ endif @echo ' EXTRA_CONFIGURE_OPTS=3D"..."' @echo " J=3D[0..9]* - Override the -jN parameter for make= commands" @echo " DEBUG=3D1 - Enable verbose output on host and i= nteractive debugging" + @echo " LOG_CONSOLE=3D1 - Log console to file in: ~/.cache/qe= mu-vm " @echo " V=3D1 - Enable verbose ouput on host and guest commands" @echo " QEMU_LOCAL=3D1 - Use QEMU binary local to this= build." @echo " QEMU=3D/path/to/qemu - Change path to QEMU binary" @@ -75,6 +76,7 @@ $(IMAGES_DIR)/%.img: $(SRC_PATH)/tests/vm/% \ $(if $(GENISOIMAGE),--genisoimage $(GENISOIMAGE)) \ $(if $(QEMU_LOCAL),--build-path $(BUILD_DIR)) \ $(if $(EFI_AARCH64),--efi-aarch64 $(EFI_AARCH64)) \ + $(if $(LOG_CONSOLE),--log-console) \ --image "$@" \ --force \ --build-image $@, \ @@ -91,6 +93,7 @@ vm-build-%: $(IMAGES_DIR)/%.img $(if $(V),--verbose) \ $(if $(QEMU_LOCAL),--build-path $(BUILD_DIR)) \ $(if $(EFI_AARCH64),--efi-aarch64 $(EFI_AARCH64)) \ + $(if $(LOG_CONSOLE),--log-console) \ --image "$<" \ $(if $(BUILD_TARGET),--build-target $(BUILD_TARGET)) \ --snapshot \ @@ -114,6 +117,7 @@ vm-boot-ssh-%: $(IMAGES_DIR)/%.img $(if $(V)$(DEBUG), --debug) \ $(if $(QEMU_LOCAL),--build-path $(BUILD_DIR)) \ $(if $(EFI_AARCH64),--efi-aarch64 $(EFI_AARCH64)) \ + $(if $(LOG_CONSOLE),--log-console) \ --image "$<" \ --interactive \ false, \ diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py index f716798b405..04d083409a5 100644 --- a/tests/vm/basevm.py +++ b/tests/vm/basevm.py @@ -117,6 +117,11 @@ class BaseVM(object): "w").write(self._config['ssh_pub_key']) =20 self.debug =3D args.debug + self._console_log_path =3D None + if args.log_console: + self._console_log_path =3D \ + os.path.join(os.path.expanduser("~/.cache/qemu-vm= "), + "{}.install.log".format(self.name)) self._stderr =3D sys.stderr self._devnull =3D open(os.devnull, "w") if self.debug: @@ -271,7 +276,13 @@ class BaseVM(object): args +=3D self._data_args + extra_args + self._config['extra_args'] logging.debug("QEMU args: %s", " ".join(args)) qemu_path =3D get_qemu_path(self.arch, self._build_path) - guest =3D QEMUMachine(binary=3Dqemu_path, args=3Dargs) + + # Since console_log_path is only set when the user provides the + # log_console option, we will set drain_console=3DTrue so the + # console is always drained. + guest =3D QEMUMachine(binary=3Dqemu_path, args=3Dargs, + console_log=3Dself._console_log_path, + drain_console=3DTrue) guest.set_machine(self._config['machine']) guest.set_console() try: @@ -285,6 +296,8 @@ class BaseVM(object): raise atexit.register(self.shutdown) self._guest =3D guest + # Init console so we can start consuming the chars. + self.console_init() usernet_info =3D guest.qmp("human-monitor-command", command_line=3D"info usernet") self.ssh_port =3D None @@ -296,7 +309,9 @@ class BaseVM(object): raise Exception("Cannot find ssh port from 'info usernet':\n%s= " % \ usernet_info) =20 - def console_init(self, timeout =3D 120): + def console_init(self, timeout =3D None): + if timeout =3D=3D None: + timeout =3D self.socket_timeout vm =3D self._guest vm.console_socket.settimeout(timeout) self.console_raw_path =3D os.path.join(vm._temp_dir, @@ -578,6 +593,8 @@ def parse_args(vmcls): parser.add_option("--efi-aarch64", default=3D"/usr/share/qemu-efi-aarch64/QEMU_EFI.fd", help=3D"Path to efi image for aarch64 VMs.") + parser.add_option("--log-console", action=3D"store_true", + help=3D"Log console to file.") parser.disable_interspersed_args() return parser.parse_args() =20 --=20 2.20.1 From nobody Mon May 6 20:47:38 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1593195346; cv=none; d=zohomail.com; s=zohoarc; b=M/4tMK4CKL/1iHpdjpADjSZ2RXQfdpZU4FS6xWNo59/S9o4vxREFORhFnHwz2WsaMpGf5YQ/qdfv2PWBAKvOI3BcgYazGdAVhT1qwvMprV7RljZpLPbqjwaNe035QQl2uThurVMhOZnZpbN927Pan8tvcv/1pDJ58jXBmlrqnUg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1593195346; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=m68QvK0yLbiDVQVnhRt3C913qF+3j7rcYCrzMUVv6YU=; b=RxyXqAGnGgeGIRyTvcrxVjRyh2IH1WhHD3tKdMkItufE6fWvk/NdOMiwVJPd+iaZkqIsPzQCXu6ED+5fJ1dYQ+Eoqn7uUX92jv3VmbZKUqpYGQICdErgKriegt4xP2H5zAGSmK3J6xTSImryrmbPowZtrpFfxN49gT8drmt5kKc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1593195346625165.94184637995886; Fri, 26 Jun 2020 11:15:46 -0700 (PDT) Received: from localhost ([::1]:43824 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jost7-0000nY-Eq for importer@patchew.org; Fri, 26 Jun 2020 14:15:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56182) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1josrs-0007YL-A4 for qemu-devel@nongnu.org; Fri, 26 Jun 2020 14:14:28 -0400 Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]:53346) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1josrk-0001Jp-Jc for qemu-devel@nongnu.org; Fri, 26 Jun 2020 14:14:27 -0400 Received: by mail-wm1-x342.google.com with SMTP id j18so9641198wmi.3 for ; Fri, 26 Jun 2020 11:14:18 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id a81sm18474931wmf.30.2020.06.26.11.14.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jun 2020 11:14:10 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 230461FF9A; Fri, 26 Jun 2020 19:14:00 +0100 (BST) 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=m68QvK0yLbiDVQVnhRt3C913qF+3j7rcYCrzMUVv6YU=; b=BmMQa0WjCv74C0ervZBTXu9ZJ6d8grFMYqKdGh8XxhJkD6+34gxdBITVRkj0G3LPgL kV3FkPYyGHmYARs03+OxVJrtWnfC0KpAeEbKaitt/IEIdhm/b+xQgCLVq3Fnmv2U2cze HxMD5Q076s2YymLq243ZnqXZXW4SvbFrOCSvTyiKexV4DZi60+kc4mTzWa6zRXW2+H84 s4jgz7+9bT6gcBzm7kLPFiMzKVO762gxA6a+pGdoAop8IRE+HWGSycUDf7FXnxUs5uy9 FBWm8TojOPDtZ7TVv3PuMk2g0Gp0mXWwz4LuQijB3p3VFPS5ARQHM3aVsVsebnAZnnIx jPJA== 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=m68QvK0yLbiDVQVnhRt3C913qF+3j7rcYCrzMUVv6YU=; b=Uut4vEp4dNpo+EpFR9pSWjGSRPgtVwPsuwr97EFwwxfmNtG9dyAxXy0WSTo4/tac6d zD/O7AKPepUUOxZw0GXQjebq+9dvVyI6ZbVrvCpZy/JHnTPKT89cDTry51qyZifpIbb6 UatGFMiOapGzhBd+rfdpnb0DLb8Jy55nedkoOcmVGD2tMWQd+h6mKNFmffQiHMhZ5CAr Xzl6fzm2ZvZdi2yh8YcrG9OwwzrZwQ+uNEPpYb4+Lsh7WUBdzvEwoMT42FoCLe0Czpwu /1DuYumLZGj49n2LzAnRybBALnHoZxQq8XCf6Y3p5OpD5bPz9U0TyB5RYsF/+UeGjaab VMiQ== X-Gm-Message-State: AOAM532xvE5p5/YLx3iVzaHssCyGblKlzYPTZHTAKCJ4end4aTpF3dBi tbyvO9RegzEYHba6tcfB/qa3mg== X-Google-Smtp-Source: ABdhPJzVHW6qsV9qe616Ic3VUnnTJGErmZDFCQiCZtBDX8hhsjZ8CtElhPVvMVKrZ7ZA4ycZQI7SvQ== X-Received: by 2002:a7b:cb56:: with SMTP id v22mr4836523wmj.180.1593195257581; Fri, 26 Jun 2020 11:14:17 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v3 12/30] tests/vm: switch from optsparse to argparse Date: Fri, 26 Jun 2020 19:13:39 +0100 Message-Id: <20200626181357.26211-13-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200626181357.26211-1-alex.bennee@linaro.org> References: <20200626181357.26211-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::342; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x342.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: fam@euphon.net, berrange@redhat.com, Robert Foley , =?UTF-8?q?Alex=20Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , cota@braap.org, aurelien@aurel32.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) optparse has been deprecated since version 3.2 and argparse is the blessed replacement. Take the opportunity to enhance our help output showing defaults when called. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Daniel P. Berrang=C3=A9 Reviewed-by: Robert Foley --- v2 - add explicit parser.add_argument("commands", nargs=3D"*") --- tests/vm/basevm.py | 93 ++++++++++++++++++++++++---------------------- 1 file changed, 48 insertions(+), 45 deletions(-) diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py index 04d083409a5..890bbc5549a 100644 --- a/tests/vm/basevm.py +++ b/tests/vm/basevm.py @@ -23,7 +23,7 @@ from qemu.accel import kvm_available from qemu.machine import QEMUMachine import subprocess import hashlib -import optparse +import argparse import atexit import tempfile import shutil @@ -556,54 +556,57 @@ def parse_args(vmcls): else: return 1 =20 - parser =3D optparse.OptionParser( - description=3D"VM test utility. Exit codes: " - "0 =3D success, " - "1 =3D command line error, " - "2 =3D environment initialization failed, " - "3 =3D test command failed") - parser.add_option("--debug", "-D", action=3D"store_true", - help=3D"enable debug output") - parser.add_option("--image", "-i", default=3D"%s.img" % vmcls.name, - help=3D"image file name") - parser.add_option("--force", "-f", action=3D"store_true", - help=3D"force build image even if image exists") - parser.add_option("--jobs", type=3Dint, default=3Dget_default_jobs(), - help=3D"number of virtual CPUs") - parser.add_option("--verbose", "-V", action=3D"store_true", - help=3D"Pass V=3D1 to builds within the guest") - parser.add_option("--build-image", "-b", action=3D"store_true", - help=3D"build image") - parser.add_option("--build-qemu", - help=3D"build QEMU from source in guest") - parser.add_option("--build-target", - help=3D"QEMU build target", default=3D"check") - parser.add_option("--build-path", default=3DNone, - help=3D"Path of build directory, "\ - "for using build tree QEMU binary. ") - parser.add_option("--interactive", "-I", action=3D"store_true", - help=3D"Interactively run command") - parser.add_option("--snapshot", "-s", action=3D"store_true", - help=3D"run tests with a snapshot") - parser.add_option("--genisoimage", default=3D"genisoimage", - help=3D"iso imaging tool") - parser.add_option("--config", "-c", default=3DNone, - help=3D"Provide config yaml for configuration. "\ - "See config_example.yaml for example.") - parser.add_option("--efi-aarch64", - default=3D"/usr/share/qemu-efi-aarch64/QEMU_EFI.fd", - help=3D"Path to efi image for aarch64 VMs.") - parser.add_option("--log-console", action=3D"store_true", - help=3D"Log console to file.") - parser.disable_interspersed_args() + parser =3D argparse.ArgumentParser( + formatter_class=3Dargparse.ArgumentDefaultsHelpFormatter, + description=3D"Utility for provisioning VMs and running builds", + epilog=3D"""Remaining arguments are passed to the command. + Exit codes: 0 =3D success, 1 =3D command line error, + 2 =3D environment initialization failed, + 3 =3D test command failed""") + parser.add_argument("--debug", "-D", action=3D"store_true", + help=3D"enable debug output") + parser.add_argument("--image", "-i", default=3D"%s.img" % vmcls.name, + help=3D"image file name") + parser.add_argument("--force", "-f", action=3D"store_true", + help=3D"force build image even if image exists") + parser.add_argument("--jobs", type=3Dint, default=3Dget_default_jobs(), + help=3D"number of virtual CPUs") + parser.add_argument("--verbose", "-V", action=3D"store_true", + help=3D"Pass V=3D1 to builds within the guest") + parser.add_argument("--build-image", "-b", action=3D"store_true", + help=3D"build image") + parser.add_argument("--build-qemu", + help=3D"build QEMU from source in guest") + parser.add_argument("--build-target", + help=3D"QEMU build target", default=3D"check") + parser.add_argument("--build-path", default=3DNone, + help=3D"Path of build directory, "\ + "for using build tree QEMU binary. ") + parser.add_argument("--interactive", "-I", action=3D"store_true", + help=3D"Interactively run command") + parser.add_argument("--snapshot", "-s", action=3D"store_true", + help=3D"run tests with a snapshot") + parser.add_argument("--genisoimage", default=3D"genisoimage", + help=3D"iso imaging tool") + parser.add_argument("--config", "-c", default=3DNone, + help=3D"Provide config yaml for configuration. "\ + "See config_example.yaml for example.") + parser.add_argument("--efi-aarch64", + default=3D"/usr/share/qemu-efi-aarch64/QEMU_EFI.fd= ", + help=3D"Path to efi image for aarch64 VMs.") + parser.add_argument("--log-console", action=3D"store_true", + help=3D"Log console to file.") + parser.add_argument("commands", nargs=3D"*", help=3D"""Remaining + commands after -- are passed to command inside the VM""") + return parser.parse_args() =20 def main(vmcls, config=3DNone): try: if config =3D=3D None: config =3D {} - args, argv =3D parse_args(vmcls) - if not argv and not args.build_qemu and not args.build_image: + args =3D parse_args(vmcls) + if not args.commands and not args.build_qemu and not args.build_im= age: print("Nothing to do?") return 1 config =3D parse_config(config, args) @@ -619,12 +622,12 @@ def main(vmcls, config=3DNone): if args.build_qemu: vm.add_source_dir(args.build_qemu) cmd =3D [vm.BUILD_SCRIPT.format( - configure_opts =3D " ".join(argv), + configure_opts =3D " ".join(args.commands), jobs=3Dint(args.jobs), target=3Dargs.build_target, verbose =3D "V=3D1" if args.verbose else "")] else: - cmd =3D argv + cmd =3D args.commands img =3D args.image if args.snapshot: img +=3D ",snapshot=3Don" --=20 2.20.1 From nobody Mon May 6 20:47:38 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1593195745; cv=none; d=zohomail.com; s=zohoarc; b=XuGxw0T9A23ajVeOQOQkEcsxC2FEoHJgg5eJj2hMkPFMej0LyUD0p2Zb3Qib8td0kUMCJYIRtzVDOQpmBKMje/W8OrvrJyXla5IuSHD+0lbMv0EFmSVGtBkp9iCWGgHq5DqDWendMOxAdGFsHsfqCOZvRFa56FrognIOdwXZXNQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1593195745; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=efB7wfcutdBc5W3t5fL1ob0gckNKfFStml2EZYTXVio=; b=AgS4wKCVxwwbLqimZIrmloj2HEq9f1cUG9zKQ9UWXs8vEkb9bOXzGjDlyTSJbI6kaJzZTrxdGhEKkDtpjfb3ZvD4EFxBw5nUZCKRC5bqEsiQNiBsc8AOYFCz3PBueWebb8wnaLPdEjLlr4oH4xtOLVdEzRtd8cLAPbIKnY3Q9ZM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1593195745624766.7273548650385; Fri, 26 Jun 2020 11:22:25 -0700 (PDT) Received: from localhost ([::1]:39346 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1joszY-0002Hy-Ay for importer@patchew.org; Fri, 26 Jun 2020 14:22:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56248) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1josrw-0007d3-Qs for qemu-devel@nongnu.org; Fri, 26 Jun 2020 14:14:32 -0400 Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]:54496) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1josrm-0001KB-Iw for qemu-devel@nongnu.org; Fri, 26 Jun 2020 14:14:32 -0400 Received: by mail-wm1-x343.google.com with SMTP id o8so9637669wmh.4 for ; Fri, 26 Jun 2020 11:14:20 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id m10sm18440235wru.4.2020.06.26.11.14.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jun 2020 11:14:10 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 4AD641FF9B; Fri, 26 Jun 2020 19:14:00 +0100 (BST) 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=efB7wfcutdBc5W3t5fL1ob0gckNKfFStml2EZYTXVio=; b=hRDwUXvVIWaARXFCCFsx6zabkJvV3F9JCos2bdgxxnogZNLArtzH0z849AR33zvX4f CAxxh0TCuzxEwJ3cA4JWgOwOKK5WyLExZ/TgpvUG/Dl9jhXxaOWNRYYbuIUYd59F4MBC wOqtvBrp1eL3cHNotdYN+if6KstPPD5H+FifU3AfdscPwe9ou2mkeW1AYu8vu04Jdt6l Ve+z7t7BPDdO8kSofZIYOJPUWAKyFIvdcrkfEZukHSqBA/hbePfTCHvY1TbvWuQGWOAR b7602qHC2FbeSmnjqdV48q28mFO1wtmleMX4VAA2rRbIL4tUFtmTU/589i++tDqovxmv Ryzw== 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=efB7wfcutdBc5W3t5fL1ob0gckNKfFStml2EZYTXVio=; b=V5kvFmYpcVRdWH/CzVxtJdL+J7aVt28C0hXbqavNYMInJmp9BZD0qB462nFWV5TsIS /Q8T0x4t7Mp3ZgtcrOl7aF7ajuwuCO2u0HsepwfC2Sv7QQh/9Tfs0HWrw+VcFGwIGY7b 5RbmMwITEYDStKj0fjdIUeOFxji/bYQNjPEFYW+coq9EwFmXBSyih8Ku011AbcnGLdgd 6OdLHkSzHHh9TJVxotyNVpA8UGMQxQJY8KkJXzkmx/OznAcQGzVkBFVB3tUxUBtq7SdM mj1D/m2GagauiVTAiX9iE9tgPbK4oOlHzLKkw+Oxg8bjveGcYtMGeyfAWc+XMGmSXLzv Y5aw== X-Gm-Message-State: AOAM531HqdPhQCN8IUUi51FpXPO7WjS94YpuOymAJ/3r1W0/P0Ghzl0E b6oRLvFpyjemuTbpnBLpOk7Mrw== X-Google-Smtp-Source: ABdhPJwLa+J4WA6bngxodc2EB5uHRUirH/QkEs2MfYSEY5vkCkFMtAw2vLteQOwNpU1C2UlVB5JJ9g== X-Received: by 2002:a1c:98cc:: with SMTP id a195mr4654221wme.89.1593195259961; Fri, 26 Jun 2020 11:14:19 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v3 13/30] tests/vm: allow us to take advantage of MTTCG Date: Fri, 26 Jun 2020 19:13:40 +0100 Message-Id: <20200626181357.26211-14-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200626181357.26211-1-alex.bennee@linaro.org> References: <20200626181357.26211-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::343; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x343.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: fam@euphon.net, berrange@redhat.com, Robert Foley , =?UTF-8?q?Alex=20Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , cota@braap.org, aurelien@aurel32.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) We currently limit TCG guests to -smp 1 but now we have added some aarch64 guests we can do better when running on x86_64 hardware. Raise the limit for TCG guests when it is safe to do so. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Robert Foley --- tests/vm/basevm.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py index 890bbc5549a..b8c60803e2d 100644 --- a/tests/vm/basevm.py +++ b/tests/vm/basevm.py @@ -553,6 +553,12 @@ def parse_args(vmcls): def get_default_jobs(): if kvm_available(vmcls.arch): return multiprocessing.cpu_count() // 2 + elif os.uname().machine =3D=3D "x86_64" and \ + vmcls.arch in ["aarch64", "x86_64", "i386"]: + # MTTCG is available on these arches and we can allow more cor= es. + # But only up to a reasonable limit. User can always override + # these limits with --jobs. + return min(multiprocessing.cpu_count() // 2, 8) else: return 1 =20 --=20 2.20.1 From nobody Mon May 6 20:47:38 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1593195836; cv=none; d=zohomail.com; s=zohoarc; b=IdkfqpQlGLc8XGU7a0mwe5G4+7Sw3zMGuYC7qNGJW2FJRZrEfeXbUf0Fl2Iaf0pmKzhexjxCd6htlgJ5/jkAevq/2BcnyKHeJ6enfpXHudb7nyRkAUudIfrVefMYePaVtHmND6k32S2IAj2v4KOb8IhrtxfvJWByIMg5jI565bk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1593195836; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=UsvCJ1FtgsYHjIIgU0bFzUSnvljWkIkb9Subsb2kO6E=; b=kTJFQb3cl2bPm8YdLDIlDEVdV2eMTbnbOlQXB1VNJ7Na8UhwEBhbqa9nvS9RmTa99ltSwRjqierc3BvbVok3wlHhfnT/2r4Ol+n8J1IABLrj7BDdVTAK5v1Ts6F+uAhR6AjJY/kEAyewU3QxbCMMBQ0WVN0XU1gHNLFCBM1iq1E= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1593195836985791.7392405234835; Fri, 26 Jun 2020 11:23:56 -0700 (PDT) Received: from localhost ([::1]:46382 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jot10-00059x-Pv for importer@patchew.org; Fri, 26 Jun 2020 14:23:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58266) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jot05-0003Qn-Pp for qemu-devel@nongnu.org; Fri, 26 Jun 2020 14:22:57 -0400 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]:35581) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jot04-00050b-8q for qemu-devel@nongnu.org; Fri, 26 Jun 2020 14:22:57 -0400 Received: by mail-wm1-x341.google.com with SMTP id l2so8754094wmf.0 for ; Fri, 26 Jun 2020 11:22:55 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id r12sm37304294wrc.22.2020.06.26.11.22.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jun 2020 11:22:51 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 6FCFD1FF9C; Fri, 26 Jun 2020 19:14:00 +0100 (BST) 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=UsvCJ1FtgsYHjIIgU0bFzUSnvljWkIkb9Subsb2kO6E=; b=HI4KS185qC+55mTwfaURF8bnOdQJtP0e40UJLtp/NS5TxHakZPKe4QVpWt2FLMtXaF 1BleFv29NtccJLYy+P2fZQWekYU1s2xA55Sfuv/fWCAp7T84wfPqlekf1qivS5KUDPNB 0LNzFggT2mNNHF0TVBcHQ1RVBFZUTCB0NFJAS3OSQ9ubhCWCZ47c6qVLqli5QXY6Dfcp gO1ffGgtApgAPWnewRxAlMziWW0nqkbU1MBr8kCTn78NrhYBmPSsRPsjc0KQj7Ys4DaS v6csIBOzlm889rNFt91GS5kROqzMIRjRRcBhEwE7BrQytU8Kf2NiYdpXd3VTud7zpVJU eJLg== 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=UsvCJ1FtgsYHjIIgU0bFzUSnvljWkIkb9Subsb2kO6E=; b=Dza/YWxzICyfLlhGVfLm3JHj556OUOZIwwdKIpGtuTF8E8SRI9jufZ6cmI3VptYIoN YkMTTM4er/3t6KqnZt25IanZE5NA7L1ZigyQzbBGTmiDtci+GJfCcdG525cwwHsuetiF r+Gt8ZxEtErzk79FVoN+rrX4dokUSOxYnCC1Aslgur4aqg+r1pEBaIOqKwDFUs5pxzB3 9ToXv7i5ByVJVnHR5+7dmfdpJo5oq1lXfdCVut1sWOC1tmtOQvT+giMfy1TFgeBNpSZE o72tzFjNnSxnIGKg8X3RImWhq5F5TaLSSXet4cZ+/blULe5Lloz0vdhXFqk26IqCbTMT u5AA== X-Gm-Message-State: AOAM53079WlgSdMQqJAFf/UAEPH9MTA+jCg3+fjDPCFH1HYApggTVaIv 9Nq1wci20SCzUo7sD56YG1qDpQ== X-Google-Smtp-Source: ABdhPJyUu9mCVjoMCns72qXRVAts0xau7VyfRALREgyAj5LtSJJPoLESwXoK4ugeFTH0rUZ4F2uocA== X-Received: by 2002:a1c:2e47:: with SMTP id u68mr4929167wmu.45.1593195774898; Fri, 26 Jun 2020 11:22:54 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v3 14/30] tests/docker: check for an parameters not empty string Date: Fri, 26 Jun 2020 19:13:41 +0100 Message-Id: <20200626181357.26211-15-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200626181357.26211-1-alex.bennee@linaro.org> References: <20200626181357.26211-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::341; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x341.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: fam@euphon.net, Peter Maydell , berrange@redhat.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , cota@braap.org, aurelien@aurel32.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Reported-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Alex Benn=C3=A9e Suggested-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- tests/docker/common.rc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/docker/common.rc b/tests/docker/common.rc index 02cd67a8c5e..b27ce17e333 100755 --- a/tests/docker/common.rc +++ b/tests/docker/common.rc @@ -47,7 +47,7 @@ build_qemu() check_qemu() { # default to make check unless the caller specifies - if test -z "$@"; then + if [ $# =3D=3D 0 ]; then INVOCATION=3D"check" else INVOCATION=3D"$@" --=20 2.20.1 From nobody Mon May 6 20:47:38 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1593196181; cv=none; d=zohomail.com; s=zohoarc; b=iehZBCdsLh6xOrI46VzKVy1zqeH9qieFdy9VilBUdeN3NFLdLJ7abdSnZ57hAavXlv8OYXB/JVGSjQR3FHEg0/Ji3i9iahu6g9Dy9GN4ShURXLMfAq/wJfMmMEZdGq86U/zuYu6qNQJbwgYtFa7AiFQBgqp4VKvgilGR/Dj4RDs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1593196181; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=7QeBZdYC9ESv3VbweN3wgD6BXczlT/siekZ5tWA8J1E=; b=js6I9AzzjdA1DYfj8UCDWWeyzD0Dd+hP+ZjCvX5YNCE3fNM+m969PTSIMS1faq8BVv2vxIWl+56ZxeEUR088NhVUPwN+xSaQN9ktnEfMrBz6AKloqUaoO85ZtnqIiBLJsareSG3u+n1RmKuSpNEQY056m2nJzoW5nLY8fb1a9WY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1593196181709374.7223937666181; Fri, 26 Jun 2020 11:29:41 -0700 (PDT) Received: from localhost ([::1]:42926 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jot6a-0006rH-CQ for importer@patchew.org; Fri, 26 Jun 2020 14:29:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58318) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jot0B-0003d6-4T for qemu-devel@nongnu.org; Fri, 26 Jun 2020 14:23:03 -0400 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]:36242) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jot08-00054h-Hw for qemu-devel@nongnu.org; Fri, 26 Jun 2020 14:23:02 -0400 Received: by mail-wm1-x336.google.com with SMTP id 17so10233512wmo.1 for ; Fri, 26 Jun 2020 11:23:00 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id 33sm31337760wri.16.2020.06.26.11.22.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jun 2020 11:22:56 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 13EFC1FF9D; Fri, 26 Jun 2020 19:14:01 +0100 (BST) 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=7QeBZdYC9ESv3VbweN3wgD6BXczlT/siekZ5tWA8J1E=; b=vaI3vD6tuBxvcLEzXTfmrc2AJaEtHGuLPAtS4/zbacfG1NYP+ErhpahEIhwEE8vqYL AuXnxdzAnrrk538tzykmlNSX1o9fWhgBOwKTaz6Nk5iED+bSHA755th0HqQo4IUEBt/t JI/uqyV1TR3qEMD+vLbNXJ42ZaIf8sT7vX4f9CAkRwFPw8wEYqaNdYZxgyjC39NFYa8j F20mefjUdQcJkq7jECv/BB1eT78G5rO16jc87paeEHFihcourJdHxCFLL6T81hw1Ef5A ExjTnrxsOWrZpyGPtS6+Yjt1ULfsBEEYxMWvOiQhipNYt6sNwDsTcg6sMW1VrFlHXysv HRQg== 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=7QeBZdYC9ESv3VbweN3wgD6BXczlT/siekZ5tWA8J1E=; b=Os7mAqEcnxykxhTnnvSX8gcnyviplWHsQXFgnUQlOZ1RNxySpCXnFtBbDD9GlT7pyL 9xc1ZD+IHIrdR9O7PGf+GaGxucu/AlWizNplFHgFwYGPTRalSY2tqEtkR9kYX2ZLNap/ dP7748LN/MbQk1lTrh1M1UtJqvpzIimO17+rqCbkGKkhuA+5szS6jrAb+cuOzVWrWkAz i4pVTBpJt+Zn2WLi47b5Z+BCWkCZHe27y/HSzZHUKhOU/EWdp719f5PA7eFgFIL5Bz5M YDWI8Lv83F0S/Y6h6fb3lrVVY21CDoiS8qAu6dMGPtriix3XojH42tDmOLbDj5qlLULs X5Tg== X-Gm-Message-State: AOAM532v0GsRsYhoATPUP584Is+xIRdMoXDDJIzgCiKGuhUnJnRkeNqg AqNV2a9B/K1aenXLwj9sNIPxbe2FDU8= X-Google-Smtp-Source: ABdhPJxU8HmdJUVbZnfnEkEr1LIgBH5HTJ3UXpxwM7tbMS6ZRpArom5GfAn4b0V55umtONmq6xu/wA== X-Received: by 2002:a7b:c246:: with SMTP id b6mr5048226wmj.161.1593195778728; Fri, 26 Jun 2020 11:22:58 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v3 15/30] tests/docker: change tag naming scheme of our images Date: Fri, 26 Jun 2020 19:13:42 +0100 Message-Id: <20200626181357.26211-16-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200626181357.26211-1-alex.bennee@linaro.org> References: <20200626181357.26211-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::336; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x336.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: fam@euphon.net, berrange@redhat.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , cota@braap.org, aurelien@aurel32.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) We've been misusing the tag naming scheme for some time by overloading the post : section with the image type. Really it should be saved for the revision of that particular build. Move the details to the other side so we have: qemu/image-name with the implied :latest version added by the tooling. Suggested-by: Daniel P. Berrang=C3=A9 Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- v2 - fix RUN invocation as well - don't include :latest tag for debian-arm64-cross (implied) --- tests/docker/Makefile.include | 4 ++-- tests/docker/docker.py | 2 +- tests/docker/dockerfiles/debian-alpha-cross.docker | 2 +- tests/docker/dockerfiles/debian-amd64-cross.docker | 2 +- tests/docker/dockerfiles/debian-amd64.docker | 2 +- tests/docker/dockerfiles/debian-arm64-cross.docker | 2 +- tests/docker/dockerfiles/debian-arm64-test-cross.docker | 2 +- tests/docker/dockerfiles/debian-armel-cross.docker | 2 +- tests/docker/dockerfiles/debian-armhf-cross.docker | 2 +- tests/docker/dockerfiles/debian-hppa-cross.docker | 2 +- tests/docker/dockerfiles/debian-m68k-cross.docker | 2 +- tests/docker/dockerfiles/debian-mips-cross.docker | 2 +- tests/docker/dockerfiles/debian-mips64-cross.docker | 2 +- tests/docker/dockerfiles/debian-mips64el-cross.docker | 2 +- tests/docker/dockerfiles/debian-mipsel-cross.docker | 2 +- tests/docker/dockerfiles/debian-powerpc-cross.docker | 2 +- tests/docker/dockerfiles/debian-ppc64-cross.docker | 2 +- tests/docker/dockerfiles/debian-ppc64el-cross.docker | 2 +- tests/docker/dockerfiles/debian-riscv64-cross.docker | 2 +- tests/docker/dockerfiles/debian-s390x-cross.docker | 2 +- tests/docker/dockerfiles/debian-sh4-cross.docker | 2 +- tests/docker/dockerfiles/debian-sparc64-cross.docker | 2 +- tests/docker/dockerfiles/debian-tricore-cross.docker | 2 +- tests/docker/dockerfiles/debian-win32-cross.docker | 2 +- tests/docker/dockerfiles/debian-win64-cross.docker | 2 +- tests/docker/dockerfiles/debian9-mxe.docker | 2 +- 26 files changed, 27 insertions(+), 27 deletions(-) diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include index 3e3617816ec..6d6ced1e463 100644 --- a/tests/docker/Makefile.include +++ b/tests/docker/Makefile.include @@ -55,7 +55,7 @@ docker-image-%: $(DOCKER_FILES_DIR)/%.docker else docker-image-%: $(DOCKER_FILES_DIR)/%.docker $(call quiet-command,\ - $(DOCKER_SCRIPT) build -t qemu:$* -f $< \ + $(DOCKER_SCRIPT) build -t qemu/$* -f $< \ $(if $V,,--quiet) $(if $(NOCACHE),--no-cache) \ $(if $(NOUSER),,--add-current-user) \ $(if $(EXTRA_FILES),--extra-files $(EXTRA_FILES))\ @@ -258,7 +258,7 @@ docker-run: docker-qemu-src docker-run-%: CMD =3D $(shell echo '$@' | sed -e 's/docker-run-\([^@]*\)@\= (.*\)/\1/') docker-run-%: IMAGE =3D $(shell echo '$@' | sed -e 's/docker-run-\([^@]*\)= @\(.*\)/\2/') docker-run-%: - @$(MAKE) docker-run TEST=3D$(CMD) IMAGE=3Dqemu:$(IMAGE) + @$(MAKE) docker-run TEST=3D$(CMD) IMAGE=3Dqemu/$(IMAGE) =20 docker-clean: $(call quiet-command, $(DOCKER_SCRIPT) clean) diff --git a/tests/docker/docker.py b/tests/docker/docker.py index e630aae1089..cc6f76caa60 100755 --- a/tests/docker/docker.py +++ b/tests/docker/docker.py @@ -204,7 +204,7 @@ def _dockerfile_preprocess(df): for l in df.splitlines(): if len(l.strip()) =3D=3D 0 or l.startswith("#"): continue - from_pref =3D "FROM qemu:" + from_pref =3D "FROM qemu/" if l.startswith(from_pref): # TODO: Alternatively we could replace this line with "FROM $I= D" # where $ID is the image's hex id obtained with diff --git a/tests/docker/dockerfiles/debian-alpha-cross.docker b/tests/doc= ker/dockerfiles/debian-alpha-cross.docker index 74bcabfdb12..10fe30df0dd 100644 --- a/tests/docker/dockerfiles/debian-alpha-cross.docker +++ b/tests/docker/dockerfiles/debian-alpha-cross.docker @@ -3,7 +3,7 @@ # # This docker target builds on the debian Buster base image. # -FROM qemu:debian10 +FROM qemu/debian10 =20 RUN apt update && \ DEBIAN_FRONTEND=3Dnoninteractive eatmydata \ diff --git a/tests/docker/dockerfiles/debian-amd64-cross.docker b/tests/doc= ker/dockerfiles/debian-amd64-cross.docker index 5d890419251..870109ef6af 100644 --- a/tests/docker/dockerfiles/debian-amd64-cross.docker +++ b/tests/docker/dockerfiles/debian-amd64-cross.docker @@ -4,7 +4,7 @@ # This docker target is used on non-x86_64 machines which need the # x86_64 cross compilers installed. # -FROM qemu:debian10 +FROM qemu/debian10 MAINTAINER Alex Benn=C3=A9e =20 # Add the foreign architecture we want and install dependencies diff --git a/tests/docker/dockerfiles/debian-amd64.docker b/tests/docker/do= ckerfiles/debian-amd64.docker index 957f0bc2e79..8fdfd6a6b04 100644 --- a/tests/docker/dockerfiles/debian-amd64.docker +++ b/tests/docker/dockerfiles/debian-amd64.docker @@ -4,7 +4,7 @@ # This docker target builds on the debian Stretch base image. Further # libraries which are not widely available are installed by hand. # -FROM qemu:debian10 +FROM qemu/debian10 MAINTAINER Philippe Mathieu-Daud=C3=A9 =20 RUN apt update && \ diff --git a/tests/docker/dockerfiles/debian-arm64-cross.docker b/tests/doc= ker/dockerfiles/debian-arm64-cross.docker index 09ca0a1ba79..166e24df138 100644 --- a/tests/docker/dockerfiles/debian-arm64-cross.docker +++ b/tests/docker/dockerfiles/debian-arm64-cross.docker @@ -3,7 +3,7 @@ # # This docker target builds on the debian Buster base image. # -FROM qemu:debian10 +FROM qemu/debian10 =20 # Add the foreign architecture we want and install dependencies RUN dpkg --add-architecture arm64 diff --git a/tests/docker/dockerfiles/debian-arm64-test-cross.docker b/test= s/docker/dockerfiles/debian-arm64-test-cross.docker index a44e76d9421..53a9012beb8 100644 --- a/tests/docker/dockerfiles/debian-arm64-test-cross.docker +++ b/tests/docker/dockerfiles/debian-arm64-test-cross.docker @@ -3,7 +3,7 @@ # # This docker target builds on the debian Bullseye base image. # -FROM qemu:debian11 +FROM qemu/debian11 =20 # Add the foreign architecture we want and install dependencies RUN dpkg --add-architecture arm64 diff --git a/tests/docker/dockerfiles/debian-armel-cross.docker b/tests/doc= ker/dockerfiles/debian-armel-cross.docker index e3794a61c95..b7b1a3585f8 100644 --- a/tests/docker/dockerfiles/debian-armel-cross.docker +++ b/tests/docker/dockerfiles/debian-armel-cross.docker @@ -3,7 +3,7 @@ # # This docker target builds on the debian Stretch base image. # -FROM qemu:debian10 +FROM qemu/debian10 MAINTAINER Philippe Mathieu-Daud=C3=A9 =20 # Add the foreign architecture we want and install dependencies diff --git a/tests/docker/dockerfiles/debian-armhf-cross.docker b/tests/doc= ker/dockerfiles/debian-armhf-cross.docker index e163b8b9569..25d76188337 100644 --- a/tests/docker/dockerfiles/debian-armhf-cross.docker +++ b/tests/docker/dockerfiles/debian-armhf-cross.docker @@ -3,7 +3,7 @@ # # This docker target builds on the debian Stretch base image. # -FROM qemu:debian10 +FROM qemu/debian10 =20 # Add the foreign architecture we want and install dependencies RUN dpkg --add-architecture armhf diff --git a/tests/docker/dockerfiles/debian-hppa-cross.docker b/tests/dock= er/dockerfiles/debian-hppa-cross.docker index 5c68b2d3304..3d6c65a3efc 100644 --- a/tests/docker/dockerfiles/debian-hppa-cross.docker +++ b/tests/docker/dockerfiles/debian-hppa-cross.docker @@ -3,7 +3,7 @@ # # This docker target builds on the debian Buster base image. # -FROM qemu:debian10 +FROM qemu/debian10 =20 RUN apt update && \ DEBIAN_FRONTEND=3Dnoninteractive eatmydata \ diff --git a/tests/docker/dockerfiles/debian-m68k-cross.docker b/tests/dock= er/dockerfiles/debian-m68k-cross.docker index 25edc80e9a3..fcb10e35347 100644 --- a/tests/docker/dockerfiles/debian-m68k-cross.docker +++ b/tests/docker/dockerfiles/debian-m68k-cross.docker @@ -3,7 +3,7 @@ # # This docker target builds on the debian Buster base image. # -FROM qemu:debian10 +FROM qemu/debian10 =20 RUN apt update && \ DEBIAN_FRONTEND=3Dnoninteractive eatmydata \ diff --git a/tests/docker/dockerfiles/debian-mips-cross.docker b/tests/dock= er/dockerfiles/debian-mips-cross.docker index 08a8e1c29cc..26c154014db 100644 --- a/tests/docker/dockerfiles/debian-mips-cross.docker +++ b/tests/docker/dockerfiles/debian-mips-cross.docker @@ -3,7 +3,7 @@ # # This docker target builds on the debian Buster base image. # -FROM qemu:debian10 +FROM qemu/debian10 =20 MAINTAINER Philippe Mathieu-Daud=C3=A9 =20 diff --git a/tests/docker/dockerfiles/debian-mips64-cross.docker b/tests/do= cker/dockerfiles/debian-mips64-cross.docker index 1a79505d696..09c2ba584e5 100644 --- a/tests/docker/dockerfiles/debian-mips64-cross.docker +++ b/tests/docker/dockerfiles/debian-mips64-cross.docker @@ -3,7 +3,7 @@ # # This docker target builds on the debian Buster base image. # -FROM qemu:debian10 +FROM qemu/debian10 =20 RUN apt update && \ DEBIAN_FRONTEND=3Dnoninteractive eatmydata \ diff --git a/tests/docker/dockerfiles/debian-mips64el-cross.docker b/tests/= docker/dockerfiles/debian-mips64el-cross.docker index 453b53ef72c..c990b683b7a 100644 --- a/tests/docker/dockerfiles/debian-mips64el-cross.docker +++ b/tests/docker/dockerfiles/debian-mips64el-cross.docker @@ -4,7 +4,7 @@ # This docker target builds on the debian Stretch base image. # =20 -FROM qemu:debian10 +FROM qemu/debian10 =20 MAINTAINER Philippe Mathieu-Daud=C3=A9 =20 diff --git a/tests/docker/dockerfiles/debian-mipsel-cross.docker b/tests/do= cker/dockerfiles/debian-mipsel-cross.docker index 3b6e975c686..0e5dd42d3c4 100644 --- a/tests/docker/dockerfiles/debian-mipsel-cross.docker +++ b/tests/docker/dockerfiles/debian-mipsel-cross.docker @@ -3,7 +3,7 @@ # # This docker target builds on the debian Stretch base image. # -FROM qemu:debian10 +FROM qemu/debian10 =20 MAINTAINER Philippe Mathieu-Daud=C3=A9 =20 diff --git a/tests/docker/dockerfiles/debian-powerpc-cross.docker b/tests/d= ocker/dockerfiles/debian-powerpc-cross.docker index 89dd4fbf870..07e1789650b 100644 --- a/tests/docker/dockerfiles/debian-powerpc-cross.docker +++ b/tests/docker/dockerfiles/debian-powerpc-cross.docker @@ -3,7 +3,7 @@ # # This docker target builds on the debian Buster base image. # -FROM qemu:debian10 +FROM qemu/debian10 =20 RUN apt update && \ DEBIAN_FRONTEND=3Dnoninteractive eatmydata \ diff --git a/tests/docker/dockerfiles/debian-ppc64-cross.docker b/tests/doc= ker/dockerfiles/debian-ppc64-cross.docker index 4bf88ab02dd..8efe68874ed 100644 --- a/tests/docker/dockerfiles/debian-ppc64-cross.docker +++ b/tests/docker/dockerfiles/debian-ppc64-cross.docker @@ -2,7 +2,7 @@ # Docker ppc64 cross-compiler target # # This docker target builds on the debian Buster base image. -FROM qemu:debian10 +FROM qemu/debian10 =20 RUN apt update && \ DEBIAN_FRONTEND=3Dnoninteractive eatmydata \ diff --git a/tests/docker/dockerfiles/debian-ppc64el-cross.docker b/tests/d= ocker/dockerfiles/debian-ppc64el-cross.docker index cd386f01d93..1146a06be62 100644 --- a/tests/docker/dockerfiles/debian-ppc64el-cross.docker +++ b/tests/docker/dockerfiles/debian-ppc64el-cross.docker @@ -3,7 +3,7 @@ # # This docker target builds on the debian Stretch base image. # -FROM qemu:debian10 +FROM qemu/debian10 =20 # Add the foreign architecture we want and install dependencies RUN dpkg --add-architecture ppc64el && \ diff --git a/tests/docker/dockerfiles/debian-riscv64-cross.docker b/tests/d= ocker/dockerfiles/debian-riscv64-cross.docker index 5e2d6ddb600..2bbff19772a 100644 --- a/tests/docker/dockerfiles/debian-riscv64-cross.docker +++ b/tests/docker/dockerfiles/debian-riscv64-cross.docker @@ -3,7 +3,7 @@ # # This docker target builds on the debian Buster base image. # -FROM qemu:debian10 +FROM qemu/debian10 =20 RUN apt update && \ DEBIAN_FRONTEND=3Dnoninteractive eatmydata \ diff --git a/tests/docker/dockerfiles/debian-s390x-cross.docker b/tests/doc= ker/dockerfiles/debian-s390x-cross.docker index 43fe59836f2..9f2ab51eb09 100644 --- a/tests/docker/dockerfiles/debian-s390x-cross.docker +++ b/tests/docker/dockerfiles/debian-s390x-cross.docker @@ -3,7 +3,7 @@ # # This docker target builds on the debian Stretch base image. # -FROM qemu:debian10 +FROM qemu/debian10 =20 # Add the s390x architecture RUN dpkg --add-architecture s390x diff --git a/tests/docker/dockerfiles/debian-sh4-cross.docker b/tests/docke= r/dockerfiles/debian-sh4-cross.docker index 9d7663764e4..fd3af895759 100644 --- a/tests/docker/dockerfiles/debian-sh4-cross.docker +++ b/tests/docker/dockerfiles/debian-sh4-cross.docker @@ -3,7 +3,7 @@ # # This docker target builds on the debian Buster base image. # -FROM qemu:debian10 +FROM qemu/debian10 =20 RUN apt update && \ DEBIAN_FRONTEND=3Dnoninteractive eatmydata \ diff --git a/tests/docker/dockerfiles/debian-sparc64-cross.docker b/tests/d= ocker/dockerfiles/debian-sparc64-cross.docker index 31fd34f120b..f4bb9b561cf 100644 --- a/tests/docker/dockerfiles/debian-sparc64-cross.docker +++ b/tests/docker/dockerfiles/debian-sparc64-cross.docker @@ -3,7 +3,7 @@ # # This docker target builds on the debian Buster base image. # -FROM qemu:debian10 +FROM qemu/debian10 =20 RUN apt update && \ DEBIAN_FRONTEND=3Dnoninteractive eatmydata \ diff --git a/tests/docker/dockerfiles/debian-tricore-cross.docker b/tests/d= ocker/dockerfiles/debian-tricore-cross.docker index 4a0f7706a39..769d95c77bb 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 qemu:debian9 +FROM qemu/debian9 =20 MAINTAINER Philippe Mathieu-Daud=C3=A9 =20 diff --git a/tests/docker/dockerfiles/debian-win32-cross.docker b/tests/doc= ker/dockerfiles/debian-win32-cross.docker index d16d6431bc8..b045e821b91 100644 --- a/tests/docker/dockerfiles/debian-win32-cross.docker +++ b/tests/docker/dockerfiles/debian-win32-cross.docker @@ -3,7 +3,7 @@ # # This docker target builds on the debian Stretch MXE base image. # -FROM qemu:debian9-mxe +FROM qemu/debian9-mxe =20 MAINTAINER Philippe Mathieu-Daud=C3=A9 =20 diff --git a/tests/docker/dockerfiles/debian-win64-cross.docker b/tests/doc= ker/dockerfiles/debian-win64-cross.docker index b0bc960445b..2fc9cfcbc66 100644 --- a/tests/docker/dockerfiles/debian-win64-cross.docker +++ b/tests/docker/dockerfiles/debian-win64-cross.docker @@ -3,7 +3,7 @@ # # This docker target builds on the debian Stretch MXE base image. # -FROM qemu:debian9-mxe +FROM qemu/debian9-mxe =20 MAINTAINER Philippe Mathieu-Daud=C3=A9 =20 diff --git a/tests/docker/dockerfiles/debian9-mxe.docker b/tests/docker/doc= kerfiles/debian9-mxe.docker index 62ff1cecf2d..ae2c222a6f0 100644 --- a/tests/docker/dockerfiles/debian9-mxe.docker +++ b/tests/docker/dockerfiles/debian9-mxe.docker @@ -3,7 +3,7 @@ # # This docker target builds on the debian Stretch base image. # -FROM qemu:debian9 +FROM qemu/debian9 =20 MAINTAINER Philippe Mathieu-Daud=C3=A9 =20 --=20 2.20.1 From nobody Mon May 6 20:47:38 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1593196030; cv=none; d=zohomail.com; s=zohoarc; b=ZAU7G/NDEz+JrBO+x0USRqvU2TH393uoprjcUkJvSrGt+1nrtVJxEuxf1a/pvMgxdDJsBhoxUu0MfSbJL2+o3pIAMR2a5fZkIZDLu6QQE3ejRBObo4e7VVGzOOi4f1IjRxoWl9Sib/Y5AfG2uTDCQsoujB2qMsCBiiYh+I25fag= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1593196030; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=XJD1GL90UWNycRg4BT4TsZXTpQO4+SzPpVo+RlIQlho=; b=Daz5Y+HnSsDnIbBN61Rb1002WOadjfMeGcSrnPj5WbLyEopfOsZDD/kuWs+i9y/aAlziruobx4c+MKThjkvqzrUhzpsoGRRjb2uOU//6xcbLjc3FUulpyAhbEAopchIvGLTQVlM8DuaE8UnOHE1/4QyqaltS4fByQAth9+xJBO4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1593196030603632.7356517311101; Fri, 26 Jun 2020 11:27:10 -0700 (PDT) Received: from localhost ([::1]:60578 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jot49-0002WI-C0 for importer@patchew.org; Fri, 26 Jun 2020 14:27:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58260) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jot05-0003QP-Jn for qemu-devel@nongnu.org; Fri, 26 Jun 2020 14:22:57 -0400 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]:36356) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jot03-0004zr-Tg for qemu-devel@nongnu.org; Fri, 26 Jun 2020 14:22:57 -0400 Received: by mail-wr1-x444.google.com with SMTP id k6so10393668wrn.3 for ; Fri, 26 Jun 2020 11:22:55 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id c65sm17980560wme.8.2020.06.26.11.22.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jun 2020 11:22:51 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 3DFA81FF87; Fri, 26 Jun 2020 19:14:01 +0100 (BST) 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=XJD1GL90UWNycRg4BT4TsZXTpQO4+SzPpVo+RlIQlho=; b=odO2m+38GY5u7jBkBHfu0ZWgdDU5ejLgMHLEgYFNqxahB5OP8i7nia7avZlcG5WhWm aF28c+8eGrmdrAfiIHr8VD/64AoPSoUYNRW2fBeoEgpOELh0kkegyy9CTV6Ohc+gUHDQ kxXi4dUgoJOg0/Z4sV0jATsHYdw07yXK/aDEBTMhV/L1TIXvWcmg7hUwn9MjyRMxjEud GTJ008o1/IiJ7UNLDflSv5LYIPvaONFS0v12cqEMzTvcmwN4jWswJk9OShkezNSSjgPG nQP/aDkl8DCkNFeVzLERM4VmNFbjKlH/05DVcrl4eeyjFPGQUYVyfRHZP7E4pNDvEI5v lixQ== 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=XJD1GL90UWNycRg4BT4TsZXTpQO4+SzPpVo+RlIQlho=; b=g1gSWpIua1y8yF9aelbDt66Q1PU/N4Qb/FHhmrruJO1EPQgQFT0sswHN6rN3Ioq3xl r1MDDPx3KZq2I9SW4snMGQLxo8Z5qrd/EjN0v5Gtp8P2HrnDs3OPwT2nDg9MhecEKyST xq3iWLBqSD+dd50T+IBpFbte4IN4g8//UeeqgshL5dac3wTEIr5/qTTsZzsCXid5Ww8q rRjeDtIfzabxjoMV1ErcNSQtyGtV6Qxo4QK1td+tzf4OHFuCTavHimkcuii2UBnNVk7Q RlpiRtxtcmFBNboAIVa0OcqJT0JDxQ+T3FxsZsUmouTDJL5aWlgs39bxhUXQ4055ErNg pI6A== X-Gm-Message-State: AOAM530k5t0WwzBqKZ9cZFWxA0P095lyzi6lSTh5GogEObN+ekDz/v2j UAuZAX/2U0Qa+aF9Gl+uDoM6Ag== X-Google-Smtp-Source: ABdhPJytYf7XWhpaQeoZaimqMjDB5fzY1VFO8bHaLaSUiRXfLH9CzrO7Zm0i1aPr69JhpDcwUClmDQ== X-Received: by 2002:adf:cd92:: with SMTP id q18mr4951864wrj.113.1593195773822; Fri, 26 Jun 2020 11:22:53 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v3 16/30] .gitignore: un-ignore .gitlab-ci.d Date: Fri, 26 Jun 2020 19:13:43 +0100 Message-Id: <20200626181357.26211-17-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200626181357.26211-1-alex.bennee@linaro.org> References: <20200626181357.26211-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::444; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x444.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: fam@euphon.net, berrange@redhat.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, cota@braap.org, aurelien@aurel32.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) The sooner we deprecate in-tree builds the sooner this mess of regexes can be thrown away. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Thomas Huth --- v2 - just use explicit !/.gitlab-ci.d --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 90acb4347d4..2992d15931a 100644 --- a/.gitignore +++ b/.gitignore @@ -93,6 +93,7 @@ *.tp *.vr *.d +!/.gitlab-ci.d !/scripts/qemu-guest-agent/fsfreeze-hook.d *.o .sdk --=20 2.20.1 From nobody Mon May 6 20:47:38 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1593195664; cv=none; d=zohomail.com; s=zohoarc; b=WbVaAi9970iOdktq74vH21EaasE//JgsnAF981HpC8qANklQi40G/We5b0WBvlVEPkK9H6LnDd0uvtbDNNwkgQYCfFwAGDz5UpOFKI9RP6WS9nZTfBbK/kL1ajGfKF0KCKSBWCHQxek+ARQNk+bOc5ABxE+yQE/HRGQ8dBZO4rM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1593195664; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=R/BE2XE6etuSC77gKrMmoWm+NEYkm1ni6VwaHNKkepk=; b=hPelgyBCw6vX3RktkDdHrajuZTK+zMVX2/Hp+sgAjvHl4aLpqhNqkx3V1jezupApSiMn8LzEMTYDbqOkattx5sb/4BVPEr61ky5w+c5rflnalhxIyB/UHJ7QSfP/nc26s7hNIT5xdsIQ6rYEVXJzp9yNAhvEH3kjplLI3ikQM/c= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1593195664442383.028403171022; Fri, 26 Jun 2020 11:21:04 -0700 (PDT) Received: from localhost ([::1]:35198 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1josyF-0000ca-9Y for importer@patchew.org; Fri, 26 Jun 2020 14:21:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56206) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1josrt-0007ZG-N7 for qemu-devel@nongnu.org; Fri, 26 Jun 2020 14:14:29 -0400 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]:36893) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1josrk-0001K2-JJ for qemu-devel@nongnu.org; Fri, 26 Jun 2020 14:14:29 -0400 Received: by mail-wm1-x32b.google.com with SMTP id o2so10228232wmh.2 for ; Fri, 26 Jun 2020 11:14:19 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id a10sm38384515wrm.21.2020.06.26.11.14.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jun 2020 11:14:10 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 773551FF9E; Fri, 26 Jun 2020 19:14:01 +0100 (BST) 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=R/BE2XE6etuSC77gKrMmoWm+NEYkm1ni6VwaHNKkepk=; b=QOinNastaUJXPpyMw4NO8+J0iZlcQkKQXvn5XBFD4ro/7qXqQiQXXlmkcrBF6ERVly 6pnMd8uwuKILEKWU19vAQAY5fRo374CkhZvrFklFhUe7KCH+DNDksCYo4mvRVAuZDZre RuxdQC7IgNw8W82VrMWRclZWwAo+L7s7SFncJqEPTs+PqCSF/viCxEF4iTGSIfg5Hjn3 FteroPD27XOgUkc/gxs+mzD4K5jrknzfqsslBj7wVpEV/ypbJs9WuP6qQya7Yg/TO69d WJQhQ3vYIJA7O6d4IdaQdZAFM1sia1B1R+/W9HgdekbMQF+k5/oaHiA00AdOXny1KK9Q M3MA== 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=R/BE2XE6etuSC77gKrMmoWm+NEYkm1ni6VwaHNKkepk=; b=S5S5BwdSXJkDjaOs/usw4E0qjwKfKYg8yWp2CDMung332hxxHIt9eYnKV2g864AGtK J0zuffQ8qkXxkT/xYumWWtvARvRjTqycPE6OC/Nmts/6a0o+5Lz9rIwxlEsCoNROg8YB rOgYgNAOyqBmFyGMfobauLMw57MDvrGVRoJ1GnbWJ59jVdhvJrrPUxvKauAFQLVCqquW hkhwIIhFKjoUdCqFrdIOOsQQwRLIubSN4pqDN7qbVhhrCo9FPKNnbhJCIlPsoihR7AIi 3yRlZhnndLC8hu4OMQqP/w3NY5b+qUHk8An71fdyeF+AfJB9HVgypEZ4vCPShtLhDRMh 0udA== X-Gm-Message-State: AOAM532UO8vhjF9RVoFHCDxVH1CFqHnBy8duR8MRiAefVaNZptm4+DiR Rx9ZQRWyccIt6fCLhJov1Gk54g== X-Google-Smtp-Source: ABdhPJwd19ceimdwjl1hHH3vu8LJSxv3dhgNqqSaQdRnPnmufln37JH7NkjWrNL6LYh51ac5vZ4n+Q== X-Received: by 2002:a7b:ca52:: with SMTP id m18mr4663236wml.92.1593195258752; Fri, 26 Jun 2020 11:14:18 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v3 17/30] gitlab-ci: Fix the change rules after moving the YML files Date: Fri, 26 Jun 2020 19:13:44 +0100 Message-Id: <20200626181357.26211-18-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200626181357.26211-1-alex.bennee@linaro.org> References: <20200626181357.26211-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32b; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32b.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: fam@euphon.net, Thomas Huth , berrange@redhat.com, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , richard.henderson@linaro.org, f4bug@amsat.org, Laszlo Ersek , cota@braap.org, aurelien@aurel32.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Thomas Huth The edk2.yml and opensbi.yml files have recently been moved/renamed, but the change has not been reflected in the rules in the YML files yet. Fixes: 922febe2af ("Move edk2 and opensbi YAML files to .gitlab-ci.d folder= ") Signed-off-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20200625151627.24986-1-thuth@redhat.com> Reviewed-by: Laszlo Ersek --- .gitlab-ci.d/edk2.yml | 2 +- .gitlab-ci.d/opensbi.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.d/edk2.yml b/.gitlab-ci.d/edk2.yml index 088ba4b43a3..a9990b71475 100644 --- a/.gitlab-ci.d/edk2.yml +++ b/.gitlab-ci.d/edk2.yml @@ -2,7 +2,7 @@ docker-edk2: stage: build rules: # Only run this job when the Dockerfile is modified - changes: - - .gitlab-ci-edk2.yml + - .gitlab-ci.d/edk2.yml - .gitlab-ci.d/edk2/Dockerfile when: always image: docker:19.03.1 diff --git a/.gitlab-ci.d/opensbi.yml b/.gitlab-ci.d/opensbi.yml index dd051c01245..6a1750784ac 100644 --- a/.gitlab-ci.d/opensbi.yml +++ b/.gitlab-ci.d/opensbi.yml @@ -2,7 +2,7 @@ docker-opensbi: stage: build rules: # Only run this job when the Dockerfile is modified - changes: - - .gitlab-ci-opensbi.yml + - .gitlab-ci.d/opensbi.yml - .gitlab-ci.d/opensbi/Dockerfile when: always image: docker:19.03.1 --=20 2.20.1 From nobody Mon May 6 20:47:38 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1593195456; cv=none; d=zohomail.com; s=zohoarc; b=U2kNcp0Gd5FXf54JEhUCzGILAa2SDIdu+ul9MaavXFQuIxSpOFhTr+khe7u9yVV9+sWl/iE0pLmQw/M51ccMCNxipiWpwiNRePzAoSoK9+xFoErE6T3nVB2ngZh9ydMhwkpbxsIsiqiG1s8fgZb4FC37twRi044vYwoa/F8Fv34= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1593195456; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=BoQbWA8pgX9GC2xijlmIAV/4o0rgmcM2g2psEePuq2U=; b=E+TGZn2F6D/c7E7OegeAnYQl6Bbytnja7jwJqvrTDdGzDNOGrnrFrGvBlLb7jajrDaBebmIy/9HpZ92t4hmCO+VWB+/EncZ0rScqL4yVVW9m0LmuRVNjL8Bd2A4tOVBkawPhZ4kv//vC4Dw4jWE13Brk9VdDDFvWvqcso65i6ds= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1593195456808236.12095362660943; Fri, 26 Jun 2020 11:17:36 -0700 (PDT) Received: from localhost ([::1]:51104 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1josut-0003tK-Fz for importer@patchew.org; Fri, 26 Jun 2020 14:17:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56126) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1josrm-0007Un-UT for qemu-devel@nongnu.org; Fri, 26 Jun 2020 14:14:23 -0400 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]:51512) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1josrg-0001JL-DZ for qemu-devel@nongnu.org; Fri, 26 Jun 2020 14:14:22 -0400 Received: by mail-wm1-x32a.google.com with SMTP id 22so9650459wmg.1 for ; Fri, 26 Jun 2020 11:14:15 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id t205sm18307821wmt.8.2020.06.26.11.14.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jun 2020 11:14:10 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id B62821FF9F; Fri, 26 Jun 2020 19:14:01 +0100 (BST) 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=BoQbWA8pgX9GC2xijlmIAV/4o0rgmcM2g2psEePuq2U=; b=hWxqrGXsz36qzwCeXVhSjT+83pk8BWctvg22Wv2Emy+il1Fhtc7ZMaon6uHozo+7Mx 1De2xyZYtfWafr6gZz+zl2eS2TvvKuTqh+ZfDJFnit16t4wMHKjvub2vtIhiIVIZoSP2 UJ/qK1/1hjlMxbCLEKm//kdBqsb67S4MTmS6kvvEkBI3Plu806emuZjxIr4zaSPCeXLE 2G0A9mFmbc1Vtcdz38SzzvlDAKvzS1TQrwJudokkN1NzKx5cP19FKiOYorrexPNN7ETW hkmYImsvQomjDZICZDKgpMEj8WzV8FiTwVG7sHlMPkRCQXU1J0FXRogyS8dN+WKc2exu nMhQ== 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=BoQbWA8pgX9GC2xijlmIAV/4o0rgmcM2g2psEePuq2U=; b=FfnAT2WcsZkjV5fGlsnP1chrgvwkVHS9DpFX0KX7znffpG5fj2uHz3LHn2N7NyIZDg +y6g+VyC6uKcS5zAAiOMGTNMJ5YVAmmC0/O0Ee1OfGfkA5Wl3GfFad6fZ3yvtU1rFe+G EON8vX0OdzXel5VsxbCv/hTyUcM1QpT7Oa3BfVT0Xlf6zDy2MUzuXS9doKzRtqkSd9lh KOmsw0UyVutub+QhRk2X2FTiC6hjeUn94xM9g0G+QjIhChfbrJ+tibf0TtSio42AfkMk uFwrFMIaWw1sjg4bm2L1n9lAq2auL56bT18pNT2h54o0j0EJVDbgPrO8KiXpm/H6AmKT 738Q== X-Gm-Message-State: AOAM532XWIcQGgjv+wfsGzfQXH5iSQOfrWV+/N66qoZBBcaTa+YhdBsz HHs205OqXpmgPQgpxu/nXCy1cg== X-Google-Smtp-Source: ABdhPJxlKMLSvZR+MYg4gZ1LgSuaFbLj3SIQIT9vnqW+sVPQqu2GRaig6z0CWBuDI4F6txb1hMIo7g== X-Received: by 2002:a1c:b4c2:: with SMTP id d185mr4495615wmf.57.1593195254714; Fri, 26 Jun 2020 11:14:14 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v3 18/30] gitlab: introduce explicit "container" and "build" stages Date: Fri, 26 Jun 2020 19:13:45 +0100 Message-Id: <20200626181357.26211-19-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200626181357.26211-1-alex.bennee@linaro.org> References: <20200626181357.26211-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32a.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: fam@euphon.net, Thomas Huth , berrange@redhat.com, Laszlo Ersek , richard.henderson@linaro.org, f4bug@amsat.org, Wainer dos Santos Moschetta , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Alex=20Benn=C3=A9e?= , cota@braap.org, aurelien@aurel32.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Daniel P. Berrang=C3=A9 If no stage is listed, jobs get put in an implicit "test" stage. Some jobs which create container images to be used by later stages are currently listed as in a "build" stages. Signed-off-by: Daniel P. Berrang=C3=A9 Acked-by: Laszlo Ersek Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20200622153318.751107-2-berrange@redhat.com> --- .gitlab-ci.d/edk2.yml | 3 ++- .gitlab-ci.d/opensbi.yml | 3 ++- .gitlab-ci.yml | 11 +++++++++++ 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.d/edk2.yml b/.gitlab-ci.d/edk2.yml index a9990b71475..e1e04524166 100644 --- a/.gitlab-ci.d/edk2.yml +++ b/.gitlab-ci.d/edk2.yml @@ -1,5 +1,5 @@ docker-edk2: - stage: build + stage: containers rules: # Only run this job when the Dockerfile is modified - changes: - .gitlab-ci.d/edk2.yml @@ -24,6 +24,7 @@ docker-edk2: - docker push $IMAGE_TAG =20 build-edk2: + stage: build rules: # Only run this job when ... - changes: # ... roms/edk2/ is modified (submodule updated) - roms/edk2/* diff --git a/.gitlab-ci.d/opensbi.yml b/.gitlab-ci.d/opensbi.yml index 6a1750784ac..62088ec5ec1 100644 --- a/.gitlab-ci.d/opensbi.yml +++ b/.gitlab-ci.d/opensbi.yml @@ -1,5 +1,5 @@ docker-opensbi: - stage: build + stage: containers rules: # Only run this job when the Dockerfile is modified - changes: - .gitlab-ci.d/opensbi.yml @@ -24,6 +24,7 @@ docker-opensbi: - docker push $IMAGE_TAG =20 build-opensbi: + stage: build rules: # Only run this job when ... - changes: # ... roms/opensbi/ is modified (submodule updated) - roms/opensbi/* diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 349c77aa580..9fdc752ea63 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,3 +1,7 @@ +stages: + - containers + - build + include: - local: '/.gitlab-ci.d/edk2.yml' - local: '/.gitlab-ci.d/opensbi.yml' @@ -17,6 +21,7 @@ include: - JOBS=3D$(expr $(nproc) + 1) =20 build-system1: + stage: build image: ubuntu:19.10 <<: *before_script_apt script: @@ -31,6 +36,7 @@ build-system1: - make -j"$JOBS" check =20 build-system2: + stage: build image: fedora:latest <<: *before_script_dnf script: @@ -46,6 +52,7 @@ build-system2: - make -j"$JOBS" check =20 build-disabled: + stage: build image: fedora:latest <<: *before_script_dnf script: @@ -62,6 +69,7 @@ build-disabled: - make -j"$JOBS" check-qtest SPEED=3Dslow =20 build-tcg-disabled: + stage: build image: centos:8 <<: *before_script_dnf script: @@ -82,6 +90,7 @@ build-tcg-disabled: 260 261 262 263 264 270 272 273 277 279 =20 build-user: + stage: build <<: *before_script_apt script: - mkdir build @@ -92,6 +101,7 @@ build-user: - make run-tcg-tests-i386-linux-user run-tcg-tests-x86_64-linux-user =20 build-clang: + stage: build image: fedora:latest <<: *before_script_dnf script: @@ -106,6 +116,7 @@ build-clang: - make -j"$JOBS" check =20 build-tci: + stage: build image: centos:8 <<: *before_script_dnf script: --=20 2.20.1 From nobody Mon May 6 20:47:38 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1593196207; cv=none; d=zohomail.com; s=zohoarc; b=IS8Z9V9Th8mFA64rSchkgXRBCxo9JgvO44ekVpzJqrqg6idGmcmYq81Ae48Zh6uOnfY1y4tFarmLip1pAs5QmKKIM/mfdgXwwyncmdcWukcYMseZ/dAjXWiR8sxZI4aInca9sE9YB7NJ7KuLcX2NJ+QTHhbRaeZdaSsbQn/YCuE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1593196207; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=xUZG6tLp/xI8r3bd4dXEs/uYPfQvAur5hQZG/hEKfXs=; b=gVYTGdcHOa1PtUaOvaWr9fS29bRxeCHrPXEhmkz/xYLQ9mnuqAhrKpekGZ2juNyFNqCvLW5Cbap6ZC6aKSvtcRerBV/uq5fAvlxOa0f5masWWBbIAwYhwXhlWGNmSZlV/PZErw0lhi6sZqB11Nuk4P3LQ91uyfKo6S2tZfhYGrM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1593196207942371.2071333651252; Fri, 26 Jun 2020 11:30:07 -0700 (PDT) Received: from localhost ([::1]:45126 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jot70-0007kP-Br for importer@patchew.org; Fri, 26 Jun 2020 14:30:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58324) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jot0B-0003ds-E8 for qemu-devel@nongnu.org; Fri, 26 Jun 2020 14:23:03 -0400 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]:44796) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jot09-00055f-Af for qemu-devel@nongnu.org; Fri, 26 Jun 2020 14:23:03 -0400 Received: by mail-wr1-x42f.google.com with SMTP id b6so10356875wrs.11 for ; Fri, 26 Jun 2020 11:23:00 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id z16sm27768267wrr.35.2020.06.26.11.22.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jun 2020 11:22:56 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id F189A1FFA5; Fri, 26 Jun 2020 19:14:01 +0100 (BST) 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=xUZG6tLp/xI8r3bd4dXEs/uYPfQvAur5hQZG/hEKfXs=; b=podm8PhcCmL7vam9aI9CPY+fYS9MtndrEkcOmhw8MQk++72Yuc43FVzU3vk10+0muO OHYf0eclrX9mL3phNozKFbraMeBKc+HpCcAYuNwe7XbHUly4m+NafwlWvaA/PMTrncSo FFUxpSBiu7G24wYTfj63pvyPsUeadOtO+MhHEdy6/7uHLizhi7Ratw/hGI0ViZkfJ6/j 2s7Z5MjeCdCgkGyHV49f36Pd3EfwpoU+Ig7YpiJOo3uJ/dbZzWUy7m6scWTROV3lbrOa UcCnwWrIihHhsfXBKEliydKSpMYSdBelC+ZwjOUCI7AXoLWG9a8kpNGTzC+fRz2nwCWv lXdQ== 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=xUZG6tLp/xI8r3bd4dXEs/uYPfQvAur5hQZG/hEKfXs=; b=OUvUFaCdyAzR9y6icFNjFZacfeKiDpDtFwKdeKF+srKDDf9Z0DjzGPtnJKTpD9a604 SFO6tAngGYupviGtSJTlqGRcFBJ38SoOwjx07e2F88YuCSld4SHeKqXYm0RIqka9Lru9 Asej6EorQO2Vh/xMtq+mM+BCmCSsQwHwD9S0h4FtugfoE9kZ0ITdhEMlibreDbKogb8b dmUKN7lQ0Rt1YEM/uKkdR7kCSJ6j2paVQjWr6KY8/v5M5DYIao4eOXWRMcjWLu2CWZ7g 76kJoyuLE+VjJPEJR01u8lFULbaOKxlgjNXp6F3tWj5RLqOvGOxfMu8978dbuoYHsuj+ wmLw== X-Gm-Message-State: AOAM532ZJy7XJVca1KUxJn5wVjgvHPqKxwCon7LxW3EuXC98KplJ2HkH gjKVKlxpYyfIi6maKuooI5VHLw== X-Google-Smtp-Source: ABdhPJxo6zKuyUdIwOJz4uDUryeGy82n33hJD+nGjaO7b6mOUmJNkZsGXxNRzGm+438WrmeJeajkew== X-Received: by 2002:adf:f2cd:: with SMTP id d13mr4821906wrp.378.1593195779870; Fri, 26 Jun 2020 11:22:59 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v3 19/30] gitlab: build all container images during CI Date: Fri, 26 Jun 2020 19:13:46 +0100 Message-Id: <20200626181357.26211-20-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200626181357.26211-1-alex.bennee@linaro.org> References: <20200626181357.26211-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42f.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: fam@euphon.net, Thomas Huth , berrange@redhat.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, Wainer dos Santos Moschetta , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , cota@braap.org, aurelien@aurel32.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Daniel P. Berrang=C3=A9 We have a number of container images in tests/docker/dockerfiles that are intended to provide well defined environments for doing test builds. We want our CI system to use these containers too. This introduces builds of all of them as the first stage in the CI, so that the built containers are available for later build jobs. The containers are setup to use the GitLab container registry as the cache, so we only pay the penalty of the full build when the dockerfiles change. The main qemu-project/qemu repo is used as a second cache, so that users forking QEMU will see a fast turnaround time on their CI jobs. Signed-off-by: Daniel P. Berrang=C3=A9 Message-Id: <20200622153318.751107-3-berrange@redhat.com> [AJB: tweak the tag format] Signed-off-by: Alex Benn=C3=A9e Acked-by: Thomas Huth --- .gitlab-ci.d/containers.yml | 248 ++++++++++++++++++++++++++++++++++++ .gitlab-ci.yml | 3 + 2 files changed, 251 insertions(+) create mode 100644 .gitlab-ci.d/containers.yml diff --git a/.gitlab-ci.d/containers.yml b/.gitlab-ci.d/containers.yml new file mode 100644 index 00000000000..580439647ef --- /dev/null +++ b/.gitlab-ci.d/containers.yml @@ -0,0 +1,248 @@ + + +.container_job_template: &container_job_definition + image: docker:stable + stage: containers + services: + - docker:dind + before_script: + - export TAG=3D"$CI_REGISTRY_IMAGE/qemu/$NAME:latest" + - export COMMON_TAG=3D"$CI_REGISTRY/qemu-project/qemu/$NAME:latest" + - docker info + - docker login registry.gitlab.com -u "$CI_REGISTRY_USER" -p "$CI_REGI= STRY_PASSWORD" + script: + - docker pull "$TAG" || docker pull "$COMMON_TAG" || true + - sed -i -e "s,FROM qemu/,FROM $CI_REGISTRY_IMAGE/qemu/," tests/docker= /dockerfiles/$NAME.docker + - docker build --cache-from "$TAG" --cache-from "$COMMON_TAG" --tag "$= TAG" -f "tests/docker/dockerfiles/$NAME.docker" tests/docker/dockerfiles + - docker push "$TAG" + after_script: + - docker logout + +amd64-centos7-container: + <<: *container_job_definition + variables: + NAME: centos7 + +amd64-centos8-container: + <<: *container_job_definition + variables: + NAME: centos8 + +amd64-debian10-container: + <<: *container_job_definition + variables: + NAME: debian10 + +amd64-debian11-container: + <<: *container_job_definition + variables: + NAME: debian11 + +amd64-debian9-container: + <<: *container_job_definition + variables: + NAME: debian9 + +amd64-debian9-mxe-container: + <<: *container_job_definition + stage: containers-layer2 + needs: ['amd64-debian9-container'] + variables: + NAME: debian9-mxe + +alpha-debian-cross-container: + <<: *container_job_definition + stage: containers-layer2 + needs: ['amd64-debian10-container'] + variables: + NAME: debian-alpha-cross + +amd64-debian-cross-container: + <<: *container_job_definition + stage: containers-layer2 + needs: ['amd64-debian10-container'] + variables: + NAME: debian-amd64-cross + +amd64-debian-container: + <<: *container_job_definition + stage: containers-layer2 + needs: ['amd64-debian10-container'] + variables: + NAME: debian-amd64 + +arm64-debian-cross-container: + <<: *container_job_definition + stage: containers-layer2 + needs: ['amd64-debian10-container'] + variables: + NAME: debian-arm64-cross + +arm64-test-debian-cross-container: + <<: *container_job_definition + stage: containers-layer2 + needs: ['amd64-debian11-container'] + variables: + NAME: debian-arm64-test-cross + +armel-debian-cross-container: + <<: *container_job_definition + stage: containers-layer2 + needs: ['amd64-debian10-container'] + variables: + NAME: debian-armel-cross + +armhf-debian-cross-container: + <<: *container_job_definition + stage: containers-layer2 + needs: ['amd64-debian10-container'] + variables: + NAME: debian-armhf-cross + +hppa-debian-cross-container: + <<: *container_job_definition + stage: containers-layer2 + needs: ['amd64-debian10-container'] + variables: + NAME: debian-hppa-cross + +m68k-debian-cross-container: + <<: *container_job_definition + stage: containers-layer2 + needs: ['amd64-debian10-container'] + variables: + NAME: debian-m68k-cross + +mips64-debian-cross-container: + <<: *container_job_definition + stage: containers-layer2 + needs: ['amd64-debian10-container'] + variables: + NAME: debian-mips64-cross + +mips64el-debian-cross-container: + <<: *container_job_definition + stage: containers-layer2 + needs: ['amd64-debian10-container'] + variables: + NAME: debian-mips64el-cross + +mips-debian-cross-container: + <<: *container_job_definition + stage: containers-layer2 + needs: ['amd64-debian10-container'] + variables: + NAME: debian-mips-cross + +mipsel-debian-cross-container: + <<: *container_job_definition + stage: containers-layer2 + needs: ['amd64-debian10-container'] + variables: + NAME: debian-mipsel-cross + +powerpc-debian-cross-container: + <<: *container_job_definition + stage: containers-layer2 + needs: ['amd64-debian10-container'] + variables: + NAME: debian-powerpc-cross + +ppc64-debian-cross-container: + <<: *container_job_definition + stage: containers-layer2 + needs: ['amd64-debian10-container'] + variables: + NAME: debian-ppc64-cross + +ppc64el-debian-cross-container: + <<: *container_job_definition + stage: containers-layer2 + needs: ['amd64-debian10-container'] + variables: + NAME: debian-ppc64el-cross + +riscv64-debian-cross-container: + <<: *container_job_definition + stage: containers-layer2 + needs: ['amd64-debian10-container'] + variables: + NAME: debian-riscv64-cross + +s390x-debian-cross-container: + <<: *container_job_definition + stage: containers-layer2 + needs: ['amd64-debian10-container'] + variables: + NAME: debian-s390x-cross + +sh4-debian-cross-container: + <<: *container_job_definition + stage: containers-layer2 + needs: ['amd64-debian10-container'] + variables: + NAME: debian-sh4-cross + +sparc64-debian-cross-container: + <<: *container_job_definition + stage: containers-layer2 + needs: ['amd64-debian10-container'] + variables: + NAME: debian-sparc64-cross + +tricore-debian-cross-container: + <<: *container_job_definition + stage: containers-layer2 + needs: ['amd64-debian9-container'] + variables: + NAME: debian-tricore-cross + +win32-debian-cross-container: + <<: *container_job_definition + stage: containers-layer3 + needs: ['amd64-debian9-mxe-container'] + variables: + NAME: debian-win32-cross + +win64-debian-cross-container: + <<: *container_job_definition + stage: containers-layer3 + needs: ['amd64-debian9-mxe-container'] + variables: + NAME: debian-win64-cross + +xtensa-debian-cross-container: + <<: *container_job_definition + variables: + NAME: debian-xtensa-cross + +cris-fedora-cross-container: + <<: *container_job_definition + variables: + NAME: fedora-cris-cross + +amd64-fedora-container: + <<: *container_job_definition + variables: + NAME: fedora + +i386-fedora-cross-container: + <<: *container_job_definition + variables: + NAME: fedora-i386-cross + +amd64-ubuntu1804-container: + <<: *container_job_definition + variables: + NAME: ubuntu1804 + +amd64-ubuntu2004-container: + <<: *container_job_definition + variables: + NAME: ubuntu2004 + +amd64-ubuntu-container: + <<: *container_job_definition + variables: + NAME: ubuntu + diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9fdc752ea63..72d688875fd 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,10 +1,13 @@ stages: - containers + - containers-layer2 + - containers-layer3 - build =20 include: - local: '/.gitlab-ci.d/edk2.yml' - local: '/.gitlab-ci.d/opensbi.yml' + - local: '/.gitlab-ci.d/containers.yml' =20 .update_apt_template: &before_script_apt before_script: --=20 2.20.1 From nobody Mon May 6 20:47:38 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1593195938; cv=none; d=zohomail.com; s=zohoarc; b=ahcrTruYy/+RZnnkZy2ZY6ungJLdVkeSMXHGE1jmSxTHaXeSY4OliOC7cl8QmlNUa4qhcQYqcxiEPKw9WTDC5DAIkVhKThPs2B6h0dnE5zkVu6zej7Sk2U30a1Gj243PGtefoBiOaN+fTHZBQBZOvkLoq22h9TyO6uVmRre+xEQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1593195938; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=gYny8RQMLGvnYX7pxE0cYv3y41J+K9oraa4mW6ajsxI=; b=W52zd8tL1MZ3hHEdDMVZBUiCD18P+wss8TGpWTMKCqmHXaFaj6wRDkCdbbaQZirLv8s58zpLGOOAQeTsQ5eRUceKjeC/BMUvIaiw5sGVdwOyf0I8WyxoTVKv7JcCXgC7jlc04ZAU0QIapq76ClOAy5xLlCPGzILStGr5bPqa4PE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1593195938306781.9753132939657; Fri, 26 Jun 2020 11:25:38 -0700 (PDT) Received: from localhost ([::1]:54854 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jot2e-00008a-VH for importer@patchew.org; Fri, 26 Jun 2020 14:25:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58288) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jot07-0003VD-Lq for qemu-devel@nongnu.org; Fri, 26 Jun 2020 14:22:59 -0400 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]:38406) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jot05-00051u-Il for qemu-devel@nongnu.org; Fri, 26 Jun 2020 14:22:59 -0400 Received: by mail-wm1-x32d.google.com with SMTP id f18so10241961wml.3 for ; Fri, 26 Jun 2020 11:22:57 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id p14sm1965009wrj.14.2020.06.26.11.22.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jun 2020 11:22:51 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 1FC8A1FFA6; Fri, 26 Jun 2020 19:14:02 +0100 (BST) 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=gYny8RQMLGvnYX7pxE0cYv3y41J+K9oraa4mW6ajsxI=; b=bn5Ixda0gQME1wVTVXpB5zWgBvPHbyGBiIEKhgVjxiCiM/xM6185++h8LDn7lGXhOs jPP2xH/yqFcFjVqQo3JC4k4ipNRRfa3LB0PD2Y+uPwa1H0cN26kRK+eUxnwKGA/6sD61 6pIVfckI+rjT/GroluIPUXXLgLboZNRM/qyvG/eppQJ+7gQ3Xn4lh8xuGDdLnouGRJLp 0ojlaz/lsWHh5jR8DR9J+GP3KO2goCRAxYF86rPIuSVeiSMo059pHQpZNtRB/qvl/m0m oR5yqrN6YdhaxI4tHc5KQ7+sPOtsCdxfBiGGBNhssXyULClREtMkji5v3kdz5ghPzqyH /rXw== 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=gYny8RQMLGvnYX7pxE0cYv3y41J+K9oraa4mW6ajsxI=; b=E+lEiJlMRgqDX+PThbRbQrxghow9soK5OW7nnV1kK9bDpimbhvIiWx1ZGKmRHV2hn/ Q6nGvwt74vCl1HXVOoqnImPs0zLnkUdyaaWxRmubGi2beM5SQ+U8LNtfCJlpq+7RzDWO dDrI3mwjqC+Z7ANDPdw/G0N06US9jDmNtvqOIWiPqagrVYN8ImpW5mPyV+Mzg5UkshFp LX1tzrbaIAbQdLwupWiUNBK2gmeR9O4LlXveZmZbPb88epKhvqPwE+iddDaCGk+RxcA4 6OVnM1UDhgzpU7qg1rxJ+4u9L3Ms9zp8KbrwlrJARmE4kXx0+TjBHMImRcr/tfAcS8UF Fzxg== X-Gm-Message-State: AOAM530mop8gRPXBnXgR+OHr+6Y9nsuXqoWvBw77pV9Y4u98g6+2gpzj oDbdheyepbAUlmtsCOISmTbXHw== X-Google-Smtp-Source: ABdhPJw3xCdB+INVCt5RGCiJs0MAjMhOZ0+4bInqfY0qyktGSGfZlU+SLgMRev2mqJGcFwTJSmwuZg== X-Received: by 2002:a1c:9ad8:: with SMTP id c207mr4506785wme.45.1593195775996; Fri, 26 Jun 2020 11:22:55 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v3 20/30] gitlab: convert jobs to use custom built containers Date: Fri, 26 Jun 2020 19:13:47 +0100 Message-Id: <20200626181357.26211-21-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200626181357.26211-1-alex.bennee@linaro.org> References: <20200626181357.26211-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32d.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: fam@euphon.net, Thomas Huth , berrange@redhat.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, Wainer dos Santos Moschetta , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , cota@braap.org, aurelien@aurel32.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Daniel P. Berrang=C3=A9 Now that we're building standard container images from dockerfiles in tests/docker/dockerfiles, we can convert the build jobs to use them. The key benefit of this is that a contributor can now more easily replicate the CI environment on their local machine. The container images are cached too, so we are not spending time waiting for the apt-get/dnf package installs to complete. Signed-off-by: Daniel P. Berrang=C3=A9 Message-Id: <20200622153318.751107-4-berrange@redhat.com> [AJB: tweak naming convention] Signed-off-by: Alex Benn=C3=A9e Acked-by: Thomas Huth --- .gitlab-ci.yml | 187 +++++++++++++++++++++---------------------------- 1 file changed, 81 insertions(+), 106 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 72d688875fd..a7abc55a5c6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -9,133 +9,108 @@ include: - local: '/.gitlab-ci.d/opensbi.yml' - local: '/.gitlab-ci.d/containers.yml' =20 -.update_apt_template: &before_script_apt - before_script: - - apt-get update -qq - - apt-get install -y -qq git gcc libglib2.0-dev libpixman-1-dev make - genisoimage - - JOBS=3D$(expr $(nproc) + 1) - -.update_dnf_template: &before_script_dnf - before_script: - - dnf update -y - - dnf install -y bzip2 diffutils gcc git genisoimage findutils glib2-dev= el - make python3 perl-podlators perl-Test-Harness pixman-devel zlib-de= vel - - JOBS=3D$(expr $(nproc) + 1) +.native_build_job_template: &native_build_job_definition + stage: build + image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:latest + before_script: + - JOBS=3D$(expr $(nproc) + 1) + script: + - mkdir build + - cd build + - if test -n "$TARGETS"; + then + ../configure --enable-werror $CONFIGURE_ARGS --target-list=3D"$TAR= GETS" ; + else + ../configure --enable-werror $CONFIGURE_ARGS ; + fi + - make -j"$JOBS" + - make -j"$JOBS" $MAKE_CHECK_ARGS =20 build-system1: - stage: build - image: ubuntu:19.10 - <<: *before_script_apt - script: - - apt-get install -y -qq libgtk-3-dev libvte-dev nettle-dev libcacard-dev - libusb-dev libvde-dev libspice-protocol-dev libgl1-mesa-dev libvdepl= ug-dev - - mkdir build - - cd build - - ../configure --enable-werror --target-list=3D"aarch64-softmmu alpha-sof= tmmu - cris-softmmu hppa-softmmu lm32-softmmu moxie-softmmu microblazeel-so= ftmmu - mips64el-softmmu m68k-softmmu ppc-softmmu riscv64-softmmu sparc-soft= mmu" - - make -j"$JOBS" - - make -j"$JOBS" check + <<: *native_build_job_definition + variables: + IMAGE: ubuntu2004 + TARGETS: aarch64-softmmu alpha-softmmu cris-softmmu hppa-softmmu lm32-= softmmu + moxie-softmmu microblazeel-softmmu mips64el-softmmu m68k-softmmu ppc= -softmmu + riscv64-softmmu sparc-softmmu + MAKE_CHECK_ARGS: check =20 build-system2: - stage: build - image: fedora:latest - <<: *before_script_dnf - script: - - yum install -y SDL2-devel libgcrypt-devel brlapi-devel libaio-devel - libfdt-devel lzo-devel librdmacm-devel libibverbs-devel libibumad-d= evel - libzstd-devel - - mkdir build - - cd build - - ../configure --enable-werror --target-list=3D"tricore-softmmu unicore32= -softmmu - microblaze-softmmu mips-softmmu riscv32-softmmu s390x-softmmu sh4-so= ftmmu - sparc64-softmmu x86_64-softmmu xtensa-softmmu nios2-softmmu or1k-sof= tmmu" - - make -j"$JOBS" - - make -j"$JOBS" check + <<: *native_build_job_definition + variables: + IMAGE: fedora + TARGETS: tricore-softmmu unicore32-softmmu microblaze-softmmu mips-sof= tmmu + riscv32-softmmu s390x-softmmu sh4-softmmu sparc64-softmmu x86_64-sof= tmmu + xtensa-softmmu nios2-softmmu or1k-softmmu + MAKE_CHECK_ARGS: check =20 build-disabled: - stage: build - image: fedora:latest - <<: *before_script_dnf - script: - - mkdir build - - cd build - - ../configure --enable-werror --disable-rdma --disable-slirp --disable-c= url + <<: *native_build_job_definition + variables: + IMAGE: fedora + CONFIGURE_ARGS: --disable-rdma --disable-slirp --disable-curl --disable-capstone --disable-live-block-migration --disable-glusterfs --disable-replication --disable-coroutine-pool --disable-smartcard --disable-guest-agent --disable-curses --disable-libxml2 --disable-t= pm --disable-qom-cast-debug --disable-spice --disable-vhost-vsock --disable-vhost-net --disable-vhost-crypto --disable-vhost-user - --target-list=3D"i386-softmmu ppc64-softmmu mips64-softmmu i386-linu= x-user" - - make -j"$JOBS" - - make -j"$JOBS" check-qtest SPEED=3Dslow + TARGETS: i386-softmmu ppc64-softmmu mips64-softmmu i386-linux-user + MAKE_CHECK_ARGS: check-qtest SPEED=3Dslow =20 build-tcg-disabled: - stage: build - image: centos:8 - <<: *before_script_dnf - script: - - dnf install -y clang gtk3-devel libusbx-devel libgcrypt-devel - - mkdir build - - cd build - - ../configure --cc=3Dclang --enable-werror --disable-tcg --audio-drv-lis= t=3D"" - - make -j"$JOBS" - - make check-unit - - make check-qapi-schema - - cd tests/qemu-iotests/ - - ./check -raw 001 002 003 004 005 008 009 010 011 012 021 025 032 033 048 + <<: *native_build_job_definition + variables: + IMAGE: centos8 + script: + - mkdir build + - cd build + - ../configure --disable-tcg --audio-drv-list=3D"" + - make -j"$JOBS" + - make check-unit + - make check-qapi-schema + - cd tests/qemu-iotests/ + - ./check -raw 001 002 003 004 005 008 009 010 011 012 021 025 032 033= 048 052 063 077 086 101 104 106 113 148 150 151 152 157 159 160 163 170 171 183 184 192 194 197 208 215 221 222 226 227 236 253 277 - - ./check -qcow2 028 051 056 057 058 065 067 068 082 085 091 095 096 102 = 122 + - ./check -qcow2 028 051 056 057 058 065 067 068 082 085 091 095 096 1= 02 122 124 132 139 142 144 145 151 152 155 157 165 194 196 197 200 202 208 209 215 216 218 222 227 234 246 247 248 250 254 255 257 258 260 261 262 263 264 270 272 273 277 279 =20 build-user: - stage: build - <<: *before_script_apt - script: - - mkdir build - - cd build - - ../configure --enable-werror --disable-system --disable-guest-agent - --disable-capstone --disable-slirp --disable-fdt - - make -j"$JOBS" - - make run-tcg-tests-i386-linux-user run-tcg-tests-x86_64-linux-user + <<: *native_build_job_definition + variables: + IMAGE: ubuntu2004 + CONFIGURE_ARGS: --disable-system --disable-guest-agent + --disable-capstone --disable-slirp --disable-fdt + MAKE_CHECK_ARGS: run-tcg-tests-i386-linux-user run-tcg-tests-x86_64-l= inux-user =20 build-clang: - stage: build - image: fedora:latest - <<: *before_script_dnf - script: - - yum install -y clang SDL2-devel libattr-devel libcap-ng-devel xfsprogs-= devel - libiscsi-devel libnfs-devel libseccomp-devel gnutls-devel librbd-de= vel - - mkdir build - - cd build - - ../configure --cc=3Dclang --cxx=3Dclang++ --enable-werror - --target-list=3D"alpha-softmmu arm-softmmu m68k-softmmu mips64-softm= mu - ppc-softmmu s390x-softmmu x86_64-softmmu arm-linux-us= er" - - make -j"$JOBS" - - make -j"$JOBS" check + <<: *native_build_job_definition + variables: + IMAGE: fedora + CONFIGURE_ARGS: --cc=3Dclang --cxx=3Dclang++ + TARGETS: alpha-softmmu arm-softmmu m68k-softmmu mips64-softmmu + ppc-softmmu s390x-softmmu x86_64-softmmu arm-linux-user + MAKE_CHECK_ARGS: check =20 build-tci: - stage: build - image: centos:8 - <<: *before_script_dnf - script: - - TARGETS=3D"aarch64 alpha arm hppa m68k microblaze moxie ppc64 s390x x86= _64" - - mkdir build - - cd build - - ../configure --enable-tcg-interpreter - --target-list=3D"$(for tg in $TARGETS; do echo -n ${tg}'-softmmu '; = done)" - - make -j"$JOBS" - - make run-tcg-tests-x86_64-softmmu - - make tests/qtest/boot-serial-test tests/qtest/cdrom-test tests/qtest/px= e-test - - for tg in $TARGETS ; do - export QTEST_QEMU_BINARY=3D"${tg}-softmmu/qemu-system-${tg}" ; - ./tests/qtest/boot-serial-test || exit 1 ; - ./tests/qtest/cdrom-test || exit 1 ; - done - - QTEST_QEMU_BINARY=3D"x86_64-softmmu/qemu-system-x86_64" ./tests/qtest/p= xe-test - - QTEST_QEMU_BINARY=3D"s390x-softmmu/qemu-system-s390x" - ./tests/qtest/pxe-test -m slow + <<: *native_build_job_definition + variables: + IMAGE: fedora + script: + - TARGETS=3D"aarch64 alpha arm hppa m68k microblaze moxie ppc64 s390x = x86_64" + - mkdir build + - cd build + - ../configure --enable-tcg-interpreter + --target-list=3D"$(for tg in $TARGETS; do echo -n ${tg}'-softmmu '= ; done)" + - make -j"$JOBS" + - make run-tcg-tests-x86_64-softmmu + - make tests/qtest/boot-serial-test tests/qtest/cdrom-test tests/qtest= /pxe-test + - for tg in $TARGETS ; do + export QTEST_QEMU_BINARY=3D"${tg}-softmmu/qemu-system-${tg}" ; + ./tests/qtest/boot-serial-test || exit 1 ; + ./tests/qtest/cdrom-test || exit 1 ; + done + - QTEST_QEMU_BINARY=3D"x86_64-softmmu/qemu-system-x86_64" ./tests/qtes= t/pxe-test + - QTEST_QEMU_BINARY=3D"s390x-softmmu/qemu-system-s390x" ./tests/qtest/= pxe-test -m slow --=20 2.20.1 From nobody Mon May 6 20:47:38 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1593195566; cv=none; d=zohomail.com; s=zohoarc; b=K6VqKtgnzmY3ODzloBzkKuN3EE9r2RGxJ/xtfidNS9crx7a0T5TXj/mqjBATFV6hwEzq+eUSKqCMB/j3wFUY5lb1BkktUeLaDV2ktjYNFPty5a679eiaO0+NnfGLnVP3fkQaZVhFaroDyn88qbvjRloGQ5X/AqxQomXU9kodY9g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1593195566; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=WD6VNcX9MpLlUaAe843m6W+P0R0E6C+GHfBa0ZiWKL8=; b=Ts6sYkbxzgRksTU9z/V9fRZ/2FXr3eCXSQpmzKEV44+1P+U4F/YiNImY5McjF14CREn13Gc4w9fU7EhDxAeYwUoerpXRLqkzj5FOjwwAu3k5/q76HHN6IwVktOAyBJ6At9+iRNcNWV+mysjHHICyys2Hm8L4VHcm1Aea6KyvFrI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1593195566539689.1971911594219; Fri, 26 Jun 2020 11:19:26 -0700 (PDT) Received: from localhost ([::1]:57408 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1joswf-0006Xp-5E for importer@patchew.org; Fri, 26 Jun 2020 14:19:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56246) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1josrw-0007aW-1Q for qemu-devel@nongnu.org; Fri, 26 Jun 2020 14:14:32 -0400 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]:45990) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1josro-0001KV-1Y for qemu-devel@nongnu.org; Fri, 26 Jun 2020 14:14:31 -0400 Received: by mail-wr1-x443.google.com with SMTP id s10so10319519wrw.12 for ; Fri, 26 Jun 2020 11:14:22 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id h203sm18620032wme.37.2020.06.26.11.14.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jun 2020 11:14:13 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 477A51FFA9; Fri, 26 Jun 2020 19:14:02 +0100 (BST) 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=WD6VNcX9MpLlUaAe843m6W+P0R0E6C+GHfBa0ZiWKL8=; b=sB4t23C63XFYudmFGw/QAueZ3O0JxTTy+p5jQ68zcbTOMcxUZwvODcb7zSsWSRI7wB gLG06zrhvS3YxOoYDK2N6IzL7zdMHPDxW6A+FLz/eTU4dDbnTtzx3zzO41tlcXVtSNi8 GdtZ3zuFX3wMGQTpQPuzsJkSjsH5JCok71xYWtMUR7lnxGOgeHqIQKl9xIaz3cnGlWF/ 0Hquo9H3rsHZcYbZGnNHlTxeEXl6Vhjh1UaQ84xsarPdA+T4yxr2N98sHA6J6fQ92td3 O7LMqbe83QSULUp2vkFKh2cXjW3Jlb2y/HezgwWZLBDq73+IJfvQ1rOr5FQHh9pMrZM4 YP7g== 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=WD6VNcX9MpLlUaAe843m6W+P0R0E6C+GHfBa0ZiWKL8=; b=jK3XtE1YODvTyYfWzr5j2VnsNJ8zG9mNO8VxOyjIIOWGGLoD1zVNiYyNODrtGn1o5Q kYUDHTw/tBOVcQfVAKyaQeMP5GSbxZyu+0svZfjZnb417uZKGRb+wKV1Nmw+ct1yiIQi 7iOZK/C1oubie2TaPZuOEQuO+58J3oDj0LDJrFR7cB0eXT+6MRmxCL6Lb1h5MG71l2Db Jl5PcICvYSEyfIyoJ6fKlSqXRjTYJvAP6h3LkLStEDksnvj3zR2ZLe9/4oyPxhXN0wtP UMAi0VOmr3YoNgC2bFHZo1m2wOyncNlCEVV/FchVWOaqujsIRNfdsaX/6jkiBGCPKHRA LOTg== X-Gm-Message-State: AOAM531j1b9NDuh8b7wLVagZrJPR2DEO4AEjcMQuVdImuDDdBgnE0bia YBRNnPmBri5uFzUOuUlrDx+lmw== X-Google-Smtp-Source: ABdhPJztmzHduPFZwXOfBacTsjNrmux0rlLpLNcyH+vBz0Kpo/dHCUEcp7jJywS1qs1DfsRcN/fxMA== X-Received: by 2002:adf:e850:: with SMTP id d16mr5223297wrn.426.1593195261491; Fri, 26 Jun 2020 11:14:21 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v3 21/30] gitlab: build containers with buildkit and metadata Date: Fri, 26 Jun 2020 19:13:48 +0100 Message-Id: <20200626181357.26211-22-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200626181357.26211-1-alex.bennee@linaro.org> References: <20200626181357.26211-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::443; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x443.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: fam@euphon.net, berrange@redhat.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, cota@braap.org, aurelien@aurel32.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) According to the documentation to be able to use --cache-from for remote registries you need to enable both buildkit and inline the metadata. We want to do this to support pulling from gitlab when users build their local docker images. Signed-off-by: Alex Benn=C3=A9e --- .gitlab-ci.d/containers.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.d/containers.yml b/.gitlab-ci.d/containers.yml index 580439647ef..ba9c24e98f1 100644 --- a/.gitlab-ci.d/containers.yml +++ b/.gitlab-ci.d/containers.yml @@ -13,7 +13,9 @@ script: - docker pull "$TAG" || docker pull "$COMMON_TAG" || true - sed -i -e "s,FROM qemu/,FROM $CI_REGISTRY_IMAGE/qemu/," tests/docker= /dockerfiles/$NAME.docker - - docker build --cache-from "$TAG" --cache-from "$COMMON_TAG" --tag "$= TAG" -f "tests/docker/dockerfiles/$NAME.docker" tests/docker/dockerfiles + - DOCKER_BUILDKIT=3D1 docker build --cache-from "$TAG" --cache-from "$= COMMON_TAG" --tag "$TAG" + --build-arg BUILDKIT_INLINE_CACHE=3D1 + -f "tests/docker/dockerfiles/$NAME.do= cker" tests/docker/dockerfiles - docker push "$TAG" after_script: - docker logout --=20 2.20.1 From nobody Mon May 6 20:47:38 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1593195989; cv=none; d=zohomail.com; s=zohoarc; b=ezdFPyWT0q4MfLTZOi0WX8+aRkdUI+vS+QHHrvVTYKu2sWE59sqC2HtFZ0rVFM2VC2XfVU/cfVHw51Gmp4zpVSVfVbARG/yK9ucAYoqCRcRXK3ees0YQ7BHgzioDgC4T4kqBsBODJIOb6kj1Z0F7u2Tgp6Gi04IVgcYff5OfzFI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1593195989; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=wmP5rJyYoOCoZ0LFVlYt2bUhEVWWIR3nI4aOboxhEsg=; b=YIrMNULL9YPJk0kUVGdbYvZqncilC4qjEd6qcHoq3GjSmqlU5VVY1+89/Kf5IAfrVBzkDiQRWViqVE0Jp8QEiAEewlMdK/ArhjGgH6hpjtYN3kD/ARdgRryUb2+Rcqrgw3KmqNFhsiODS5nNamyETGsCdmbopQZ694AxT1CePMY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1593195989065992.9126122402117; Fri, 26 Jun 2020 11:26:29 -0700 (PDT) Received: from localhost ([::1]:58114 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jot3R-0001Y9-QH for importer@patchew.org; Fri, 26 Jun 2020 14:26:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58434) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jot0J-0003ya-66 for qemu-devel@nongnu.org; Fri, 26 Jun 2020 14:23:11 -0400 Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]:56065) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jot0H-0005At-Ak for qemu-devel@nongnu.org; Fri, 26 Jun 2020 14:23:10 -0400 Received: by mail-wm1-x342.google.com with SMTP id g75so9646049wme.5 for ; Fri, 26 Jun 2020 11:23:08 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id e17sm2311444wrr.88.2020.06.26.11.22.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jun 2020 11:22:59 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 7B26D1FF8C; Fri, 26 Jun 2020 19:14:02 +0100 (BST) 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=wmP5rJyYoOCoZ0LFVlYt2bUhEVWWIR3nI4aOboxhEsg=; b=Cq7GKvjG1iP9m15jaJRRqzkrMyzlGoO9JP9BD9RFFbt1k8sPa3WMGpTLg5vqJ/MDQe x34zGbVeky6/ncqBgBiOf5lXtnm6KPzyGEGy6B11YsVKR4peucryaPgVwjLjAm97R8kg tUbRkypLYOlpKYlnSUm+zr6lnnPGRb1FuNlhtxXdLNnh20K6nZ5hL1fFeKhoWEwBs5Y6 QEMN+8Aa/l2t8tPeqWgWgkBVCvHFqR+ugIUQrI4MNoqQbz0DzhWDw5vRkBiLipku3RWV Yt6UYY019ZqP4Vy2IbzE0Sf+tDo9nWPyKHeYHInYU5d4MUCvEnBQd2A3nEutNqwBJlNC xmAg== 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=wmP5rJyYoOCoZ0LFVlYt2bUhEVWWIR3nI4aOboxhEsg=; b=SHxb0mjI+V3dWD/LgOpqMKLe83onnveTSx6rVGDjCIM6N1dKyvOCcY1MpxE9qCxLRI SF44VzHdKiVujSnwwFuSek69BMSHdE5sEROw3KyizwCPqd4JTJZBVIrFXgu5enBvI1A2 SyTfx/uNZ0KKXI3LbucabvIEw/gqIzhhUH6iYjtIxjfaTZNTMqpWZkOXmqmYlE042pKw XXnw9L/jOUCbXR+4/PEHTj5MCrn809tc1dt4ScuGN2QWiRschG7PGQg2gNL1igj49DaP JucgOp/R/9usGVOmMOIQFeK9X/eunyox1MNuJaWXx/xcardQq3B/8XvKbn0VTM7CpG3p UCtw== X-Gm-Message-State: AOAM533mH0NgYtGIb/Glv+gaUFJvZ/nMEe4Czr9DlrvVIYd0WlT6x9Wk qNEkNgINj5UIXPddd7YQ8v9dZA== X-Google-Smtp-Source: ABdhPJyHSj2zSJ8wI4Usj/VwG+B3hnAbYiue9gA/3FjBGMvMKj5o4dym3GWX3AhWxWK2Fqd5zwgbvg== X-Received: by 2002:a7b:c746:: with SMTP id w6mr5005421wmk.171.1593195787882; Fri, 26 Jun 2020 11:23:07 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v3 22/30] tests/docker: add --registry support to tooling Date: Fri, 26 Jun 2020 19:13:49 +0100 Message-Id: <20200626181357.26211-23-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200626181357.26211-1-alex.bennee@linaro.org> References: <20200626181357.26211-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::342; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x342.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: fam@euphon.net, berrange@redhat.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , cota@braap.org, aurelien@aurel32.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) This allows us to point the tools towards a registry from which they can grab pre-built layers instead of doing everything from scratch each time. To enable this we need to be using the DOCKER_BUILDKIT engine. [AJB: note registry.gitlab.com/stsquad/qemu is for my testing, the final version will see DOCKER_REGISTRY default to registry.gitlab.com/qemu-= project/qemu] Signed-off-by: Alex Benn=C3=A9e --- v2 - add a pull stage to pull images from the registry - enable BUILDKIT and BUILDKIT_INLINE_CACHE - don't invoke BUILDKIT on Travis --- tests/docker/Makefile.include | 3 +++ tests/docker/docker.py | 37 +++++++++++++++++++++++++++++++---- 2 files changed, 36 insertions(+), 4 deletions(-) diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include index 6d6ced1e463..8139e8467d4 100644 --- a/tests/docker/Makefile.include +++ b/tests/docker/Makefile.include @@ -13,6 +13,7 @@ DOCKER_IMAGES :=3D $(sort $(notdir $(basename $(wildcard = $(DOCKER_FILES_DIR)/*.doc DOCKER_TARGETS :=3D $(patsubst %,docker-image-%,$(DOCKER_IMAGES)) # Use a global constant ccache directory to speed up repetitive builds DOCKER_CCACHE_DIR :=3D $$HOME/.cache/qemu-docker-ccache +DOCKER_REGISTRY :=3D $(if $(REGISTRY),$(REGISTRY),registry.gitlab.com/stsq= uad/qemu) =20 DOCKER_TESTS :=3D $(notdir $(shell \ find $(SRC_PATH)/tests/docker/ -name 'test-*' -type f)) @@ -57,6 +58,7 @@ docker-image-%: $(DOCKER_FILES_DIR)/%.docker $(call quiet-command,\ $(DOCKER_SCRIPT) build -t qemu/$* -f $< \ $(if $V,,--quiet) $(if $(NOCACHE),--no-cache) \ + $(if $(DOCKER_REGISTRY),--registry $(DOCKER_REGISTRY)) \ $(if $(NOUSER),,--add-current-user) \ $(if $(EXTRA_FILES),--extra-files $(EXTRA_FILES))\ $(if $(EXECUTABLE),--include-executable=3D$(EXECUTABLE)),\ @@ -213,6 +215,7 @@ endif @echo ' Include extra files in image.' @echo ' ENGINE=3Dauto/docker/podman' @echo ' Specify which container engine to run.' + @echo ' REGISTRY=3Durl Cache builds from registry (default:$(D= OCKER_REGISTRY))' =20 # This rule if for directly running against an arbitrary docker target. # It is called by the expanded docker targets (e.g. make diff --git a/tests/docker/docker.py b/tests/docker/docker.py index cc6f76caa60..a31ac287150 100755 --- a/tests/docker/docker.py +++ b/tests/docker/docker.py @@ -221,6 +221,13 @@ class Docker(object): """ Running Docker commands """ def __init__(self): self._command =3D _guess_engine_command() + + if "docker" in self._command and "TRAVIS" not in os.environ: + os.environ["DOCKER_BUILDKIT"] =3D "1" + self._buildkit =3D True + else: + self._buildkit =3D False + self._instance =3D None atexit.register(self._kill_instances) signal.signal(signal.SIGTERM, self._kill_instances) @@ -289,10 +296,20 @@ class Docker(object): return labels.get("com.qemu.dockerfile-checksum", "") =20 def build_image(self, tag, docker_dir, dockerfile, - quiet=3DTrue, user=3DFalse, argv=3DNone, extra_files_c= ksum=3D[]): + quiet=3DTrue, user=3DFalse, argv=3DNone, registry=3DNo= ne, + extra_files_cksum=3D[]): if argv is None: argv =3D [] =20 + if registry is not None: + dockerfile =3D dockerfile.replace("FROM qemu/", + "FROM %s/qemu/" % + (registry)) + # see if we can fetch a cache copy, may fail... + pull_args =3D ["pull", "%s/%s" % (registry, tag)] + self._do(pull_args, quiet=3Dquiet) + + tmp_df =3D tempfile.NamedTemporaryFile(mode=3D"w+t", encoding=3D'utf-8', dir=3Ddocker_dir, suffix=3D".= docker") @@ -313,8 +330,17 @@ class Docker(object): =20 tmp_df.flush() =20 - self._do_check(["build", "-t", tag, "-f", tmp_df.name] + argv + - [docker_dir], + build_args =3D ["build", "-t", tag, "-f", tmp_df.name] + if self._buildkit: + build_args +=3D ["--build-arg", "BUILDKIT_INLINE_CACHE=3D1"] + + if registry is not None: + cache =3D "%s/%s" % (registry, tag) + build_args +=3D ["--cache-from", cache] + build_args +=3D argv + build_args +=3D [docker_dir] + + self._do_check(build_args, quiet=3Dquiet) =20 def update_image(self, tag, tarball, quiet=3DTrue): @@ -403,6 +429,8 @@ class BuildCommand(SubCommand): parser.add_argument("--add-current-user", "-u", dest=3D"user", action=3D"store_true", help=3D"Add the current user to image's passwd= ") + parser.add_argument("--registry", "-r", + help=3D"cache from docker registry") parser.add_argument("-t", dest=3D"tag", help=3D"Image Tag") parser.add_argument("-f", dest=3D"dockerfile", @@ -458,7 +486,8 @@ class BuildCommand(SubCommand): for k, v in os.environ.items() if k.lower() in FILTERED_ENV_NAMES] dkr.build_image(tag, docker_dir, dockerfile, - quiet=3Dargs.quiet, user=3Dargs.user, argv=3Da= rgv, + quiet=3Dargs.quiet, user=3Dargs.user, + argv=3Dargv, registry=3Dargs.registry, extra_files_cksum=3Dcksum) =20 rmtree(docker_dir) --=20 2.20.1 From nobody Mon May 6 20:47:38 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1593196292; cv=none; d=zohomail.com; s=zohoarc; b=Gy/rYj3wAfD2EgQIr1cb3oiRdkua8fUbcomDxyLpyDBcw53tOzMJkXS08YF9PFYriloiUC45HjJbUiiDNgp3Ii1WBtvMTUp7GrM8gZrpG1HmeIns8eNzOmNVyqARHY6mgxRSy8qQ0/cjNVz31bIKJZTA+wqqTbaw5Wpb2UzJuS4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1593196292; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=ZwuOstmGcuTAVE1dTjCYiOJLUEzogyRARo4KTgzkFM4=; b=ITrarV6sMSa9/qyMB85dMSaeZ/wYN4l3Leeva60UXLuIku3rxM6E1hIyZIQJYYI3VCM+wTWMwKp/rs1dSSJj0MgT6PQ74nOS2G2FNhevoujL1IAiaGiqUPhMpxNc+3q/7SBS84eMKv3i4ifwKet7LAPq0zkVIxfuNtjZgSiVZfE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1593196292932279.43679985887684; Fri, 26 Jun 2020 11:31:32 -0700 (PDT) Received: from localhost ([::1]:48112 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jot8N-0000dM-Hh for importer@patchew.org; Fri, 26 Jun 2020 14:31:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58346) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jot0C-0003hX-Su for qemu-devel@nongnu.org; Fri, 26 Jun 2020 14:23:04 -0400 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]:42292) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jot0B-00056c-1o for qemu-devel@nongnu.org; Fri, 26 Jun 2020 14:23:04 -0400 Received: by mail-wr1-x42a.google.com with SMTP id o11so10368171wrv.9 for ; Fri, 26 Jun 2020 11:23:02 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id v4sm23691721wro.26.2020.06.26.11.22.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jun 2020 11:22:57 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id AA06E1FFAA; Fri, 26 Jun 2020 19:14:02 +0100 (BST) 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=ZwuOstmGcuTAVE1dTjCYiOJLUEzogyRARo4KTgzkFM4=; b=Jy6b2SgygRiD3sXuXzp2DdpHNu+1Le3Rj2MHmuOpCLeZwtMkj434/Q4fINXJ66wv8a dxJZg2/g6L8tNBMR2ztnk5iJwJKx2gPNc+8Frnwh4YY+8G7o85798yAZRcHoRz93nKXB W2GmxoaIiKKvioqPc5Sh720GJQW8BnIryCvrsY4NNKgzhoP3WYY+XNDTLmq38u4bGwS+ Lm9v+2BY0XqM3rAK1cdbl3cg7f49RQEHS7uSPUaT4KIT+8mMk6om5H/D1ffYcKrE1X7x pZaKKChIHAbR5aQ5yhShAWTP2ecR+wFkig+pxFD9LjggqSXzxFtumWAwaMRXQFzQ7VqH bgWg== 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=ZwuOstmGcuTAVE1dTjCYiOJLUEzogyRARo4KTgzkFM4=; b=t2QsV17YsgLfAUnKVyihAg0J1hyLzIr7vZOb3XilHhfQJosGm6KSPYVM70SkeSCF2D Mi9LDeFAICboL8HaqUYN4FLBqW7e5mZn0EhAu3V3ch5NuCE098RDeczmQi6tNKdGTspP B/h2J/Zbtx81dTgWf0zhGfACojNcvJMwBWo6wY5qmPJeVT6X6jf1iEguHnpxwLANUJO5 /pagC0a+xQxpUf+ZBPJyTtMgrFlIa86aVvKZ7nKYGBwBm/IGlS+4BSTYolNTtMmxmVfG E9DM0j5XSudMkvgkvoPuZV9QyMtM5VPOMgz4ZNrzalkxUr5mcV0Wn6jtQwHWng6DR6nO Mwow== X-Gm-Message-State: AOAM531PXliLp8wo9UNzQq1K7UeIlOfMLHX5E9UrkUoMA4wEFvTgA8t8 jNztUERPCyHck5cgE8KMU35/sw== X-Google-Smtp-Source: ABdhPJwmJBwGXwBgFz0x12x5cZJG8iujq0pLmQee9Dil7UOtt/Xih4TCDQRJ1vKE3h5mybAOtVj0cg== X-Received: by 2002:adf:f2c5:: with SMTP id d5mr5195462wrp.96.1593195781484; Fri, 26 Jun 2020 11:23:01 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v3 23/30] tests/docker: add packages needed for check-acceptance Date: Fri, 26 Jun 2020 19:13:50 +0100 Message-Id: <20200626181357.26211-24-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200626181357.26211-1-alex.bennee@linaro.org> References: <20200626181357.26211-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42a; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42a.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: fam@euphon.net, berrange@redhat.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , cota@braap.org, aurelien@aurel32.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) We need additional python packages to run check-acceptance. Add them to the docker images we will be using later. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Thomas Huth --- tests/docker/dockerfiles/fedora.docker | 7 +++++++ tests/docker/dockerfiles/ubuntu2004.docker | 10 +++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/tests/docker/dockerfiles/fedora.docker b/tests/docker/dockerfi= les/fedora.docker index 798ddd2c3e0..70b6186bd3e 100644 --- a/tests/docker/dockerfiles/fedora.docker +++ b/tests/docker/dockerfiles/fedora.docker @@ -80,7 +80,12 @@ ENV PACKAGES \ pixman-devel \ python3 \ python3-PyYAML \ + python3-numpy \ + python3-opencv \ + python3-pillow \ + python3-pip \ python3-sphinx \ + python3-virtualenv \ rdma-core-devel \ SDL2-devel \ snappy-devel \ @@ -89,6 +94,8 @@ ENV PACKAGES \ systemd-devel \ systemtap-sdt-devel \ tar \ + tesseract \ + tesseract-langpack-eng \ texinfo \ usbredir-devel \ virglrenderer-devel \ diff --git a/tests/docker/dockerfiles/ubuntu2004.docker b/tests/docker/dock= erfiles/ubuntu2004.docker index 6050ce7e8a8..f7aac840bf8 100644 --- a/tests/docker/dockerfiles/ubuntu2004.docker +++ b/tests/docker/dockerfiles/ubuntu2004.docker @@ -46,9 +46,17 @@ ENV PACKAGES flex bison \ libxen-dev \ libzstd-dev \ make \ - python3-yaml \ + python3-numpy \ + python3-opencv \ + python3-pil \ + python3-pip \ python3-sphinx \ + python3-venv \ + python3-yaml \ + rpm2cpio \ sparse \ + tesseract-ocr \ + tesseract-ocr-eng \ texinfo \ xfslibs-dev\ vim --=20 2.20.1 From nobody Mon May 6 20:47:38 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1593196065; cv=none; d=zohomail.com; s=zohoarc; b=KyL7NngtTVIuhOk8nMcxwyVr5e7EOoPSVMA1soO7MLkiAK+iAtyfbqJD1IBO3Wv0gS353C7Bj3D/6OjVIYUL7zJgR5nfSP+SbCp46HPo4O452H6TW/oVkPqte34xa5WfN+WUVap2HTnjOgGNUE7WGjnpq/FCyt0WNWfs3+TU9LY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1593196065; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=8+ywLSq/cpQR9jk1x4FDeODnKkLS2LjIS17ZB0FsQ2E=; b=bnc3TI/0W3WFS29CJinn9AmNTDHkhr+hZGvoNvhhalNnSTf5NbY0dY3Vgfs+O3ktTJ+0U/jZDinG+ey+eeVPWKlJPmHiiMPkYzVQS+YUydiWECYXTpspPfv3kqq3JuaGadClOxYb6Fttmj6vNn34UGv2OdyaRumljLouZ1gFDVQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1593196065447829.9536038850869; Fri, 26 Jun 2020 11:27:45 -0700 (PDT) Received: from localhost ([::1]:34890 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jot4i-0003cQ-7C for importer@patchew.org; Fri, 26 Jun 2020 14:27:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58398) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jot0G-0003rI-LN for qemu-devel@nongnu.org; Fri, 26 Jun 2020 14:23:08 -0400 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]:34635) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jot0E-00058K-JQ for qemu-devel@nongnu.org; Fri, 26 Jun 2020 14:23:08 -0400 Received: by mail-wr1-x434.google.com with SMTP id f7so7385006wrw.1 for ; Fri, 26 Jun 2020 11:23:06 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id 11sm18436613wmg.41.2020.06.26.11.22.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jun 2020 11:22:57 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id E3C381FFAB; Fri, 26 Jun 2020 19:14:02 +0100 (BST) 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=8+ywLSq/cpQR9jk1x4FDeODnKkLS2LjIS17ZB0FsQ2E=; b=t2VuEGbPaVY2reVVq1TouABum0h/TkvNxEmYOmFMPu6EqOygHm0DfKVYcEsACMkk5e OLz+p1yxJVimcULfYgCMU/ac3a1IftHMuZSLZY5rJGSEJIBh3hRkdtXZvbj5At3qe3iS WSg+QUOlMNQ03meX2oqUIdrODWd0fvlN057PKexc2/v9a8gQuSN6NM0RVMXj+65u6unZ uujj36fyCdpp4cAXjCcd2baOCPwieNS6dJt4KMU2Wyhh8TKrmRaGUBcXbvjbxHvfHqua rw/711UqyQJSSN7i3E0qQqJLDXax6WtJD1LXq9MN9NT6lIwmlpgC5pOkTlUHrkDeTF28 kivA== 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=8+ywLSq/cpQR9jk1x4FDeODnKkLS2LjIS17ZB0FsQ2E=; b=ZfwMHwOfKqHfhV+n51MaMGBGO9kFqeuBQDudS25RFTxZPhMyRm5s1blrjhoH1v7Fa1 DP5CWzfrE6p+6UqUXJ3GRJHmo3NX2D+KxjCpjb8rS30MgYph7npoTIcFSRwNNp+GyLT6 3ywoMSPdEZkiuv1NzakfWRlUFD7OSlrDsbjinIo9tXbdecPoAgZn8dI9EFWOL57FaFYF 3bm2rVKCD+NYiYRVHN59IYj99Qhnrh5pik4ONNh2UMNonCzajzBwTSUaqnlRJTwA0/A9 b/aQ067CAmsEd7FTdAS7jqwgx9WJLBwUDuQ8jZ9JhuaUiYsuf5o6yLDGDYR/XAhIBMSu cpgQ== X-Gm-Message-State: AOAM531XLgtcoaTSIwypQ0UBB9x5mdOPZBjSxWXWU3cGN5ZODwTMHX5e 60J4JsepjqevNuhdMFYX9DTp3Q== X-Google-Smtp-Source: ABdhPJx15jdfgtME4nsEudWIAGeIPo+KeJ5rwWH0LMMH51+e4hcuu8/8+USt0/BBkRHSxLFBcxdcrw== X-Received: by 2002:adf:82f5:: with SMTP id 108mr5009572wrc.218.1593195785203; Fri, 26 Jun 2020 11:23:05 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v3 24/30] gitlab: add acceptance testing to system builds Date: Fri, 26 Jun 2020 19:13:51 +0100 Message-Id: <20200626181357.26211-25-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200626181357.26211-1-alex.bennee@linaro.org> References: <20200626181357.26211-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x434.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: fam@euphon.net, Thomas Huth , berrange@redhat.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, Wainer dos Santos Moschetta , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , cota@braap.org, aurelien@aurel32.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) As part of migrating things from Travis to GitLab add the acceptance tests. To do this: - rename system1 to system-ubuntu-main - rename system2 to system-fedora-misc - split into build/check/acceptance - remove -j from check stages - use artifacts to save build stage - add post acceptance template and use Signed-off-by: Alex Benn=C3=A9e Message-Id: <20200622143204.12921-16-alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- v2 - updated with danp's docker changes - use needs instead of dependancies - touch all the build files to prevent rebuild --- .gitlab-ci.yml | 66 +++++++++++++++++++++++++++++++++++++++++++++++--- .travis.yml | 23 ------------------ 2 files changed, 63 insertions(+), 26 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a7abc55a5c6..5ae8130bd1a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,8 +1,12 @@ +# Currently we have two build stages after our containers are built: +# - build (for traditional build and test or first stage build) +# - test (for test stages, using build artefacts from a build stage) stages: - containers - containers-layer2 - containers-layer3 - build + - test =20 include: - local: '/.gitlab-ci.d/edk2.yml' @@ -24,26 +28,82 @@ include: ../configure --enable-werror $CONFIGURE_ARGS ; fi - make -j"$JOBS" - - make -j"$JOBS" $MAKE_CHECK_ARGS + - if test -n "$MAKE_CHECK_ARGS"; + then + make $MAKE_CHECK_ARGS ; + fi + +.native_test_job_template: &native_test_job_definition + stage: test + image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:latest + script: + - cd build + - find . -type f -exec touch {} + + - make $MAKE_CHECK_ARGS + +.post_acceptance_template: &post_acceptance + after_script: + - python3 -c 'import json; r =3D json.load(open("tests/results/latest/= results.json")); [print(t["logfile"]) for t in r["tests"] if t["status"] no= t in ("PASS", "SKIP")]' | xargs cat + - du -chs $HOME/avocado/data/cache =20 -build-system1: +build:system-ubuntu-main: <<: *native_build_job_definition variables: IMAGE: ubuntu2004 TARGETS: aarch64-softmmu alpha-softmmu cris-softmmu hppa-softmmu lm32-= softmmu moxie-softmmu microblazeel-softmmu mips64el-softmmu m68k-softmmu ppc= -softmmu riscv64-softmmu sparc-softmmu + artifacts: + paths: + - build + +check:system-ubuntu-main: + <<: *native_test_job_definition + needs: + - job: build:system-ubuntu-main + artifacts: true + variables: + IMAGE: ubuntu2004 MAKE_CHECK_ARGS: check =20 -build-system2: +acceptance:system-ubuntu-main: + <<: *native_test_job_definition + needs: + - job: build:system-ubuntu-main + artifacts: true + variables: + IMAGE: ubuntu2004 + MAKE_CHECK_ARGS: check-acceptance + +build:system-fedora-alt: <<: *native_build_job_definition variables: IMAGE: fedora TARGETS: tricore-softmmu unicore32-softmmu microblaze-softmmu mips-sof= tmmu riscv32-softmmu s390x-softmmu sh4-softmmu sparc64-softmmu x86_64-sof= tmmu xtensa-softmmu nios2-softmmu or1k-softmmu + artifacts: + paths: + - build + +check:system-fedora-alt: + <<: *native_test_job_definition + needs: + - job: build:system-fedora-alt + artifacts: true + variables: + IMAGE: fedora MAKE_CHECK_ARGS: check =20 +check:system-fedora-alt: + <<: *native_test_job_definition + needs: + - job: build:system-fedora-alt + artifacts: true + variables: + IMAGE: fedora + MAKE_CHECK_ARGS: check-acceptance + build-disabled: <<: *native_build_job_definition variables: diff --git a/.travis.yml b/.travis.yml index 74158f741b1..c24dfbe377f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -289,29 +289,6 @@ jobs: python: 3.6 =20 =20 - # Acceptance (Functional) tests - - name: "GCC check-acceptance" - dist: bionic - env: - - CONFIG=3D"--enable-tools --target-list=3Daarch64-softmmu,alpha-s= oftmmu,arm-softmmu,m68k-softmmu,microblaze-softmmu,mips-softmmu,mips64el-so= ftmmu,nios2-softmmu,or1k-softmmu,ppc-softmmu,ppc64-softmmu,s390x-softmmu,sh= 4-softmmu,sparc-softmmu,x86_64-softmmu,xtensa-softmmu" - - TEST_CMD=3D"make check-acceptance" - - CACHE_NAME=3D"${TRAVIS_BRANCH}-linux-gcc-acceptance" - after_script: - - python3 -c 'import json; r =3D json.load(open("tests/results/lat= est/results.json")); [print(t["logfile"]) for t in r["tests"] if t["status"= ] not in ("PASS", "SKIP")]' | xargs cat - - du -chs $HOME/avocado/data/cache - addons: - apt: - packages: - - python3-pil - - python3-pip - - python3-numpy - - python3-opencv - - python3-venv - - rpm2cpio - - tesseract-ocr - - tesseract-ocr-eng - - # Using newer GCC with sanitizers - name: "GCC9 with sanitizers (softmmu)" addons: --=20 2.20.1 From nobody Mon May 6 20:47:38 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1593196397; cv=none; d=zohomail.com; s=zohoarc; b=Goi7RCq3E3e7+/q6aeUnNg0mK2py6tOfXgrl51tM6DjTrS11bYN0HGCLbcCDHqlBPXAmg2japtHfn2j5gMbCLLu7QspQVlagBp1Ay56vWI7ccWEor1IDae4bu/Dr745kzUT0H0MzVY58lk1s0q2RZEXEwLor6RKcGIxotyrhWiY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1593196397; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=GGghav/BtSCa7AI7P4AufN/sAMwmqjG67Lv4jNv44bc=; b=lYx0W+Zb04KhHqmZ0iyLvJ25P0q5SId1F5EYhX0IRtezbrv9gvvObsGyUcGDo2GB4NYN22Id9lfGGiW1quuSt1no7zzwRbX9ru7EGWb8Qcgjed5YEODmAenghvF9RZ2LJ4FXnu8Jj3r3LmGcOV+xirnCrszwKRySFjNOAB/LGRo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1593196397273277.7771914463385; Fri, 26 Jun 2020 11:33:17 -0700 (PDT) Received: from localhost ([::1]:54074 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jotA4-00032q-2e for importer@patchew.org; Fri, 26 Jun 2020 14:33:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58448) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jot0K-00042j-Lh for qemu-devel@nongnu.org; Fri, 26 Jun 2020 14:23:12 -0400 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]:39580) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jot0I-0005B9-T2 for qemu-devel@nongnu.org; Fri, 26 Jun 2020 14:23:12 -0400 Received: by mail-wr1-x442.google.com with SMTP id q5so10367650wru.6 for ; Fri, 26 Jun 2020 11:23:10 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id a81sm18496986wmf.30.2020.06.26.11.22.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jun 2020 11:23:05 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 2ED451FFAC; Fri, 26 Jun 2020 19:14:03 +0100 (BST) 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=GGghav/BtSCa7AI7P4AufN/sAMwmqjG67Lv4jNv44bc=; b=BySoWsPujD97s8bXQMy3JWQVW+XKHDZuN+0NPrP+f/yP8CRUBPelNVpQKgJ51T2M5v BINpS1aKzArbf2u8RI0U8IvhINBuL83ORgBtZKVqjZ311B6/iZOlb+8r/lswGZNru4pK RnnamZZyO5pltCzJ8Hel6XilFdIEgqjvQ3qzJbMfmiJTw2rVy2AcVP5Cux0R1Wb3px/S zCVDbWRQAfGQUn0D6EYRAB3LbKLwVI0nuYY10twdav7rWu2qSzo70XAKFS6+HGAe15Us wIPdRjYQ7cr8zfrBbV/rm1gCHvkUTEZdsazefPFtFn9SvcVZJMyo6Ag0qDuiq11bz3nP GgEg== 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=GGghav/BtSCa7AI7P4AufN/sAMwmqjG67Lv4jNv44bc=; b=sGpMNKRMmE0lQxSb6ivGAmpigHx61Y/rK+EHX9aW2c+UQ73euHudjaCa4W+KiXr3+s 103uIEzuxBfem0Y1BIpZqDh6AVHoVd6XInXKeEUtBaOi8PsGGSnv4mDQLTw/Qlh+CwNW feFVM289dfDfVLyfnlQQAXjat6DHvvMODD7kGqwQZy7QJbdkI70k2gBGaf9UqNKUkaL7 H79G7czbK73JnF0Kmj0fDKknsPlAMLM00qnPBKKn45t+xiKVI0JZ8ym0wh6A5vanQeO7 QnExtkOZUnsi6Yj7scHNuxZpIHZ25xQJJxx8tRPfX6X6DCqcuvufywQ7DP3L2/a+Bxo0 hAyQ== X-Gm-Message-State: AOAM532pKCv3QY/phWqq3/UqeXPoAjeSSccIiQziTBxkOOP7qB72QrZ6 npLwjQDENhC6PhrGObcUM9WpCA== X-Google-Smtp-Source: ABdhPJxo6mQQQ5Z3OOcNiST4r3jAiz3xjRmqnR8KPXbivwS0RlX9QyFoPtp6hYHKrGBkyH/+zztvFA== X-Received: by 2002:adf:e908:: with SMTP id f8mr4956493wrm.3.1593195789624; Fri, 26 Jun 2020 11:23:09 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v3 25/30] tests/docker: add a linux-user testing focused image Date: Fri, 26 Jun 2020 19:13:52 +0100 Message-Id: <20200626181357.26211-26-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200626181357.26211-1-alex.bennee@linaro.org> References: <20200626181357.26211-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::442; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x442.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: fam@euphon.net, berrange@redhat.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , cota@braap.org, aurelien@aurel32.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) We happily use all the cross images for both cross-building QEMU as well as building the linux-user tests. However calling docker from within docker seems not to work. As we can build in Debian anyway why not include an image that has all the compilers available for non-docker invocation. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- .gitlab-ci.d/containers.yml | 7 +++ tests/docker/Makefile.include | 1 + .../dockerfiles/debian-all-test-cross.docker | 53 +++++++++++++++++++ 3 files changed, 61 insertions(+) create mode 100644 tests/docker/dockerfiles/debian-all-test-cross.docker diff --git a/.gitlab-ci.d/containers.yml b/.gitlab-ci.d/containers.yml index ba9c24e98f1..20b2fb1de5d 100644 --- a/.gitlab-ci.d/containers.yml +++ b/.gitlab-ci.d/containers.yml @@ -66,6 +66,13 @@ amd64-debian-cross-container: variables: NAME: debian-amd64-cross =20 +amd64-debian-user-cross-container: + <<: *container_job_definition + stage: containers-layer2 + needs: ['amd64-debian10-container'] + variables: + NAME: debian-all-test-cross + amd64-debian-container: <<: *container_job_definition stage: containers-layer2 diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include index 8139e8467d4..079ceb6ff33 100644 --- a/tests/docker/Makefile.include +++ b/tests/docker/Makefile.include @@ -133,6 +133,7 @@ docker-image-travis: NOUSER=3D1 =20 # Specialist build images, sometimes very limited tools docker-image-debian-tricore-cross: docker-image-debian9 +docker-image-debian-all-test-cross: docker-image-debian10 docker-image-debian-arm64-test-cross: docker-image-debian11 =20 # These images may be good enough for building tests but not for test buil= ds diff --git a/tests/docker/dockerfiles/debian-all-test-cross.docker b/tests/= docker/dockerfiles/debian-all-test-cross.docker new file mode 100644 index 00000000000..dedcea58b46 --- /dev/null +++ b/tests/docker/dockerfiles/debian-all-test-cross.docker @@ -0,0 +1,53 @@ +# +# Docker all cross-compiler target (tests only) +# +# While the normal cross builds take care to setup proper multiarch +# build environments which can cross build QEMU this just installs the +# basic compilers for as many targets as possible. We shall use this +# to build and run linux-user tests on GitLab +# +FROM qemu/debian10 + +# What we need to build QEMU itself +RUN apt update && \ + DEBIAN_FRONTEND=3Dnoninteractive eatmydata \ + apt build-dep -yy qemu + +# Add the foreign architecture we want and install dependencies +RUN DEBIAN_FRONTEND=3Dnoninteractive eatmydata \ + apt install -y --no-install-recommends \ + gcc-aarch64-linux-gnu \ + libc6-dev-arm64-cross \ + gcc-alpha-linux-gnu \ + libc6.1-dev-alpha-cross \ + gcc-arm-linux-gnueabihf \ + libc6-dev-armhf-cross \ + gcc-hppa-linux-gnu \ + libc6-dev-hppa-cross \ + gcc-m68k-linux-gnu \ + libc6-dev-m68k-cross \ + gcc-mips-linux-gnu \ + libc6-dev-mips-cross \ + gcc-mips64-linux-gnuabi64 \ + libc6-dev-mips64-cross \ + gcc-mips64el-linux-gnuabi64 \ + libc6-dev-mips64el-cross \ + gcc-mipsel-linux-gnu \ + libc6-dev-mipsel-cross \ + gcc-powerpc-linux-gnu \ + libc6-dev-powerpc-cross \ + gcc-powerpc64-linux-gnu \ + libc6-dev-ppc64-cross \ + gcc-powerpc64le-linux-gnu \ + libc6-dev-ppc64el-cross \ + gcc-riscv64-linux-gnu \ + libc6-dev-riscv64-cross \ + gcc-s390x-linux-gnu \ + libc6-dev-s390x-cross \ + gcc-sh4-linux-gnu \ + libc6-dev-sh4-cross \ + gcc-sparc64-linux-gnu \ + libc6-dev-sparc64-cross + +ENV QEMU_CONFIGURE_OPTS --disable-system --disable-docs --disable-tools +ENV DEF_TARGET_LIST aarch64-linux-user,alpha-linux-user,arm-linux-user,hpp= a-linux-user,i386-linux-user,m68k-linux-user,mips-linux-user,mips64-linux-u= ser,mips64el-linux-user,mipsel-linux-user,ppc-linux-user,ppc64-linux-user,p= pc64le-linux-user,riscv64-linux-user,s390x-linux-user,sh4-linux-user,sparc6= 4-linux-user --=20 2.20.1 From nobody Mon May 6 20:47:38 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1593196138; cv=none; d=zohomail.com; s=zohoarc; b=c+IYU8e9TMAASYHOYj9qTJXhyzKPRq4rEnuyNugymblsOAzQl3NxpeNbpchHYCLzMY6/ERH64CmGGvwp/HPtdP6hb6l2f2ko3tiuOB28UL2SgEL/yIF1x1YTNN3CRMUUk/Am87fLq2sIRO9Q2GB77mZ57ZNG238b49j2czHJbUo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1593196138; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=/rK0Sms5MapCn5tnpSN1o9DxY3jR2MXQyjMdJcVhwfU=; b=VsrGBQG3KF6flk32L5cD5e2StNqf8/GK9WpqljzOpi1ydBo9rCdOT+tgPT6FeDsspKvX5OsXdHFN3bl+o0f4vMQVmE5egSjanZfqHCjij3zWGSYkcHQOLqx3N9I5NBjGi7yqKPK7LWc7yCf9+a6i9M1HKkHJ8ZlppThyLTeaUDc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1593196138799224.031328923655; Fri, 26 Jun 2020 11:28:58 -0700 (PDT) Received: from localhost ([::1]:39148 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jot5r-0005Jy-Gw for importer@patchew.org; Fri, 26 Jun 2020 14:28:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58290) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jot08-0003WR-7P for qemu-devel@nongnu.org; Fri, 26 Jun 2020 14:23:00 -0400 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]:34183) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jot06-00052D-Jh for qemu-devel@nongnu.org; Fri, 26 Jun 2020 14:22:59 -0400 Received: by mail-wr1-x442.google.com with SMTP id f7so7384678wrw.1 for ; Fri, 26 Jun 2020 11:22:58 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id 14sm17823377wmk.19.2020.06.26.11.22.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jun 2020 11:22:53 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 56F551FFAE; Fri, 26 Jun 2020 19:14:03 +0100 (BST) 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=/rK0Sms5MapCn5tnpSN1o9DxY3jR2MXQyjMdJcVhwfU=; b=boXIJc9W7CwmZkyFXNg1XQfbfSOzTIxKVQMBHFjkWZe6z3Ue4vs80QjuJ8GcC8N/Y3 rVh4P1+wyZCDapbiRoVMkb6ltxXLtG810trz6wmTK09siTrG3s9LAUnX8LlD8PFGp4Eo VsoWFgvpduQyGRp7cMtXyq0pnBINXcLova+DTjyI8OucjrtY40UeJxfJXxfndUFeqZI7 c6xbST5lapx37onPgD+ZlJVLuPqQOU05ZRfpqrJ8r+vU1O9SfWIwrxeUJ6ecU5HIejXG 11SxHJWQIzoSPoBpdR6I7svpTEeDzuCQ1aMIxiHGVOK9PP2LfTThxx+IyBg9jwYtevv8 +rTw== 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=/rK0Sms5MapCn5tnpSN1o9DxY3jR2MXQyjMdJcVhwfU=; b=rQFjZzKQ/R46dUEIWamj8UyBu6vxD87rn80POH5fQwnc7zrGtr9COj4pDdTykK2ovn 6ffEopcT79L502MGwMbvY/K4vbzvGAqlILK6iJnhJljVreyQhNqBrnO6qGY6tjueNXUR sXOTtPf3n3119foPZhAaWPMAXTIDdT8iaWup0yr+3HbBl8Kvg9d5E1O8XlraxXooc4NE 7UIkKx7YU//ibOUG26dS2sLyUwBLyzEoDPcTzihcqCw05Nld8hKjTJRijsZzIZRlO0Sm fzO2XDTQxDMMtezW6bBiFWUbX8gE97COu/SQPue95e68McCXIzA0dRP5r5FwKzM2sPKp 88FQ== X-Gm-Message-State: AOAM531Wd2R8f3+D5D1dqPrruqcre1szJTSbXlpRaQQirVPLqRLjzrKn UbpU5HECUWOiDZk8vYEvJSJSoA== X-Google-Smtp-Source: ABdhPJyNzOa1s4PYUPAkq+oZ3KTyqWbVik413SsrnBTX3dCqc3Lp4+4iR3p36MSWnTmBhYb5RFzn1w== X-Received: by 2002:adf:de01:: with SMTP id b1mr4897537wrm.305.1593195777236; Fri, 26 Jun 2020 11:22:57 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v3 26/30] gitlab: enable check-tcg for linux-user tests Date: Fri, 26 Jun 2020 19:13:53 +0100 Message-Id: <20200626181357.26211-27-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200626181357.26211-1-alex.bennee@linaro.org> References: <20200626181357.26211-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::442; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x442.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: fam@euphon.net, Thomas Huth , berrange@redhat.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, Wainer dos Santos Moschetta , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , cota@braap.org, aurelien@aurel32.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Switch to building in the new debian-all-test-cross image which has most of the cross compilers inline. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Thomas Huth --- .gitlab-ci.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5ae8130bd1a..17c3349dd9e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -140,10 +140,9 @@ build-tcg-disabled: build-user: <<: *native_build_job_definition variables: - IMAGE: ubuntu2004 - CONFIGURE_ARGS: --disable-system --disable-guest-agent - --disable-capstone --disable-slirp --disable-fdt - MAKE_CHECK_ARGS: run-tcg-tests-i386-linux-user run-tcg-tests-x86_64-l= inux-user + IMAGE: debian-all-test-cross + CONFIGURE_ARGS: --disable-tools --disable-system + MAKE_CHECK_ARGS: check-tcg =20 build-clang: <<: *native_build_job_definition --=20 2.20.1 From nobody Mon May 6 20:47:38 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1593196160; cv=none; d=zohomail.com; s=zohoarc; b=c+gTaI5aba4hNLUZT2UPeyJnrwzRE0NEJKph1tpsgatstbBsjBz3DYslXdvxK1kMUi88YE0OUiN3utM0WTsShbxu+XFri5Qskamd6+0i5QFeDC7a86edfsEcvOJYXsgiTSOsWnSZ1lU9TGsPuGwY+x+1FKfwxbrRl+A9CGxnpeA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1593196160; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=yj24Wzj4vkjm2AUHX/QFJODVj3pT/AuxBZvUIsPK3rA=; b=geXUr0DFHDBn2B1U4aJ/CofoIg+QkKpHmtP8vvSDHY4H49XFs9X1z+HvncIqzB10l5IBZoBpQ9wtDN+VK5/Ch0n6ns4GzChf/vDR03btLqTwe0uTZsdBgOwUlzPVphLxFLsxYp/E6p3McjmYvWlyqYifUCnUCyBH/BorgbEniL4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1593196160647100.06544738877062; Fri, 26 Jun 2020 11:29:20 -0700 (PDT) Received: from localhost ([::1]:41198 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jot6F-0006B2-DF for importer@patchew.org; Fri, 26 Jun 2020 14:29:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58418) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jot0H-0003uL-Lv for qemu-devel@nongnu.org; Fri, 26 Jun 2020 14:23:09 -0400 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]:43805) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jot0G-0005Ae-3j for qemu-devel@nongnu.org; Fri, 26 Jun 2020 14:23:09 -0400 Received: by mail-wr1-x430.google.com with SMTP id j4so7923106wrp.10 for ; Fri, 26 Jun 2020 11:23:07 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id 65sm18894760wma.48.2020.06.26.11.22.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jun 2020 11:22:59 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 7D1F91FFAF; Fri, 26 Jun 2020 19:14:03 +0100 (BST) 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=yj24Wzj4vkjm2AUHX/QFJODVj3pT/AuxBZvUIsPK3rA=; b=X3gWdjH8+1B3v90sEFF8ZAs7dLb+0eheYORittm3YCnHTCAPkbZrGYP689LAcXPIcv olo4zbWLrKvZf5CSal25I1MaBms99ISXWbwum+3Wp28B/6FGXd5OBuMjGd3Jpa6cfdwH D1IXWShlK4EydjWVR0EK3hsxUyGeMguEiBanFj5Vhu9ipwUjoM+S9nW5uSXD5XNKd8rd Gim5W6O41vblXSiMtbn+ywbP8e5gQ2aZX+R89BMvMgEn+INnGlbIhmhnuyb7Vp/ipXB5 yUy0FB4SvdRVEI6QoeqsfGj4nLKkaSl2y6ChiJi9LID22LRNEaq5JzbjmRFUQGHQt7bL jg7g== 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=yj24Wzj4vkjm2AUHX/QFJODVj3pT/AuxBZvUIsPK3rA=; b=FDabMTvrXzgFtGgRWJ4OERSBeW5R/gK+9cWsMF5eMg2aTl6+/vW4I7nWnTIXnY8Nrg lqBPBgDZXNGhOjvMxaz3j+jrhc5bjdreMihJOGppbbWSBJgDXPFp7z5PI99jSmR/1iUO VDQhtqa5QQ7BQISBD1F7+DUu5ZaG+kgDaTrD5FO8L+g3uX2259n9lhe6vI6j9OPl8Xyb zcuMmSQleiFptW5KRzZkBtW+2UWg22c8dGqTkqaBzOx2A8gTm2/3aK3Ed6xoog4xAzoU tyDiW4OqV9TYaeUSrfK0jpP5cU/dzuT3JsvEfPCrgLpIH4DmoR3dIQ/m/dN+3jTZqmni 1h8A== X-Gm-Message-State: AOAM533fvxyOh8AXEKT7Nl2Ry2BkIqYhYxy1wLAMnBxd2/Jur+7GdA10 bZyn65pQ8i9cNxU1TSBeiVYz5A== X-Google-Smtp-Source: ABdhPJzuKzr+e8QlT87GmxTbvScbbPlxAvskG2R7KQlipEbBT42aE3GSrSKX4prYCa8Lm053lNgIJw== X-Received: by 2002:a5d:6045:: with SMTP id j5mr4936219wrt.209.1593195786722; Fri, 26 Jun 2020 11:23:06 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v3 27/30] gitlab: add avocado asset caching Date: Fri, 26 Jun 2020 19:13:54 +0100 Message-Id: <20200626181357.26211-28-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200626181357.26211-1-alex.bennee@linaro.org> References: <20200626181357.26211-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x430.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: fam@euphon.net, Thomas Huth , berrange@redhat.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, Wainer dos Santos Moschetta , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , cota@braap.org, aurelien@aurel32.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) These can be quite big so lets cache them. I couldn't find any nots on ccache in the gitlab docs so I've just ignored it for now. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20200622143204.12921-19-alex.bennee@linaro.org> --- .gitlab-ci.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 17c3349dd9e..eb5b335c1e9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -8,6 +8,12 @@ stages: - build - test =20 +# We assume GitLab has it's own caching set up for RPM/APT repositories so= we +# just take care of avocado assets here. +cache: + paths: + - $HOME/avocado/data/cache + include: - local: '/.gitlab-ci.d/edk2.yml' - local: '/.gitlab-ci.d/opensbi.yml' --=20 2.20.1 From nobody Mon May 6 20:47:38 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1593195868; cv=none; d=zohomail.com; s=zohoarc; b=MQZ7bVVzus4XUuYNDmcFOqk6hcN5RnqlxMM/mWFJX+U2aPw9Acq/SU6adXO8GmTTIKkyEr56kmnlSYiL7Xpy01stkbxnvb6a0WmxiHc9v2DeGtrekVlOw0R3CoE4vIcUgZHmxrjfbZoRLXSHv5Zw2KeI5LUIYvKEeJkfUUd8TuU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1593195868; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=vbgKfgzF0oNn2074SqLFMYEK1X+QIMzjn//YRC3OJSQ=; b=IYtiM9hOqQzjo20P2F9+UTmOB2ZYoJKLsyjntrRoFcXkvAqwfRQF9Pw6TbeyRVT0dulqxrzD0hDiV1SWxMX+gArpBpxaY+A08gaq7PnUpBQ8I5w13OERMlICocP7VdPaOh6kAK+tfgckFJZkfnv7DP20U0QHvK+gUlLOhKYP70E= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1593195868940850.541545268437; Fri, 26 Jun 2020 11:24:28 -0700 (PDT) Received: from localhost ([::1]:49606 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jot1X-0006UJ-C2 for importer@patchew.org; Fri, 26 Jun 2020 14:24:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58358) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jot0D-0003kB-RM for qemu-devel@nongnu.org; Fri, 26 Jun 2020 14:23:05 -0400 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]:51574) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jot0C-000574-3Y for qemu-devel@nongnu.org; Fri, 26 Jun 2020 14:23:05 -0400 Received: by mail-wm1-x331.google.com with SMTP id 22so9670312wmg.1 for ; Fri, 26 Jun 2020 11:23:03 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id g14sm4615026wrm.93.2020.06.26.11.22.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jun 2020 11:22:57 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id AF6761FFB1; Fri, 26 Jun 2020 19:14:03 +0100 (BST) 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=vbgKfgzF0oNn2074SqLFMYEK1X+QIMzjn//YRC3OJSQ=; b=Ly/I8LaGFwdn3atTS2Vp1SEpTemt9xGPPNb2xmHIeAZ3JHwFSNpxBPw8RWq196afHF 0Q/6Xik3ZVKabIbuuG/CW2lTET7x25nXWXYx76yuzzmGT/eo5beZtoTFV81zUCsz+5Q1 TPofBITU9+5N6MGYoIbirqS+4hKy3czG+aNu6wwgap91sMSHWXKqVDtgYY+iL+OEISbe y13qaVIsXJ2AM8CgQIGg2V/mH9JxJGGasbHYWbWdOCG3KiO5XCJTtwWQ28aZFJyh4+tl o8KYmqczlhcrShGP6Hm6lZgs1x6DPpW5XYzP8Fai+zqRaAH8GQMWzFtyuXoIlm2q8Dy+ mOQw== 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=vbgKfgzF0oNn2074SqLFMYEK1X+QIMzjn//YRC3OJSQ=; b=KniArJOK0tPtqBirOk3ps6DOQuE8frFQ1BB1U4s9KjGAhQguMd/7EVkVbDRl4KM/7F uYg6rE7ikHbNplV3A4ttsry/ZGSOmzwdoahKf7vPMSeuFhgMvAHsY+4P3o29LIv5zp14 YsBUqpplMNLtKzY/Hgw9gy068Y3TQLYcxcE/q3nxoSBcuz7ztkV85v7qO7TwnuSf+ke8 TJ6HFMtHykW7pYjz+4a+OmWFl+IcK2a9ZR9e+CBSuVbgCWkm1OOhfW2uHp6GySQxxoc1 EfaF+EGBMzhsXefxvxiLgB3/ARhf5js+2/kPpyFRtcYM6LxZhy7U2FcjDAM1ySRfFw21 smWQ== X-Gm-Message-State: AOAM532eMm+RWdt7ajGjy2N5HVf1t/W9+ZqziCFrVyQULYlaeo1GF99l fRr+rArTn7rIidcMc+auX4bRXA== X-Google-Smtp-Source: ABdhPJwvcbLh7ydLb7v+IjdCTgL+lqjDDGQknIQjP0H7mz70ptkKFEKgtDGTajU/Z5gOfxrWw1hNAw== X-Received: by 2002:a7b:ce97:: with SMTP id q23mr4784657wmj.89.1593195782665; Fri, 26 Jun 2020 11:23:02 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v3 28/30] gitlab: split build-disabled into two phases Date: Fri, 26 Jun 2020 19:13:55 +0100 Message-Id: <20200626181357.26211-29-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200626181357.26211-1-alex.bennee@linaro.org> References: <20200626181357.26211-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::331; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x331.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: fam@euphon.net, Thomas Huth , berrange@redhat.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, Wainer dos Santos Moschetta , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , cota@braap.org, aurelien@aurel32.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) As we run check-qtest in "SLOW" mode this can timeout so split into two jobs. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Thomas Huth --- .gitlab-ci.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index eb5b335c1e9..c6f1addc2f3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -110,7 +110,7 @@ check:system-fedora-alt: IMAGE: fedora MAKE_CHECK_ARGS: check-acceptance =20 -build-disabled: +build:system-fedora-disabled: <<: *native_build_job_definition variables: IMAGE: fedora @@ -121,6 +121,17 @@ build-disabled: --disable-qom-cast-debug --disable-spice --disable-vhost-vsock --disable-vhost-net --disable-vhost-crypto --disable-vhost-user TARGETS: i386-softmmu ppc64-softmmu mips64-softmmu i386-linux-user + artifacts: + paths: + - build + +qtest:system-fedora-disabled: + <<: *native_test_job_definition + needs: + - job: build:system-fedora-disabled + artifacts: true + variables: + IMAGE: fedora MAKE_CHECK_ARGS: check-qtest SPEED=3Dslow =20 build-tcg-disabled: --=20 2.20.1 From nobody Mon May 6 20:47:38 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1593196330; cv=none; d=zohomail.com; s=zohoarc; b=FbC94x77XzWX/a9bEz18YqUq1dasIOGbT/ieP+KW/F2t+8I2l0EbJEjpWxNxgjE023lyzsu4EjVYhk3WGTwBVOPiMWrEiKLYw1gPy4ziaFfrd1j9+J8R7hXtVoxoLU3zcQCTEGnqlFBUPoqopMSmUtb/CAh0OrFqCHIx8tRYKPM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1593196330; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=AGl2Uc8EGJJxA1tr+9fN1UmCX9zweogDk66dtMF1ioY=; b=Ml2Ay0M81rU3TiqZCUG/hZm4QVS4c3lQO5WPXeJ/+1IXSrBi/H8hV+5/7Xthb+6Cy1nfEz+C13MsCDkYnfN2jg8Tqe/aEyYNyadJ4hb8sl4SFSpjF2SMHaMezNccebVdOvrNnm8CvPsmLJMUSuBcMClKsf1p+++PK+VBNUmpzGc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1593196330944489.088451886039; Fri, 26 Jun 2020 11:32:10 -0700 (PDT) Received: from localhost ([::1]:50606 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jot8z-0001eG-Jq for importer@patchew.org; Fri, 26 Jun 2020 14:32:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58380) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jot0E-0003mv-W1 for qemu-devel@nongnu.org; Fri, 26 Jun 2020 14:23:07 -0400 Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]:53418) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jot0D-00057v-AT for qemu-devel@nongnu.org; Fri, 26 Jun 2020 14:23:06 -0400 Received: by mail-wm1-x343.google.com with SMTP id j18so9660869wmi.3 for ; Fri, 26 Jun 2020 11:23:04 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id c2sm38315159wrv.47.2020.06.26.11.22.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jun 2020 11:22:57 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id E04EA1FFB3; Fri, 26 Jun 2020 19:14:03 +0100 (BST) 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=AGl2Uc8EGJJxA1tr+9fN1UmCX9zweogDk66dtMF1ioY=; b=M9PAo1GGD/3IdoVQbke8syP8CW0gW8XptiHLbRxVTvJMO1Za+Uhg/sLumcGRRacG46 LuLVVAriBCUozEZZmbgE0EGy6wG/r8ZhhVIcZBYdiodX5a8nCJ+2l6Z/6vNO7yGGb8ZA cwws9nDgt2Xxel5GSQPBy7udJpiH3Vk4b1wJNV1g3/y6y6IEJXZcEjisN9WZeo4KWM6U IBvh5WeI129WfnuheRzXlUdWySG5RYfnTyFzxYEQDKe1ie1dQiIe/bl05zShL1nNLtqS WuUS1P5b0TMKHRXxY2uqvXWuEd55GEvZdZgmNKIiplFPgaJKD5aGnxKOuh2kFy33W5pE OyGg== 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=AGl2Uc8EGJJxA1tr+9fN1UmCX9zweogDk66dtMF1ioY=; b=q5ndwkf+g5XTX5CMkgqkd2R69odql2AP6vVq3uzZwFoClkIySa78rA0pWs/F7F9umN v4W7G/b30ns+VD5HFPn5/feBGdhV7hozxT4XQ3gmuymME3C3i6n/Lesamltx79KG/VMf GEno+hUC29ZlMYDltKwA2ifoJrflnzKXAHwS2Vhb63xc+bPVZ8VJGPCmLA703TzmW3kj nHACTiFXGqb21bJ4SMeMSXNCJFHIyDLYh8kmxgEBK6TyS1NMMtJsx7mQ4YOmKayedGH7 E6dLNJQ1Qeroa1UEgnO2KwFYmNW7yDRXAwDILY5wLbnXPzv8sF2ru/RCdDE85DSw/OYC Cj/Q== X-Gm-Message-State: AOAM530XYpuprKpHeANPVdhOy+Rk88Z8WkN6JpG+1JOfAbGz7BlCsO9O 1C6NJfOzBvvU7FuwiCNxMp8a5A== X-Google-Smtp-Source: ABdhPJxeoMHPxTRYeLNWzBwOTp24A/CWsn9Y6KR0VDO2Cb2mV+/71sVQCreF8Swyczl4g7NuvS5R1Q== X-Received: by 2002:a1c:f608:: with SMTP id w8mr4632677wmc.78.1593195783948; Fri, 26 Jun 2020 11:23:03 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v3 29/30] gitlab: limit re-builds of the containers Date: Fri, 26 Jun 2020 19:13:56 +0100 Message-Id: <20200626181357.26211-30-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200626181357.26211-1-alex.bennee@linaro.org> References: <20200626181357.26211-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::343; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x343.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: fam@euphon.net, berrange@redhat.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, cota@braap.org, aurelien@aurel32.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Most of the time we are just rebuilding the same things. We can skip this although currently there is no mechanism for picking up new distro releases. Rather than try to be too fine grained allow any change to trigger all the images being rebuilt. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- .gitlab-ci.d/containers.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitlab-ci.d/containers.yml b/.gitlab-ci.d/containers.yml index 20b2fb1de5d..f56aa44f711 100644 --- a/.gitlab-ci.d/containers.yml +++ b/.gitlab-ci.d/containers.yml @@ -19,6 +19,10 @@ - docker push "$TAG" after_script: - docker logout + only: + changes: + - .gitlab-ci.d/containers.yml + - tests/docker/* =20 amd64-centos7-container: <<: *container_job_definition --=20 2.20.1 From nobody Mon May 6 20:47:38 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1593195904; cv=none; d=zohomail.com; s=zohoarc; b=fSd8MbcJhpNYE9Inl3w9Mx7XnG8Yz/0QWYuW/5YbPVqaGKpdW/ghWPK/pWJdE7G7+EhCAeOeqVmWKtrxCmk/twGLMUWmDmxP6wzxWknFTkukF17EMf7zpFOmRAHXtIiFOIbFdqlPLdNKsHlSOG2uD9QkWs5cdq6N8iW5p6Ai/eU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1593195904; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=eb5iaPGhoDcsV6Aa17DQE5OucQ4Fpz4RuFDlJP0p52E=; b=WfEK9K7IJkmh7xU8WdtI1Jr98tfCuqfyHaTeF0pzMmOVZ5YWF3N50tWG3qqCD2Gj/5uSC5J5Dd009aBKVzAuojofvnGNtyTeAsV25znGS1rhByMTQ9fekH5Kh974apdBW9fFJKfEdbIFT/quIDppKbB+NKrRJ2yEdVQFHWaEfvE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1593195904743456.3685150123896; Fri, 26 Jun 2020 11:25:04 -0700 (PDT) Received: from localhost ([::1]:52158 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jot27-0007Wh-Ck for importer@patchew.org; Fri, 26 Jun 2020 14:25:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58242) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jot04-0003O0-Qv for qemu-devel@nongnu.org; Fri, 26 Jun 2020 14:22:56 -0400 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]:38720) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jot02-0004zb-H8 for qemu-devel@nongnu.org; Fri, 26 Jun 2020 14:22:56 -0400 Received: by mail-wm1-x341.google.com with SMTP id f18so10241811wml.3 for ; Fri, 26 Jun 2020 11:22:54 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id 11sm18436456wmg.41.2020.06.26.11.22.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jun 2020 11:22:51 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 1BA401FF8F; Fri, 26 Jun 2020 19:14:04 +0100 (BST) 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=eb5iaPGhoDcsV6Aa17DQE5OucQ4Fpz4RuFDlJP0p52E=; b=uNC4KkaHxCWcXRRXRdQ9md/cOiYDqzKBxBQNnFLTeKoBa5AaGNATDMbxaetRG7ctEW 8r0MusUUcJm2mElNpRnqf6x0vSlMHa6f2JqNdbX7YAtw7YU6U7RPAZfPfCdryQHKBf4B gnUGLRSNim48zPvSkBovrGvpHo/z7ndYzGIASCg+2XPp459GrMuB59rBK6t7g8D6SPIJ qDQYx0P6sKVzkyYszmygKnIPhCOL7AM+0X12wyjDai3rOwkslZLd7oEvdoZyQHr4CIsE tTIyb/re3tsl1sNi+rbHNeBs+CRLsOTDD76gqW3AqdvAfWYpSpNbDZxJyjDioX3VtQV9 xZYw== 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=eb5iaPGhoDcsV6Aa17DQE5OucQ4Fpz4RuFDlJP0p52E=; b=gecC2f/5vmalNs1X9s74P9E3uuxPm+Uw0cl+FYGW/KUuuO5O5d1sRWf5ArUi1aigSD bvXDZNQSafuDJX8qKtUDZltfQwtBV7LKgDCskhWhcXunR6Xj6BhyXxC2J63oWFYLll/n KmARtXbZutOXe0ID0u2wxN/L2D5p4XO5iob6A8JgzwMfSEXEd2CZf7kPtk2hUc57CKKr 2vaGJ1hLijTG0jhZ5iYkTKPvyPIMlK1RqwbrLLyJsgESX5tgxezyNi89DMv493hog7wk zKaucX9YaK4uWzLTdHoQX3v70iCdtudu3sr5AVyW+vG4Htn5BLeQ4DVKkQmw6ZGb0pgF 5E0w== X-Gm-Message-State: AOAM532YrID/nFIk5maW1fhc+dwD5/NYrDEIpDr4ZNoC45HFea0L58F1 HaexAgNAhsOpQfH1m/SH4eMTnQ== X-Google-Smtp-Source: ABdhPJxOzGSfd64ZnHWc4IydZ+IGHrJykHaFsgXJ4pQCJrM3pRqnqdQ5aQYlrC3fpZz/g4xIFl2piA== X-Received: by 2002:a1c:28c5:: with SMTP id o188mr4573163wmo.62.1593195772856; Fri, 26 Jun 2020 11:22:52 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v3 30/30] containers.yml: build with docker.py tooling Date: Fri, 26 Jun 2020 19:13:57 +0100 Message-Id: <20200626181357.26211-31-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200626181357.26211-1-alex.bennee@linaro.org> References: <20200626181357.26211-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::341; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x341.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: fam@euphon.net, berrange@redhat.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, cota@braap.org, aurelien@aurel32.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Instead of building the docker files directly use the same docker.py scripting as we do for building locally. This should help ensure we use the exact same steps and allow us to cache properly when building locally. To get this working you have to have a fairly recent docker binary otherwise you will see the error message: =3D> ERROR importing cache manifest from registry.gitlab.... So far docker 19.03.12 works (from the docker apt repos) but 18.09.1, build 4c52b90 which is packaged in Debian Buster fails. Signed-off-by: Alex Benn=C3=A9e --- .gitlab-ci.d/containers.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.d/containers.yml b/.gitlab-ci.d/containers.yml index f56aa44f711..e332af3cc46 100644 --- a/.gitlab-ci.d/containers.yml +++ b/.gitlab-ci.d/containers.yml @@ -8,14 +8,17 @@ before_script: - export TAG=3D"$CI_REGISTRY_IMAGE/qemu/$NAME:latest" - export COMMON_TAG=3D"$CI_REGISTRY/qemu-project/qemu/$NAME:latest" + - apk add python3 - docker info - docker login registry.gitlab.com -u "$CI_REGISTRY_USER" -p "$CI_REGI= STRY_PASSWORD" script: + - echo "TAG:$TAG" + - echo "COMMON_TAG:$COMMON_TAG" - docker pull "$TAG" || docker pull "$COMMON_TAG" || true - - sed -i -e "s,FROM qemu/,FROM $CI_REGISTRY_IMAGE/qemu/," tests/docker= /dockerfiles/$NAME.docker - - DOCKER_BUILDKIT=3D1 docker build --cache-from "$TAG" --cache-from "$= COMMON_TAG" --tag "$TAG" - --build-arg BUILDKIT_INLINE_CACHE=3D1 - -f "tests/docker/dockerfiles/$NAME.do= cker" tests/docker/dockerfiles + - ./tests/docker/docker.py --engine docker build + -t "qemu:$NAME" -f "tests/docker/dockerfiles/$NAME.docker" + -r $CI_REGISTRY_IMAGE + - docker tag "qemu:$NAME" "$TAG" - docker push "$TAG" after_script: - docker logout --=20 2.20.1