From patchwork Fri Jun 26 18:13:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 191878 Delivered-To: patch@linaro.org Received: by 2002:a54:3249:0:0:0:0:0 with SMTP id g9csp644968ecs; Fri, 26 Jun 2020 11:15:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzhnKaDEdRwiUdwr+jIFYYBF3T/95rnnHmNcyCXIK4XdjpGV7L3AxAl3slVZi5P27ejgzjw X-Received: by 2002:a25:3752:: with SMTP id e79mr1571586yba.263.1593195302555; Fri, 26 Jun 2020 11:15:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593195302; cv=none; d=google.com; s=arc-20160816; b=CM40D+R70FMI3t7bCAJtYlGjS/5DbiQP7jlZd4h/N1xi+tUJ4QH9wsRlAC1EAWxwux 2Kk4RKvLRyQpqZNDz7UBkEc7zQs026Mdb84Lc1ryDt3JxlR8Qj7LmFpqNYS3vdl1V03e IfWPo04CvMifm4Z8vxXzk+NuU5B/9igvgCNwDJ9juA0PFaB+Y+rkKCPZwqAJ2cKlxOV7 2OdqDUme7YIsDsJ7vPK6YEopvdp0ADocPDeimjpg4nXrumo0OWCEzqXwG31cDrep/Q3Q qniIFtiXrFPJd7zcrlrKKIQ3QDFPD7Y4wNvEI3rHWZgl6vik8JLXYG54pwKxRRkxO9C5 irBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=KLxxBVgESg8+q++r/+fvnKLfCmcpFTynVpvVjZzQTYc=; b=KcIbxWoQI0EYwq/wi3mw9M40KZ4EqOE8bwwqoIYliTpPo3csciYtziTMfBnEmoav4U ZZ8oFKotHRDUQ5m+ysMSaaiFD/D/58kRd4GtuWMEsPAEKPuzTuX4z0trRGx1quE6CQQ+ /oaEhuoI5vig21dXdE8+ri7hoCuvso6XxcGi+0iI2seBqUivl+2hYxe4rwAy8JuHhgpq F8WnWyaJO1we/JBRT3xQieyADNeuLP17k0UXCNU7omtC8evXbEZM+XOvpB6g9t0jVRNc aXTGUiwAnuzLOgsqeN38sofNqBBDUkZJPFeD3Qqxc2iNKSqi/EHWyarcSLUJzTkQh/+a fTVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="d/3+7NNk"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id f65si26203130ybi.147.2020.06.26.11.15.02 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 26 Jun 2020 11:15:02 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="d/3+7NNk"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:39324 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jossP-0007N2-R3 for patch@linaro.org; Fri, 26 Jun 2020 14:15:01 -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) 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-Received: by 2002:adf:f5ce:: with SMTP id k14mr4804457wrp.234.1593195241045; Fri, 26 Jun 2020 11:14:01 -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) From: =?utf-8?q?Alex_Benn=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 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_Mathieu-Daud=C3=A9?= , richard.henderson@linaro.org, f4bug@amsat.org, Max Reitz , =?utf-8?q?Alex_Benn=C3=A9e?= , cota@braap.org, John Snow , aurelien@aurel32.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daudé 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é Signed-off-by: Alex Bennée 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(-) -- 2.20.1 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 Testing: -drive if=ide QEMU X.Y.Z monitor - type 'help' for more information -(qemu) QEMU_PROG: Initialization of device ide-hd failed: Device needs media, but drive is empty +(qemu) QEMU_PROG: Device needs media, but drive is empty Testing: -drive if=virtio QEMU X.Y.Z monitor - type 'help' for more information @@ -214,7 +214,7 @@ QEMU X.Y.Z monitor - type 'help' for more information Testing: -drive file=TEST_DIR/t.qcow2,if=ide,readonly=on QEMU X.Y.Z monitor - type 'help' for more information -(qemu) QEMU_PROG: Initialization of device ide-hd failed: Block node is read-only +(qemu) QEMU_PROG: Block node is read-only Testing: -drive file=TEST_DIR/t.qcow2,if=virtio,readonly=on QEMU X.Y.Z monitor - type 'help' for more information From patchwork Fri Jun 26 18:13:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 191880 Delivered-To: patch@linaro.org Received: by 2002:a54:3249:0:0:0:0:0 with SMTP id g9csp646034ecs; Fri, 26 Jun 2020 11:16:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwgmTtzA5BOLYvFNegHRM1aDoemWvAyITBU+PDgn+KBsYMdj+reKyQ4c5jxWgNZ+P8M2cLk X-Received: by 2002:a25:d3d0:: with SMTP id e199mr6711972ybf.27.1593195394014; Fri, 26 Jun 2020 11:16:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593195394; cv=none; d=google.com; s=arc-20160816; b=L4V5LI9I5giJ9lGg/b9oLKPPh7A9VhRX0rROHRQ8lTQsgkYFwmtpQ+932DsRxjdbhF Oq+tyo/EzlD3i/h9ZiHEzGIWIzf1iMC/kLrDwfnq4WSkHQHKQUFYkDz4uZINcpGiuLmE 11JR38t41GkjI21JtWkyv36xJFIQBBboFa3FM4Zdr+tKM649CdZ3mROtjCHWfxns1Czj RIbQXBwz+TfQ/zLEuBd/YXKSZy7VFi6iEACP02pe+dsxejwWLz/jfBcVj318RIvF/mbv H/WN2hyJ1Wqzu4l8gQ1/NfDGHBzbSHGdl5VEzh5izSdW3mxlBxG5itNSJwW+55OcxPc+ wKDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=tZC0B8qZBNh5ZHLpWECSXwcvz7Y/QMYlsT+820N3gaU=; b=tjkk4pXmntePPMtZKzI/0fkPBcVooJv5kupnRg5YxnYJxbky6T4UdtZ44Ew5zycrgh +pBmEhiq4rfvnWDc3TWH1FYR8ziimn5msWPhucM3/2muF3WTMkaw05l8+H2PgNsmjxwe 1gvKfLjutG23ejKjgRvm1xUjwAS7sT9B0wG15uAJMtxJzNgr//zDrUgFZZQmuqzgDBRz drAeHrgjrIQkIgVe/FLwi3BSSZH8NCgBUvOQqyXejGwyioEGO2xf5miX3uh09mA6lpsk aIvtwmf9zwFfEs/Via45IQLSNkJJlNUAIoxu00QSp3eWlz7So4KhjdyHdtETmFatnrHG Kz0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=g6pr6qax; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id g59si19060554ybi.85.2020.06.26.11.16.33 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 26 Jun 2020 11:16:34 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=g6pr6qax; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:47752 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jostt-0002SP-Dy for patch@linaro.org; Fri, 26 Jun 2020 14:16:33 -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) 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-Received: by 2002:a5d:4845:: with SMTP id n5mr4885014wrs.353.1593195242276; Fri, 26 Jun 2020 11:14:02 -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) From: =?utf-8?q?Alex_Benn=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 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_Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, David Edmondson , cota@braap.org, aurelien@aurel32.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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ée Reviewed-by: Thomas Huth Message-Id: <20200618092636.71832-1-david.edmondson@oracle.com> --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.20.1 diff --git a/configure b/configure index ae8737d5a2c..25b65981142 100755 --- a/configure +++ b/configure @@ -6437,7 +6437,7 @@ EOF fi if test "$secret_keyring" != "no" then - if test "$have_keyring" == "yes" + if test "$have_keyring" = "yes" then secret_keyring=yes else From patchwork Fri Jun 26 18:13:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 191891 Delivered-To: patch@linaro.org Received: by 2002:a54:3249:0:0:0:0:0 with SMTP id g9csp647696ecs; Fri, 26 Jun 2020 11:18:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyOhA3woYaW3CJUu6fNKV6XXxcVolKkwUyHH2DOA1PNFggeQ55odQFZi0fQb4CGnmPje9gk X-Received: by 2002:a25:aa44:: with SMTP id s62mr6530830ybi.480.1593195532016; Fri, 26 Jun 2020 11:18:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593195532; cv=none; d=google.com; s=arc-20160816; b=ksEjPbCn1jiXzs/eyNzhBiqzVrrJKMy27kYQWYIkp9BwPxjTnm9c2uzwBAc14/76gk h32ugWMX8lXu5vZ9TPyxrbKDz1VqenTSeIvFcw31QtPR63HhcneKBdjHlJoK3C6lwbHD DHYfOpvSr+V/BAi0sin1qfRlTI2wdvRgjoHfE3mSLeOYxBq1Ywx0UTG0nYCxAxJQaiFM OYlX3x5Gi8W3DcCPdrA5oX5QuyUTtWyl2Mdiykp3zkoR4c1xnZ0LpY2ZtPuoHihc9Slv ieP/wHfHdV+8JfpmBA/QxoabW+YluzSbp261aOS25qr909SczESU68PK0F1odJYvv2Fw k6Kw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=m1Iumf3YfxuO4NhxteboEtLnibs/CAVIrPHuCmkmoi4=; b=psK/tSvsM66Wbsqx7EvjBJDMvE/RN6+/mXlpRzbv1MBEJyx/20dBaY3kdixcePCEF2 Ltj9R4hvs+Ql8LD/D14XITMaoIfwTTL2F6ZYBaDsIs/FbF6gygy9v2pCXcwaJU8vtGKO yg6XmQMrbgXWYuvhJ48ImkLadxffcwyoe3nqgXmPrxKTXgH/TzyYB5WuKFyAFZLbadgR cJAQzb+wrYXJZY0W9pcr7qws0FMBp/3vRU/5EhFQwMgO6Zxb2TvMgfCIFFhLehB4pMcA NPoA4RkvcG0ZAfsm77yqFCniwtTO3cTTad/JIDe38lk7cTIsjkQgBLi+Yyt12hT01Fn5 3+Eg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=dqWOJlKf; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id p18si4651589ybl.369.2020.06.26.11.18.51 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 26 Jun 2020 11:18:52 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=dqWOJlKf; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:54186 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1josw7-00059F-Fg for patch@linaro.org; Fri, 26 Jun 2020 14:18:51 -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) 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-Received: by 2002:a05:600c:410f:: with SMTP id j15mr4601927wmi.128.1593195243970; Fri, 26 Jun 2020 11:14:03 -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) From: =?utf-8?q?Alex_Benn=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 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_Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, =?utf-8?q?Philippe_Mat?= =?utf-8?q?hieu-Daud=C3=A9?= , cota@braap.org, aurelien@aurel32.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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ée Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée Message-Id: <20200601211421.1277-2-robert.foley@linaro.org> --- tests/vm/basevm.py | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) -- 2.20.1 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 = 4 - def __init__(self, debug=False, vcpus=None, genisoimage=None, - build_path=None): + def __init__(self, args): self._guest = None - self._genisoimage = genisoimage - self._build_path = build_path + self._genisoimage = args.genisoimage + self._build_path = args.build_path self._tmpdir = os.path.realpath(tempfile.mkdtemp(prefix="vm-test-", suffix=".tmp", dir=".")) @@ -78,7 +77,7 @@ class BaseVM(object): self._ssh_pub_key_file = os.path.join(self._tmpdir, "id_rsa.pub") open(self._ssh_pub_key_file, "w").write(SSH_PUB_KEY) - self.debug = debug + self.debug = args.debug self._stderr = sys.stderr self._devnull = open(os.devnull, "w") if self.debug: @@ -92,8 +91,8 @@ class BaseVM(object): (",ipv6=no" if not self.ipv6 else ""), "-device", "virtio-net-pci,netdev=vnet", "-vnc", "127.0.0.1:0,to=20"] - if vcpus and vcpus > 1: - self._args += ["-smp", "%d" % vcpus] + if args.jobs and args.jobs > 1: + self._args += ["-smp", "%d" % args.jobs] if kvm_available(self.arch): self._args += ["-enable-kvm"] else: @@ -456,8 +455,7 @@ def main(vmcls): return 1 logging.basicConfig(level=(logging.DEBUG if args.debug else logging.WARN)) - vm = vmcls(debug=args.debug, vcpus=args.jobs, - genisoimage=args.genisoimage, build_path=args.build_path) + vm = 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.image, From patchwork Fri Jun 26 18:13:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 191883 Delivered-To: patch@linaro.org Received: by 2002:a54:3249:0:0:0:0:0 with SMTP id g9csp646696ecs; Fri, 26 Jun 2020 11:17:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx2NoPZh01y20E8+GsI30ITWsSK0szSGva/7qIcVt2JYn2QoTGRj27ZlYfwutyCm7hGxYaU X-Received: by 2002:a25:e795:: with SMTP id e143mr7344524ybh.181.1593195447178; Fri, 26 Jun 2020 11:17:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593195447; cv=none; d=google.com; s=arc-20160816; b=QPYNb8JCoakF/a8EUupfyjuzL8xJDFt66BOCujeVJ8fYHad+vMFd3p/HNRvDRCVarM aR9++mQBQ+PcEVqTSIZV14N6l6UxP6WW/UwgqEM9wUdmmgbPQyaSJJehM1l/cyAJeAj8 ZkrGGpbddsdzowhSniGKr9VhYQ25ZDSe6AWjG4D8d+JIIKd4jVYMnrokSQRpxQHBKqeQ oy7sxJz2uvWhVP7HTWqPGTHlJHiBZT4OW7jaD/+o2367xM8eTZZF8M9FfxDcBZ/+Xm4m 23hT9kKzY6A5cjICZ7NOhd8xgXlysibkhu8i7zKKKvu7H8NCPmVKquGfGWKn+JVad19S uxeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=Uqu+G7KWNLFFsBFSWuF2fzigErk1o01AVduM2CJF95Y=; b=nOWOgW2LO2Np1s8h9k0iffXk2vRMi1m9AsIrhlkmPX+uIpCvAStWO+zcvDvpSKD9ui 0d3tcjbJ+zw/01A1EmpLIYVmf8KP3fI/egMPIjdCBo/3SkxUs8ufjrCUcVkeGsFShbnv 6luTir+LVMw8IeUtEJJaHJseFH+ZNXt/ohuO5PplbUsYqwV4EpKmKxTFTBvwDjb06Mvz h+2+gZmwAVyF7C36cuYRHXhDW4KgceWFiqNtthx1cAygpv5l6CxABKAv8XLhejk06sKo 17kL1685jaKt4vTKq8IcEwLF/KtVvl6fJH1hnlzx3wqDsvOYAZwA6s9gtWeo3sCAAFbB u0dA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=J+VZ2n8F; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id t13si26156972ybl.25.2020.06.26.11.17.27 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 26 Jun 2020 11:17:27 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=J+VZ2n8F; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:48934 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1josuk-0002vj-JD for patch@linaro.org; Fri, 26 Jun 2020 14:17:26 -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) 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-Received: by 2002:a1c:99c2:: with SMTP id b185mr5074081wme.52.1593195247309; Fri, 26 Jun 2020 11:14:07 -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) From: =?utf-8?q?Alex_Benn=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 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_Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, =?utf-8?q?Philippe_Mat?= =?utf-8?q?hieu-Daud=C3=A9?= , cota@braap.org, Peter Puhov , aurelien@aurel32.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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 created 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ée Signed-off-by: Alex Bennée Message-Id: <20200601211421.1277-3-robert.foley@linaro.org> --- tests/vm/basevm.py | 172 +++++++++++++++++++++++++++++++++++---------- 1 file changed, 133 insertions(+), 39 deletions(-) -- 2.20.1 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 = open(os.path.join(os.path.dirname(__file__), - "..", "keys", "id_rsa")).read() -SSH_PUB_KEY = open(os.path.join(os.path.dirname(__file__), - "..", "keys", "id_rsa.pub")).read() - +import shlex + +SSH_KEY_FILE = os.path.join(os.path.dirname(__file__), + "..", "keys", "id_rsa") +SSH_PUB_KEY_FILE = 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 = { + '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 = { + 'block' : "-drive file={},if=none,id=drive0,cache=writeback "\ + "-device virtio-blk,drive=drive0,bootindex=0", + 'scsi' : "-device virtio-scsi-device,id=scsi "\ + "-drive file={},format=raw,if=none,id=hd0 "\ + "-device scsi-hd,drive=hd0,bootindex=0", +} class BaseVM(object): - GUEST_USER = "qemu" - GUEST_PASS = "qemupass" - ROOT_PASS = "qemupass" envvars = [ "https_proxy", @@ -57,25 +82,38 @@ class BaseVM(object): poweroff = "poweroff" # enable IPv6 networking ipv6 = True + # This is the timeout on the wait for console bytes. + socket_timeout = 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 = 4 - def __init__(self, args): + def __init__(self, args, config=None): self._guest = None self._genisoimage = args.genisoimage self._build_path = args.build_path + # Allow input config to override defaults. + self._config = DEFAULT_CONFIG.copy() + if config != None: + self._config.update(config) + self.validate_ssh_keys() self._tmpdir = os.path.realpath(tempfile.mkdtemp(prefix="vm-test-", suffix=".tmp", dir=".")) atexit.register(shutil.rmtree, self._tmpdir) - - self._ssh_key_file = 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 = 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'] = \ + open(self._config['ssh_key_file']).read().rstrip() + self._config['ssh_pub_key'] = \ + open(self._config['ssh_pub_key_file']).read().rstrip() + self._ssh_tmp_key_file = 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 = os.path.join(self._tmpdir, "id_rsa.pub") + open(self._ssh_tmp_pub_key_file, + "w").write(self._config['ssh_pub_key']) self.debug = args.debug self._stderr = sys.stderr @@ -84,11 +122,14 @@ class BaseVM(object): self._stdout = sys.stdout else: self._stdout = self._devnull + netdev = "user,id=vnet,hostfwd=:127.0.0.1:{}-:22" self._args = [ \ - "-nodefaults", "-m", "4G", - "-cpu", "max", - "-netdev", "user,id=vnet,hostfwd=:127.0.0.1:0-:22" + - (",ipv6=no" if not self.ipv6 else ""), + "-nodefaults", "-m", self._config['memory'], + "-cpu", self._config['cpu'], + "-netdev", + netdev.format(self._config['ssh_port']) + + (",ipv6=no" if not self.ipv6 else "") + + (",dns=" + self._config['dns'] if self._config['dns'] else ""), "-device", "virtio-net-pci,netdev=vnet", "-vnc", "127.0.0.1:0,to=20"] 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 = [] + if self._config['qemu_args'] != None: + qemu_args = self._config['qemu_args'] + qemu_args = 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 = shlex.split(qemu_args) + self._config['extra_args'] = [] + for arg in args: + if arg: + # Preserve quotes around arguments. + # shlex above takes them out, so add them in. + if " " in arg: + arg = '"{}"'.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=None): + """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 = self.login_prompt + # Intentionally bump up the default timeout under TCG, + # since the console wait below takes longer. + timeout = self.socket_timeout + if not kvm_available(self.arch): + timeout *= 8 + self.console_init(timeout=timeout) + 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=None, sha512sum=None): def check_sha256sum(fname): if not sha256sum: @@ -130,8 +220,9 @@ class BaseVM(object): "-t", "-o", "StrictHostKeyChecking=no", "-o", "UserKnownHostsFile=" + os.devnull, - "-o", "ConnectTimeout=1", - "-p", self.ssh_port, "-i", self._ssh_key_file] + "-o", + "ConnectTimeout={}".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=%s,serial=%s,bootindex=1" % (name, name)] def boot(self, img, extra_args=[]): - args = self._args + [ - "-drive", "file=%s,if=none,id=drive0,cache=writeback" % img, - "-device", "virtio-blk,drive=drive0,bootindex=0"] - args += self._data_args + extra_args + boot_dev = BOOT_DEVICE[self._config['boot_dev_type']] + boot_params = boot_dev.format(img) + args = self._args + boot_params.split(' ') + args += self._data_args + extra_args + self._config['extra_args'] logging.debug("QEMU args: %s", " ".join(args)) qemu_path = get_qemu_path(self.arch, self._build_path) guest = QEMUMachine(binary=qemu_path, args=args) - 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) def console_ssh_init(self, prompt, user, pw): - sshkey_cmd = "echo '%s' > .ssh/authorized_keys\n" % SSH_PUB_KEY.rstrip() + sshkey_cmd = "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 = 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=(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 = 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() -def main(vmcls): +def main(vmcls, config=None): try: + if config == None: + config = {} args, argv = 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=(logging.DEBUG if args.debug else logging.WARN)) - vm = vmcls(args) + vm = vmcls(args, config=config) if args.build_image: if os.path.exists(args.image) and not args.force: sys.stderr.writelines(["Image file exists: %s\n" % args.image, From patchwork Fri Jun 26 18:13:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 191876 Delivered-To: patch@linaro.org Received: by 2002:a54:3249:0:0:0:0:0 with SMTP id g9csp644692ecs; Fri, 26 Jun 2020 11:14:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxY8puuoaW8FeMbMHx9AKQoeQTbM3JM04LtR35oagx6LkMWrJ3bmE2HEUkL7tGBf7FDGftd X-Received: by 2002:a25:b88d:: with SMTP id w13mr7098001ybj.520.1593195279892; Fri, 26 Jun 2020 11:14:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593195279; cv=none; d=google.com; s=arc-20160816; b=PctXtGDFDt4tHSS3BTNlwD47OUpnBWA1kPJQOZueiRhb4ti/Zz+VOKJMlRa1g3sx3r OyuZ7M2axPrkGTTVv0nhaOD5FNjqOgZwrbXmyPo0wQekSwnO4JtD6SAR4bP+ZWuCoawJ J/CFm3i/oC6NYd3Kg/2T1lKiUwNAwviXoEodKYeATFbC6QKe5TAD6AeHCNNtWHg+fVZw JYko/JVMKN2qI7ktFEbv3FpxwmilfEsRxm43P+R5HQDzCBXPJc1mY4RGqD+zOzxeckba OUzx2B/9mjq1zRB8plueLWhqIREQIM7rVMXxeOAiBANO57j05WxMOtlgPEzEp2DP//5l LJCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=exBMseN9TvQ4qzyEbcwp/V21jfsyaYb51WWafgLSxtM=; b=WfnCxIC1SGzxaLmSL/J3X0eLtrnhqih8AXBldc15xlQQtEuxzTEpESuYFWQftSuH1+ 67iLxiItCYzNPBsW3PpBYDW1BxKOCO5f//HqMNtRJlxUA3H8T87wTrcc99FT7h4mIRal A4q/SoBVgP67cxEOOZhnrm8RTPip8nhBvcVeEoQhq01etJvKkbfrMcXpZZQR6IeseIGP F1TGKsxAkkKprCMVwrb9EDBL3D448H4HjSHMy9CgE8M0o3QJJcpICTgHxHJWpDRk+iVc SN0XCeMQB3rD1lPLVStQaiO2EHZpd6HDPQyPqLdycpZijp7wdAF2Uv/52pbIRGtzLOKG 8N8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="KKe7eY/k"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id l193si24349504ybl.398.2020.06.26.11.14.39 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 26 Jun 2020 11:14:39 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="KKe7eY/k"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:39392 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1joss3-0007PA-6q for patch@linaro.org; Fri, 26 Jun 2020 14:14: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) 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-Received: by 2002:adf:9307:: with SMTP id 7mr4912875wro.414.1593195244799; Fri, 26 Jun 2020 11:14:04 -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) From: =?utf-8?q?Alex_Benn=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 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_Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, =?utf-8?q?Philippe_Mat?= =?utf-8?q?hieu-Daud=C3=A9?= , cota@braap.org, Peter Puhov , aurelien@aurel32.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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ée Signed-off-by: Alex Bennée 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 -- 2.20.1 diff --git a/configure b/configure index 25b65981142..a9850b1fbea 100755 --- a/configure +++ b/configure @@ -959,6 +959,13 @@ do fi done +# Check for existence of python3 yaml, needed to +# import yaml config files into vm-build. +python_yaml="no" +if $(python3 -c "import yaml" 2> /dev/null); then + python_yaml="yes" +fi + : ${smbd=${SMBD-/usr/sbin/smbd}} # Default objcc to clang if available, otherwise use CC @@ -6819,6 +6826,7 @@ if test "$docs" != "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" != "no" ; then echo "smbd $smbd" @@ -7899,6 +7907,7 @@ echo "PYTHON=$python" >> $config_host_mak echo "SPHINX_BUILD=$sphinx_build" >> $config_host_mak echo "SPHINX_WERROR=$sphinx_werror" >> $config_host_mak echo "GENISOIMAGE=$genisoimage" >> $config_host_mak +echo "PYTHON_YAML=$python_yaml" >> $config_host_mak echo "CC=$cc" >> $config_host_mak if $iasl -h > /dev/null 2>&1; then echo "IASL=$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=1 - Use QEMU binary local to this build." @echo " QEMU=/path/to/qemu - Change path to QEMU binary" @echo " QEMU_IMG=/path/to/qemu-img - Change path to qemu-img tool" +ifeq ($(PYTHON_YAML),yes) + @echo " QEMU_CONFIG=/path/conf.yml - Change path to VM configuration .yml file." +else + @echo " (install python3-yaml to enable support for yaml file to configure a VM.)" +endif + @echo " See conf_example_*.yml for file format details." vm-build-all: $(addprefix vm-build-, $(IMAGES)) 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=cidir, stdin=self._devnull, stdout=self._stdout, stderr=self._stdout) - return os.path.join(cidir, "cloud-init.iso") def get_qemu_path(arch, build_path=None): @@ -497,6 +496,41 @@ def get_qemu_path(arch, build_path=None): qemu_path = "qemu-system-" + arch return qemu_path +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 = args.config + elif 'QEMU_CONFIG' in os.environ: + config_file = 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 = 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): def get_default_jobs(): @@ -536,6 +570,9 @@ def parse_args(vmcls): help="run tests with a snapshot") parser.add_option("--genisoimage", default="genisoimage", help="iso imaging tool") + parser.add_option("--config", "-c", default=None, + help="Provide config yaml for configuration. "\ + "See config_example.yaml for example.") parser.disable_interspersed_args() return parser.parse_args() @@ -547,6 +584,7 @@ def main(vmcls, config=None): if not argv and not args.build_qemu and not args.build_image: print("Nothing to do?") return 1 + config = parse_config(config, args) logging.basicConfig(level=(logging.DEBUG if args.debug else logging.WARN)) vm = vmcls(args, config=config) diff --git a/tests/vm/conf_example_aarch64.yml b/tests/vm/conf_example_aarch64.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 defaults. + + # 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=max + 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=16,sockets=2,cores=8 + -numa node,cpus=0-3,nodeid=0 -numa node,cpus=4-7,nodeid=1 + -numa node,cpus=8-11,nodeid=2 -numa node,cpus=12-15,nodeid=3 + -numa dist,src=0,dst=1,val=15 -numa dist,src=2,dst=3,val=15 + -numa dist,src=0,dst=2,val=20 -numa dist,src=0,dst=3,val=20 + -numa dist,src=1,dst=2,val=20 -numa dist,src=1,dst=3,val=20" + + # 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 defaults. + + # 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=8,sockets=2,cores=4 + -object memory-backend-ram,size=4G,policy=bind,host-nodes=0,id=ram-node0 + -object memory-backend-ram,size=4G,policy=bind,host-nodes=0,id=ram-node1 + -object memory-backend-ram,size=4G,policy=bind,host-nodes=1,id=ram-node2 + -object memory-backend-ram,size=4G,policy=bind,host-nodes=1,id=ram-node3 + -numa node,cpus=0-1,nodeid=0 -numa node,cpus=2-3,nodeid=1 + -numa node,cpus=4-5,nodeid=2 -numa node,cpus=6-7,nodeid=3 + -numa dist,src=0,dst=1,val=15 -numa dist,src=2,dst=3,val=15 + -numa dist,src=0,dst=2,val=20 -numa dist,src=0,dst=3,val=20 + -numa dist,src=1,dst=2,val=20 -numa dist,src=1,dst=3,val=20" + + # 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 From patchwork Fri Jun 26 18:13:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 191893 Delivered-To: patch@linaro.org Received: by 2002:a54:3249:0:0:0:0:0 with SMTP id g9csp648831ecs; Fri, 26 Jun 2020 11:20:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy4Y/LfQZ5yP+3+wvRdW0E3pluLS44ZnDTb8rvF2cXElcUdKlZ/BwWTrU/qCH+0yYHtXZKL X-Received: by 2002:a25:df83:: with SMTP id w125mr7139253ybg.354.1593195633827; Fri, 26 Jun 2020 11:20:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593195633; cv=none; d=google.com; s=arc-20160816; b=O1QhEp6zYFpxqNrnEcokTl3KWUC2hkSzTdvEjXIvRqAKz2N/yuZbrQemeH0RH3qXqc L/DDGwuOMEt+gn+iNxTKZxaha6JstuQKjYjioaxVOY135j7dyjPKFqcBq63zZfK0n6aV s9fhYL4b0VmfyvdMaabehTt5O9/n/EwQMqZasb/jiCMrZ2MXhPFPPYYcvkgjpxT6cVdE Z9EQryR5E2AweNde4Cex99Ww5mxBaAJtQBH6Uv5hhc4evPzCjOuZVjgiFYsUqt9JhpwB jtPHZRHCtHH5NKzijkuZ5joPwdi7TrXoaJXvw78jjIYSqtyHG5PBCGJjKgWLM8nC5c4W alsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=yfaWvkBHiSQ15nCnLOaiCfwwNxNyBgCuiCJ/EYYdU+8=; b=07FnbMUXUMatzHzhyzzB/c1u/0W7Tbq+/QeuRkhir+yjy2ViY68IswsjKqy3H3eoEk T2WTKdZz1jXb0peyfn2jHOs96lda5irj/DCWtMxF7xNxOT0AccMbHcO0fA4PZgKH5EHg P8B+BHok6N2YOGmeXhEqQYT+xAJwgQkaw8HCUKAjjBnLPR6HR8feA7zVn7afXPKUQakF X15B1PL6QQQQnlYe0IfYyjqGOtyk9Gyvt8M3IINradp4T8bCePlD5gQwA0SSnamXx4/x QrUj5/iyzR3ztItIuCMYz4EF84GiZOWnDe+eGOUUQv7XX32MpDwNcDmDCdFRpapoAAkc QK2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=H9y8qnqV; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 132si25537368yba.45.2020.06.26.11.20.33 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 26 Jun 2020 11:20:33 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=H9y8qnqV; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:60506 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1josxl-0007n5-6X for patch@linaro.org; Fri, 26 Jun 2020 14:20:33 -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) 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-Received: by 2002:adf:e50a:: with SMTP id j10mr5320023wrm.71.1593195245974; Fri, 26 Jun 2020 11:14:05 -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) From: =?utf-8?q?Alex_Benn=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 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_Mathieu-Da?= =?utf-8?q?ud=C3=A9?= , richard.henderson@linaro.org, f4bug@amsat.org, =?utf-8?q?Alex_Benn?= =?utf-8?b?w6ll?= , cota@braap.org, aurelien@aurel32.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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é Signed-off-by: Alex Bennée 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 -- 2.20.1 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. # -import os import sys -import subprocess import basevm -import time +import ubuntuvm -class UbuntuX86VM(basevm.BaseVM): +DEFAULT_CONFIG = { + '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 = "ubuntu.i386" arch = "i386" + image_link="https://cloud-images.ubuntu.com/releases/bionic/"\ + "release-20191114/ubuntu-18.04-server-cloudimg-i386.img" + image_sha256="28969840626d1ea80bb249c08eef1a4533e8904aa51a327b40f37ac4b4ff04ef" BUILD_SCRIPT = """ set -e; cd $(mktemp -d); @@ -29,34 +36,5 @@ class UbuntuX86VM(basevm.BaseVM): make --output-sync {target} -j{jobs} {verbose}; """ - def build_image(self, img): - cimg = self._download_with_cache( - "https://cloud-images.ubuntu.com/releases/bionic/release-20191114/ubuntu-18.04-server-cloudimg-i386.img", - sha256sum="28969840626d1ea80bb249c08eef1a4533e8904aa51a327b40f37ac4b4ff04ef") - img_tmp = img + ".tmp" - subprocess.check_call(["cp", "-f", cimg, img_tmp]) - self.exec_qemu_img("resize", img_tmp, "50G") - self.boot(img_tmp, extra_args = [ - "-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/sources.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-en") - self.ssh_root("poweroff") - self.wait() - os.rename(img_tmp, img) - return 0 - if __name__ == "__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=None): + self.login_prompt = "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 = self._download_with_cache(self.image_link, + sha256sum=self.image_sha256) + img_tmp = img + ".tmp" + subprocess.check_call(["cp", "-f", os_img, img_tmp]) + self.exec_qemu_img("resize", img_tmp, "+50G") + ci_img = self.gen_cloud_init_iso() + + self.boot(img_tmp, extra_args = [ "-device", "VGA", "-cdrom", ci_img, ]) + + # First command we issue is fix for slow ssh login. + self.wait_ssh(wait_root=True, + cmd="chmod -x /etc/update-motd.d/*") + # Wait for cloud init to finish + self.wait_ssh(wait_root=True, + cmd="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.list") + + # If the user chooses not to do the install phase, + # then we will jump right to the graceful shutdown + if self._config['install_cmds'] != "": + # Issue the install commands. + # This can be overriden by the user in the config .yml. + install_cmds = self._config['install_cmds'].split(',') + for cmd in install_cmds: + self.ssh_root(cmd) + self.graceful_shutdown() + os.rename(img_tmp, img) + return 0 From patchwork Fri Jun 26 18:13:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 191895 Delivered-To: patch@linaro.org Received: by 2002:a54:3249:0:0:0:0:0 with SMTP id g9csp649864ecs; Fri, 26 Jun 2020 11:21:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJycQF0WJwqmEslBEAZU2+PndzOR6pNqCJ3yr1IZaHugnds1bKFtL6A1+NizJgJH8HvKy2PA X-Received: by 2002:a25:544:: with SMTP id 65mr7007473ybf.309.1593195717605; Fri, 26 Jun 2020 11:21:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593195717; cv=none; d=google.com; s=arc-20160816; b=oPhHdZo3pTINFjwJy4cB7e03nZvSW6neiVAA+/2goPd2lS6mPeX/VPTYkExI4EP0NW /X8xji7PbHMLBSueIy4wZp3kSG1D3jfcqftqBgQviUOQ3kQOmY3MsUVXTuzdZ6dm7TKD o86bTFFTvy+npd3uY4PiUf2AuO+KOo9T3tpa29eed8HcaOgeQWljEiu1pKduMwaduLaE zs+gbURTdJbxQ1CuNmHr8tSwuG70BEuNM+3f84KZ5vk5Jmi/mRHGnkvt6QcAKdYiPGok piBTaRFjzDWG9fB1OpZrrwxcFmspqR2W9oMHrl7ect9PBq71tBOqXpRC7H0ZLun9hzTu t1FA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=cVi5NHLgjEFhTHyOjhgA64ZHWIO8zaXgNTQ2jePoJjg=; b=FRlZZIcGfMyiZAU4rgVqhCFklAP0HBRPpuMG9DVfz6r1Z4AStRtQON1VODHqVhgbEW NC1eN8X+OxGQdwKB6aJokicLmcf+z8nT8eQqrprX2rSbbkJekdBl6/tL2E8ofbPHgwWh v9G5RjNITeQuum4KJYdFgG9dAzGvkhfc2Nbw3dAVtr7umBZmA76CYoJ9FdAErguMRZF/ wRH43q7nKmbVX10nwfZXubJ1HgrNvJTc9N7qDjKN+OVbjydGQBTsyF89GXmZqHOb7Zmd tdcuU8OSAmcnsS75xsLqzJdALtZgAZxGAdFZkbDa+h5Az8KTTEQgSNwjAcR0S7c39YE0 aTyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=d+pc3NFo; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id r18si11127320ybk.163.2020.06.26.11.21.57 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 26 Jun 2020 11:21:57 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=d+pc3NFo; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:36658 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1josz6-0001Cv-TP for patch@linaro.org; Fri, 26 Jun 2020 14:21:56 -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) 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-Received: by 2002:a5d:4e81:: with SMTP id e1mr4772489wru.22.1593195248769; Fri, 26 Jun 2020 11:14:08 -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) From: =?utf-8?q?Alex_Benn=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 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_Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, =?utf-8?q?Philippe_Mat?= =?utf-8?q?hieu-Daud=C3=A9?= , cota@braap.org, Peter Puhov , aurelien@aurel32.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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ée 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 -- 2.20.1 diff --git a/configure b/configure index a9850b1fbea..0750049e017 100755 --- a/configure +++ b/configure @@ -418,6 +418,7 @@ prefix="/usr/local" mandir="\${prefix}/share/man" datadir="\${prefix}/share" firmwarepath="\${prefix}/share/qemu-firmware" +efi_aarch64="" qemu_docdir="\${prefix}/share/doc/qemu" bindir="\${prefix}/bin" libdir="\${prefix}/lib" @@ -1108,6 +1109,8 @@ for opt do ;; --firmwarepath=*) firmwarepath="$optarg" ;; + --efi-aarch64=*) efi_aarch64="$optarg" + ;; --host=*|--build=*|\ --disable-dependency-tracking|\ --sbindir=*|--sharedstatedir=*|\ @@ -1782,6 +1785,7 @@ Advanced options (experts only): --sysconfdir=PATH install config in PATH$confsuffix --localstatedir=PATH install local state in PATH (set at runtime on win32) --firmwarepath=PATH search PATH for firmware files + --efi-aarch64=PATH PATH of efi file to use for aarch64 VMs. --with-confsuffix=SUFFIX suffix for QEMU data inside datadir/libdir/sysconfdir [$confsuffix] --with-pkgversion=VERS use specified string as sub-version of the package --enable-debug enable common debug build options @@ -3600,6 +3604,20 @@ EOF fi fi +############################################ +# 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=$PWD/pc-bios/edk2-aarch64-code.fd + else + efi_aarch64="" + fi +fi + ########################################## # libcap-ng library probe if test "$cap_ng" != "no" ; then @@ -6826,6 +6844,7 @@ if test "$docs" != "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" != "no" ; then @@ -7907,6 +7926,7 @@ echo "PYTHON=$python" >> $config_host_mak echo "SPHINX_BUILD=$sphinx_build" >> $config_host_mak echo "SPHINX_WERROR=$sphinx_werror" >> $config_host_mak echo "GENISOIMAGE=$genisoimage" >> $config_host_mak +echo "EFI_AARCH64=$efi_aarch64" >> $config_host_mak echo "PYTHON_YAML=$python_yaml" >> $config_host_mak echo "CC=$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 := freebsd netbsd openbsd centos fedora ifneq ($(GENISOIMAGE),) IMAGES += ubuntu.i386 centos +ifneq ($(EFI_AARCH64),) +IMAGES += ubuntu.aarch64 +endif endif IMAGES_DIR := $(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 VM" +else + @echo " (to build centos/ubuntu aarch64 images use configure --efi-aarch64)" +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 = { + 'cpu' : "max", + 'machine' : "virt,gic-version=max", +} + +# 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 = 3 + +# The DEFAULT_CONFIG will default to a version of +# parameters that works for backwards compatibility. +DEFAULT_CONFIG = {'kvm' : {'cpu' : "host", + 'machine' : "virt,gic-version=host"}, + '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 = 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 = CURRENT_CONFIG + args, argv = basevm.parse_args(vmcls) + qemu_path = basevm.get_qemu_path(vmcls.arch, args.build_path) + qemu_version = basevm.get_qemu_version(qemu_path) + if qemu_version < QEMU_AARCH64_MIN_VERSION: + error = "\nThis major version of QEMU {} is to old for aarch64 VMs.\n"\ + "The major version must be at least {}.\n"\ + "To continue with the current build of QEMU, "\ + "please restart with QEMU_LOCAL=1 .\n" + print(error.format(qemu_version, QEMU_AARCH64_MIN_VERSION)) + exit(1) + if qemu_version == 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="./", efi_img=""): + """Creates the appropriate pflash files + for an aarch64 VM.""" + flash0_path = get_flash_path(flash_dir, "flash0") + flash1_path = get_flash_path(flash_dir, "flash1") + fd_null = open(os.devnull, 'w') + subprocess.check_call(["dd", "if=/dev/zero", "of={}".format(flash0_path), + "bs=1M", "count=64"], + stdout=fd_null, stderr=subprocess.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_img)) + sys.stderr.write("*** please check --efi-aarch64 argument or "\ + "install qemu-efi-aarch64 package\n") + exit(3) + subprocess.check_call(["dd", "if={}".format(efi_img), + "of={}".format(flash0_path), + "conv=notrunc"], + stdout=fd_null, stderr=subprocess.STDOUT) + subprocess.check_call(["dd", "if=/dev/zero", + "of={}".format(flash1_path), + "bs=1M", "count=64"], + stdout=fd_null, stderr=subprocess.STDOUT) + fd_null.close() + +def get_pflash_args(flash_dir="./"): + """Returns a string that can be used to + boot qemu using the appropriate pflash files + for aarch64.""" + flash0_path = get_flash_path(flash_dir, "flash0") + flash1_path = get_flash_path(flash_dir, "flash1") + pflash_args_str = "-drive file={},format=raw,if=pflash "\ + "-drive file={},format=raw,if=pflash" + pflash_args = 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 = None self._genisoimage = args.genisoimage self._build_path = args.build_path + self._efi_aarch64 = args.efi_aarch64 # Allow input config to override defaults. self._config = DEFAULT_CONFIG.copy() if config != None: @@ -496,6 +497,14 @@ def get_qemu_path(arch, build_path=None): qemu_path = "qemu-system-" + arch return qemu_path +def get_qemu_version(qemu_path): + """Get the version number from the current QEMU, + and return the major number.""" + output = subprocess.check_output([qemu_path, '--version']) + version_line = output.decode("utf-8") + version_num = 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=None, help="Provide config yaml for configuration. "\ "See config_example.yaml for example.") + parser.add_option("--efi-aarch64", + default="/usr/share/qemu-efi-aarch64/QEMU_EFI.fd", + help="Path to efi image for aarch64 VMs.") parser.disable_interspersed_args() return parser.parse_args() 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 = { + 'cpu' : "cortex-a57", + 'machine' : "virt,gic-version=3", + 'install_cmds' : "apt-get update,"\ + "apt-get build-dep -y --arch-only qemu,"\ + "apt-get install -y libfdt-dev pkg-config language-pack-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 = "ubuntu.aarch64" + arch = "aarch64" + image_name = "ubuntu-18.04-server-cloudimg-arm64.img" + image_link = "https://cloud-images.ubuntu.com/releases/18.04/release/" + image_name + image_sha256="0fdcba761965735a8a903d8b88df8e47f156f48715c00508e4315c506d7d3cb1" + BUILD_SCRIPT = """ + set -e; + cd $(mktemp -d); + sudo chmod a+r /dev/vdb; + tar --checkpoint=.10 -xf /dev/vdb; + ./configure {configure_opts}; + make --output-sync {target} -j{jobs} {verbose}; + """ + def boot(self, img, extra_args=None): + aarch64vm.create_flash_images(self._tmpdir, self._efi_aarch64) + default_args = aarch64vm.get_pflash_args(self._tmpdir) + if extra_args: + extra_args.extend(default_args) + else: + extra_args = 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 change it. + extra_args.extend(["-smp", "8"]) + + # We have overridden boot() since aarch64 has additional parameters. + # Call down to the base class method. + super(UbuntuAarch64VM, self).boot(img, extra_args=extra_args) + +if __name__ == "__main__": + defaults = aarch64vm.get_config_defaults(UbuntuAarch64VM, DEFAULT_CONFIG) + sys.exit(basevm.main(UbuntuAarch64VM, defaults)) From patchwork Fri Jun 26 18:13:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 191897 Delivered-To: patch@linaro.org Received: by 2002:a54:3249:0:0:0:0:0 with SMTP id g9csp650629ecs; Fri, 26 Jun 2020 11:23:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx/hElE+N6EA3SUJZT/CRW6Zse6Jexo3/8yakU/aZ6a3YJV7Ie4VhFoB48Xk9tMPOHUrQYj X-Received: by 2002:a25:3849:: with SMTP id f70mr6998433yba.135.1593195780775; Fri, 26 Jun 2020 11:23:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593195780; cv=none; d=google.com; s=arc-20160816; b=mwMQUK6q937HRKNaU/GrkPHezQ3V0mvQcBmycobmt2R4OFpHyBR7NhtKkXip1eICOs LJd8rn+bRkhdTHT/h5BnRRSFSAmwr8ylCYm/SoHCqmtdRPn98w8Sw4JoMrSIZiLFozVP OGh+oyqL5rUklKd5cJDsKXp7n+wqwdQ9NXwjsDPKFvICLuKrnY+wXPYOvgzmhrsu5BxP KZgJhHXmQopCXExRsvgAWLYF3+pcU8FdIrZJCn6xwJiZBzq1zKLu/ytV83c4l6E26Kjw nHWglYoLrIQ5mfAw5YV9nPKbSe+WvQi4yQrMd2cXMG7OP4ot3efjF9jL31p2wFCYPD6t Yllw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=kdMIZtPe+aZda1/mXQW7aQb8KseTM0tT+oUaOxEz8I4=; b=DazUzMp1niO71hZZehcv6k+xxltCUQvWsHfIs3tgmBBrFshDba3QMNDYbcVeIy/Kjq QrItBZX/lz8Thh8e58dNNtqdjUtvXAg5/jdtMdYtxGfPOBR7/sxigDaAGar/kMnHb+G+ xwuVBnyleK9aZpKeoI/kEyJ9oWkY96v/pAof72sqp0trEkO2E1RU+Vp1MDbgGphZv+AX eMIGEWigMMY/GvGuhs7MQra7+ls407cTUnTrK3TdL/utdsrI2ZYvebFvoWI2z+5E/lSz fs8Aa6l0RT9knfxjaDc5+xMRSGvkfaN60lXJ4RMYF3xgRLheMXExDl0OVV+D/QBnI8bK xPtg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=KDjDK0+j; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id n81si24684592ybc.339.2020.06.26.11.23.00 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 26 Jun 2020 11:23:00 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=KDjDK0+j; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:41526 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jot08-0003BO-3p for patch@linaro.org; Fri, 26 Jun 2020 14:23:00 -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) 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-Received: by 2002:a1c:6102:: with SMTP id v2mr4874910wmb.6.1593195250187; Fri, 26 Jun 2020 11:14:10 -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) From: =?utf-8?q?Alex_Benn=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 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_Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, =?utf-8?q?Philippe_Mat?= =?utf-8?q?hieu-Daud=C3=A9?= , cota@braap.org, Peter Puhov , aurelien@aurel32.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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ée Signed-off-by: Alex Bennée 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 -- 2.20.1 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 := freebsd netbsd openbsd centos fedora ifneq ($(GENISOIMAGE),) IMAGES += ubuntu.i386 centos ifneq ($(EFI_AARCH64),) -IMAGES += ubuntu.aarch64 +IMAGES += ubuntu.aarch64 centos.aarch64 endif endif @@ -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 VM" + @echo " vm-build-centos.aarch64 - Build QEMU in CentOS aarch64 VM" else @echo " (to build centos/ubuntu aarch64 images use configure --efi-aarch64)" 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=vda +# System bootloader configuration +bootloader --append=" crashkernel=auto" --location=mbr --boot-drive=vda +autopart --type=plain +# Partition clearing information +clearpart --linux --initlabel --drives=vda +# Use text mode install +text +repo --name="AppStream" --baseurl=file:///run/install/repo/AppStream +# Use CDROM installation media +cdrom +# Keyboard layouts +keyboard --vckeymap=us --xlayouts='' +# System language +lang en_US.UTF-8 + +# Network information +network --bootproto=dhcp --device=enp0s1 --onboot=off --ipv6=auto --no-activate +network --hostname=localhost.localdomain +# Run the Setup Agent on first boot +firstboot --enable +# Do not configure the X Window System +skipx +# System services +services --enabled="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='auto' + +%end +%anaconda +pwpolicy root --minlen=6 --minquality=1 --notstrict --nochanges --notempty +pwpolicy user --minlen=6 --minquality=1 --notstrict --nochanges --emptyok +pwpolicy luks --minlen=6 --minquality=1 --notstrict --nochanges --notempty +%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 = { + 'cpu' : "max", + 'machine' : "virt,gic-version=max", + 'install_cmds' : "yum install -y make git python3 gcc gcc-c++ flex bison, "\ + "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=https://download.docker.com/linux/centos/docker-ce.repo,"\ + "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 = "centos.aarch64" + arch = "aarch64" + login_prompt = "localhost login:" + prompt = '[root@localhost ~]#' + image_name = "CentOS-8-aarch64-1905-dvd1.iso" + image_link = "http://mirrors.usc.edu/pub/linux/distributions/centos/8.0.1905/isos/aarch64/" + image_link += image_name + BUILD_SCRIPT = """ + set -e; + cd $(mktemp -d); + sudo chmod a+r /dev/vdb; + tar --checkpoint=.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 = "../tests/vm/centos-8-aarch64.ks" + subprocess.check_call("cp {} ./ks.cfg".format(ks_file), shell=True) + # 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 = "rootpw --plaintext {}\n" + f.write(rootpw.format(self._config["root_pass"])) + add_user = "user --groups=wheel --name={} "\ + "--password={} --plaintext\n" + f.write(add_user.format(self._config["guest_user"], + self._config["guest_pass"])) + # Add the ssh keys. + f.write("%post --log=/root/ks-post.log\n") + f.write("mkdir -p /root/.ssh\n") + addkey = 'echo "{}" >> /root/.ssh/authorized_keys\n' + addkey_cmd = addkey.format(self._config["ssh_pub_key"]) + f.write(addkey_cmd) + f.write('mkdir -p /home/{}/.ssh\n'.format(self._config["guest_user"])) + addkey = 'echo "{}" >> /home/{}/.ssh/authorized_keys\n' + addkey_cmd = 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 = 'genisoimage -output ks.iso -volid "OEMDRV" ks.cfg' + subprocess.check_call(gen_iso_img, shell=True) + + 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 == 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 = dest_img + ".tmp" + # Create an empty image. + # We will provide this as the install destination. + qemu_img_create = "qemu-img create {} 50G".format(img) + subprocess.check_call(qemu_img_create, shell=True) + + # 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 = self._download_with_cache(self.image_link) + dvd_iso = "centos-8-dvd.iso" + subprocess.check_call(["cp", "-f", os_img, dvd_iso]) + extra_args = "-cdrom ks.iso" + extra_args += " -drive file={},if=none,id=drive1,cache=writeback" + extra_args += " -device virtio-blk,drive=drive1,bootindex=1" + extra_args = extra_args.format(dvd_iso).split(" ") + self.boot(img, extra_args=extra_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=7200) + 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=None): + aarch64vm.create_flash_images(self._tmpdir, self._efi_aarch64) + default_args = aarch64vm.get_pflash_args(self._tmpdir) + if extra_args: + extra_args.extend(default_args) + else: + extra_args = 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 change it. + extra_args.extend(["-smp", "8"]) + # We have overridden boot() since aarch64 has additional parameters. + # Call down to the base class method. + super(CentosAarch64VM, self).boot(img, extra_args=extra_args) + + def build_image(self, img): + img_tmp = 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 = "sed -i 's/ONBOOT=no/ONBOOT=yes/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=(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=True) + + # If the user chooses *not* to do the second phase, + # then we will jump right to the graceful shutdown + if self._config['install_cmds'] != "": + install_cmds = 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__ == "__main__": + defaults = aarch64vm.get_config_defaults(CentosAarch64VM, DEFAULT_CONFIG) + sys.exit(basevm.main(CentosAarch64VM, defaults)) From patchwork Fri Jun 26 18:13:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 191905 Delivered-To: patch@linaro.org Received: by 2002:a54:3249:0:0:0:0:0 with SMTP id g9csp653297ecs; Fri, 26 Jun 2020 11:27:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy3QJYbnYWVUh2F5rFt7t6vEi1d6rjWujs/F+nb+GNnwDh3ARjQ+PERJYiYhzKfDeXV0Twi X-Received: by 2002:a25:aa89:: with SMTP id t9mr7375157ybi.348.1593196027467; Fri, 26 Jun 2020 11:27:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593196027; cv=none; d=google.com; s=arc-20160816; b=n1E1fLiRjxoYjSaGjUHuxXQQ288fcMWcowPWnRQDGYcZ3zUcvW174D1x9FrvS3FiIS mapVDYDsoSFt5SZgS8atjy+UnMQcJ3yoldkSACeP1sv0f92q9IPR1KFtRjyiTxa17NcW uyuQdtpmyThsuhXKXzLOBqTi29qDUj9RL9BfXOvRDXPlotO9efCCVGQXofFpPTtjuipi mdzlKqGYyzzLT10EORr+RPhTFo90WHR0SahIIEGP9nP8KdPq9qwz9LqZjtLYChUZBi3E Ip1PYeKEQ1WNJb7K3zE291EadjnVmA72mtT/P6wUgGD6pGBlSU0ycbeLl2YRZiMPCiH5 vizA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=qDw5tmNjtaEA2MrxzXTWX9WRb/d3hDPxln94PjTXX2k=; b=ygIdOvOz6+2Q2T1Rm5aKUI81HjIs+BzY/jyu0rbgA0MTBvYHRXS82qXDIWrPCYs9tf 0JXO0TIY0Uzn7Cu/WVaCd+nrN95f69d06p/jIvK5LFvHS3RtHrPo53QkQqOo6snWa85g 5SR2D0lUH3Gge57rz2d+jLFLJEyhALyJM52LGrDObylFBfQqMFOh6ZqbFgDubWhbFIge Wo1icMu/1mXI0RO9zZjGfqJH7fgNLLXf7u53ggpF6bz7rLv4XO1Ug3GggQQBmollB717 irYadfXH8DCSo1p/B7v+p3gkJM/xKRNcbq/BYoJQXu+EyHh8dGuTscPFW5LMsbXZ84wU eiyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=EQyjrExP; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id v11si25670895ybm.450.2020.06.26.11.27.07 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 26 Jun 2020 11:27:07 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=EQyjrExP; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:58300 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jot46-0001co-Qe for patch@linaro.org; Fri, 26 Jun 2020 14:27:06 -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) 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-Received: by 2002:a1c:a986:: with SMTP id s128mr4999454wme.121.1593195253695; Fri, 26 Jun 2020 11:14:13 -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) From: =?utf-8?q?Alex_Benn=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 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_Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, =?utf-8?q?Philippe_Mat?= =?utf-8?q?hieu-Daud=C3=A9?= , cota@braap.org, Peter Puhov , aurelien@aurel32.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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ée Message-Id: <20200601211421.1277-8-robert.foley@linaro.org> --- 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(-) -- 2.20.1 Reviewed-by: Philippe Mathieu-Daudé 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=timeout) 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=None, sha512sum=None): def check_sha256sum(fname): if not sha256sum: @@ -239,13 +232,13 @@ class BaseVM(object): return r def ssh(self, *cmd): - return self._ssh_do(self.GUEST_USER, cmd, False) + return self._ssh_do(self._config["guest_user"], cmd, False) def ssh_root(self, *cmd): return self._ssh_do("root", cmd, False) def ssh_check(self, *cmd): - self._ssh_do(self.GUEST_USER, cmd, True) + self._ssh_do(self._config["guest_user"], cmd, True) 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): 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"]) 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") 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"]) self.console_wait_send("'b' to begin install", "b\n") @@ -150,12 +150,13 @@ class FedoraVM(basevm.BaseVM): # setup qemu user prompt = " ~]$" - 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") # setup root user prompt = " ~]#" - self.console_ssh_init(prompt, "root", self.ROOT_PASS) + self.console_ssh_init(prompt, "root", self._config["root_pass"]) self.console_sshd_config(prompt) # 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): # 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"]) 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): # setup qemu user prompt = "$" - 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") # setup root user prompt = "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) # 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"]) 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"]) 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): # setup qemu user prompt = "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") # setup root user prompt = "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) # 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") 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"]) 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): # setup qemu user prompt = "$" - 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") # setup root user prompt = "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) # setup virtio-blk #1 (tarfile) From patchwork Fri Jun 26 18:13:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 191900 Delivered-To: patch@linaro.org Received: by 2002:a54:3249:0:0:0:0:0 with SMTP id g9csp651513ecs; Fri, 26 Jun 2020 11:24:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzhrxLHZmbWiBAVyXbh7vf2w60XZBPvkSvYgZRTEd1xpYeoxpkjo/zR9TZoqnbITyf4Oxow X-Received: by 2002:a25:44e:: with SMTP id 75mr7453245ybe.388.1593195862114; Fri, 26 Jun 2020 11:24:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593195862; cv=none; d=google.com; s=arc-20160816; b=PXBvKDcTiVrQapG94piBnxuKwha85cI51s4UoJv1ihdNVC16KbVcIfnkKta9hXpchu Mmlc21z7fox1eCVCCyHBEBqvf97Iz+8+xxhymdccwQKX3mCw+e5Y3P1MLLL8As7k/xm3 P8oAva0dgC5rQQMwEJRsgF6lAKVIe0UyEI68HZfleHzjiDOHUhs4Wap5Hh1we1l0vFuf eb0d6hOSp73wflfDVihuNIyFYVyx6WmET5ju5505+gE5n4eHzm2D2RaWoiDApe9Uvu4p yU5Us27FwBNMyguIrV3L1vBNn4Doi0lUPTTk6lLeHDBxsgk0Cxl1/s014wS46L0EMV9F 2SfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=SfCKKjXRpSzktD2zHuCdVYnzBzWod3odSIiX8dUA3RA=; b=Ou0AAv7yDn4YwwtghrKnJbxr2zsUq2NKTRfJ72m+NCturt3xqmaWC/foV7qfSFpmLe qYVbP3CzP8xx4fMrNAqikt1QWsIrLUutThnp68WaL41bDtvxdnRda9+CrQd9uMw6D+Z0 4qLD9EW4vr5mfBxnYpD40Qc9TQgmBaqsTdmNQIyyOD4bnVAESwZ9totQwCy8Vgl/8+pc SBAnbSsGLlFJM9dl2VwjMyRpmWj7p3ykZOJtXk+TyrUOKrylbs9Ihzb0ypXuTnT0j8fo rEyd3D2TFl5lCYPjPNGoGdgjJ3ycFAkLTu3xHbBsQQd8/lvtYXToTq2Y7+C4m00wuDIL ve8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=VZmTIHb8; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id o20si25218504ybg.371.2020.06.26.11.24.21 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 26 Jun 2020 11:24:22 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=VZmTIHb8; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:49764 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jot1R-0006Y1-Dn for patch@linaro.org; Fri, 26 Jun 2020 14:24:21 -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) 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-Received: by 2002:a1c:bb44:: with SMTP id l65mr4965888wmf.51.1593195252530; Fri, 26 Jun 2020 11:14:12 -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) From: =?utf-8?q?Alex_Benn=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 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_Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, =?utf-8?q?Philippe_Mat?= =?utf-8?q?hieu-Daud=C3=A9?= , cota@braap.org, Cleber Rosa , Peter Puhov , aurelien@aurel32.net, Eduardo Habkost Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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ée Tested-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée 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 -- 2.20.1 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=None): + self._recv_timeout_sec = 300 + self._buffer = deque() + self._asyncore_thread = None + self._sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) + self._sock.connect(address) + self._logfile = None + if file: + self._logfile = open(file, "w") + asyncore.dispatcher.__init__(self, sock=self._sock) + self._open = 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 = threading.Thread(target=asyncore.loop, + kwargs={'timeout':1}) + self._asyncore_thread.daemon = 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 = False + asyncore.dispatcher.close(self) + if self._asyncore_thread is not None: + thread, self._asyncore_thread = self._asyncore_thread, None + thread.join() + if self._logfile: + self._logfile.close() + self._logfile = None + + def handle_read(self): + """process arriving characters into in memory _buffer""" + try: + data = 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 = 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=1, sleep_delay_s=0.1): + """Return chars from in memory buffer""" + start_time = time.time() + while len(self._buffer) < n: + time.sleep(sleep_delay_s) + elapsed_sec = time.time() - start_time + if elapsed_sec > self._recv_timeout_sec: + raise socket.timeout + chars = ''.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 = 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 from . import qmp @@ -75,7 +76,8 @@ class QEMUMachine: def __init__(self, binary, args=None, wrapper=None, name=None, test_dir="/var/tmp", monitor_address=None, - socket_scm_helper=None, sock_dir=None): + socket_scm_helper=None, sock_dir=None, + drain_console=False, console_log=None): ''' Initialize a QEMUMachine @@ -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 sock) + @param console_log: (optional) path to console log file + @param drain_console: (optional) True to drain console socket to buffer @note: Qemu process is not started until launch() is used. ''' if args is None: @@ -122,6 +127,12 @@ class QEMUMachine: self._console_address = None self._console_socket = None self._remove_files = [] + self._console_log_path = console_log + if self._console_log_path: + # In order to log the console, buffering needs to be enabled. + self._drain_console = True + else: + self._drain_console = drain_console 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 = socket.socket(socket.AF_UNIX, - socket.SOCK_STREAM) - self._console_socket.connect(self._console_address) + if self._drain_console: + self._console_socket = ConsoleSocket(self._console_address, + file=self._console_log_path) + else: + self._console_socket = socket.socket(socket.AF_UNIX, + socket.SOCK_STREAM) + self._console_socket.connect(self._console_address) return self._console_socket From patchwork Fri Jun 26 18:13:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 191892 Delivered-To: patch@linaro.org Received: by 2002:a54:3249:0:0:0:0:0 with SMTP id g9csp648041ecs; Fri, 26 Jun 2020 11:19:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwzBF8zyZr9i7QfuJJScfQbsGNyNclGlU5Lm4FsksV8GRE1NIk1YCV08jyUt9HlEPkUZp+H X-Received: by 2002:a25:e747:: with SMTP id e68mr6662029ybh.341.1593195558869; Fri, 26 Jun 2020 11:19:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593195558; cv=none; d=google.com; s=arc-20160816; b=CDf0NoBweyoUtmpFqPnJqZojeNuirkaWEM9AoR6PhGZWgA5FgKry1zDQkzAabmIB1K kVBje69a+K7G9KXy7UxR2MCp9aor5AMk4xf7vqpBJOdkPNrRELouLwytTnhN/Px+9Eup nCHmnxjOF9lizbgTxhdFTcoIEAgusRjkLDiZzfTRT6OFrsbmjfUqFWqCodmhWY0z6mcE QYQLi0dmrbKxdZTW6L8PoGQ7YeVj5cjmxJ9v3MaUNxi9Bhq6bOMvLEaeSCcemOaM7wH6 N/ETEi0MKTiWeFmkRWpWH43cSHoVO1ntf/D7vrgznR0YeyFN7DQz+UWGXrdgTksN9/KQ Yq7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=5xSn2L6kzBKcKjTR8zPwxbT757SBhdGuGZ/3k/jBdz8=; b=hCNdxXEecmX4D8C/P1P6TdWf1Wvyw63qlMhOqTZYkvfDDkYJ22i2nO622bnQogPu/q gIsJr6dI1n8Q6CmkXbNdyQcCd9qWtLhEu00/ts8CbC2boWg5os/yzubmL+a7/SUUDHU3 EIUIJqtz2ZDrZzpWe6oer+/3GxiJPDajvcwiU+HnMxrQvumi+ccY+E/qvIqpfwktUyAc WKXfmX9amU7hYKf9Arf3f2eLxkmf7AYp6NGQVnF+pC3tajC95W8Fcfh52oL8OVIuhaE2 yY7xZfUAr7DcTOKzrQayHTZXhOlWgX8SYt/W8lVppTDqKUDlO5EzxH/c6uvSNqgk+cfR S83g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=XrDg1n0P; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id x13si4092333ybt.333.2020.06.26.11.19.18 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 26 Jun 2020 11:19:18 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=XrDg1n0P; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:55388 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1joswY-0005cH-9A for patch@linaro.org; Fri, 26 Jun 2020 14:19:18 -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) 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-Received: by 2002:adf:e9c4:: with SMTP id l4mr5248339wrn.9.1593195255648; Fri, 26 Jun 2020 11:14:15 -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) From: =?utf-8?q?Alex_Benn=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 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_Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, =?utf-8?q?Philippe_Mat?= =?utf-8?q?hieu-Daud=C3=A9?= , cota@braap.org, Peter Puhov , aurelien@aurel32.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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=1 will now log the output to a file. Signed-off-by: Robert Foley Reviewed-by: Peter Puhov Acked-by: Alex Bennée Signed-off-by: Alex Bennée 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(-) -- 2.20.1 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="..."' @echo " J=[0..9]* - Override the -jN parameter for make commands" @echo " DEBUG=1 - Enable verbose output on host and interactive debugging" + @echo " LOG_CONSOLE=1 - Log console to file in: ~/.cache/qemu-vm " @echo " V=1 - Enable verbose ouput on host and guest commands" @echo " QEMU_LOCAL=1 - Use QEMU binary local to this build." @echo " QEMU=/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']) self.debug = args.debug + self._console_log_path = None + if args.log_console: + self._console_log_path = \ + os.path.join(os.path.expanduser("~/.cache/qemu-vm"), + "{}.install.log".format(self.name)) self._stderr = sys.stderr self._devnull = open(os.devnull, "w") if self.debug: @@ -271,7 +276,13 @@ class BaseVM(object): args += self._data_args + extra_args + self._config['extra_args'] logging.debug("QEMU args: %s", " ".join(args)) qemu_path = get_qemu_path(self.arch, self._build_path) - guest = QEMUMachine(binary=qemu_path, args=args) + + # Since console_log_path is only set when the user provides the + # log_console option, we will set drain_console=True so the + # console is always drained. + guest = QEMUMachine(binary=qemu_path, args=args, + console_log=self._console_log_path, + drain_console=True) guest.set_machine(self._config['machine']) guest.set_console() try: @@ -285,6 +296,8 @@ class BaseVM(object): raise atexit.register(self.shutdown) self._guest = guest + # Init console so we can start consuming the chars. + self.console_init() usernet_info = guest.qmp("human-monitor-command", command_line="info usernet") self.ssh_port = None @@ -296,7 +309,9 @@ class BaseVM(object): raise Exception("Cannot find ssh port from 'info usernet':\n%s" % \ usernet_info) - def console_init(self, timeout = 120): + def console_init(self, timeout = None): + if timeout == None: + timeout = self.socket_timeout vm = self._guest vm.console_socket.settimeout(timeout) self.console_raw_path = os.path.join(vm._temp_dir, @@ -578,6 +593,8 @@ def parse_args(vmcls): parser.add_option("--efi-aarch64", default="/usr/share/qemu-efi-aarch64/QEMU_EFI.fd", help="Path to efi image for aarch64 VMs.") + parser.add_option("--log-console", action="store_true", + help="Log console to file.") parser.disable_interspersed_args() return parser.parse_args() From patchwork Fri Jun 26 18:13:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 191877 Delivered-To: patch@linaro.org Received: by 2002:a54:3249:0:0:0:0:0 with SMTP id g9csp644735ecs; Fri, 26 Jun 2020 11:14:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwqwCz7FAMhPiP5DxYSFj8I3f6Ju3hFz7c/U1SrlgrAcSB5yLOibsMTF53kOXV+4Odoj2qr X-Received: by 2002:a25:d40b:: with SMTP id m11mr6916598ybf.66.1593195283134; Fri, 26 Jun 2020 11:14:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593195283; cv=none; d=google.com; s=arc-20160816; b=V4mgx4sfO3lKzOg/oleDF8kokW6xoB1U5GV+YzdVwFXXnmWJCZOfJtnjmkNikc+ccE mMiLSAqsu5JxCtHy/njz/4UyyS/9L9R8VIdB5Vez3rFmecfef72hr5FEJpPvx2tnPAg1 Aa4RVFXoR6qh6+hiV6eGLeSFX/3rTdfEEOaQcDSArm/ZzXoz5GMhPXb7bdTFSm8ICJ3L bCX9+th1y/O0tGbXXUBKEyKpZ/bGodCiMjfPdodoLfV7ysrAstJODuYBqdIVEXIfYsWV XuLZcHvXbZ4Z4LuBQu7109NbC6Yvx5k9h6wmj5StOAaLzKL5pQXALaBLyo5n+5c0wXx/ CfxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=m68QvK0yLbiDVQVnhRt3C913qF+3j7rcYCrzMUVv6YU=; b=w8IKMxAvSd9aRnbjYG0YVlZZwmmd7rqgLTGBw5qIrqGDxfI6KUn9xquZ3O6ujHFd6A JoNU/4pwnt3NkUJ1Ne4kYmmKqEWsVVz9Hj7g/EXFqnethAUG1OSyM+yVHo1E66vfXPUf x/7LTGoblZyN66CXqrzW0mJlgn2mZmTTb1O34Cw7PLQaEpFaHkK493pTKnfmZOd76cA0 +3f3mAJHwhH0nsSht9/GRqEr7nFNitMBsgxNFD1qOtOkOcwe4oHxLdlJ/5lCEbl/6iEl JTXVRsG4tx3YGCwkUhUeBqd6a3ODvK7o8R3LefRsBjzQWH+o/iISnKMEdg3hFOE9V7rm LwIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=BmMQa0Wj; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id e139si4426213ybh.489.2020.06.26.11.14.42 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 26 Jun 2020 11:14:43 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=BmMQa0Wj; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:39792 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1joss6-0007b5-Il for patch@linaro.org; Fri, 26 Jun 2020 14:14:42 -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) 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-Received: by 2002:a7b:cb56:: with SMTP id v22mr4836523wmj.180.1593195257581; Fri, 26 Jun 2020 11:14:17 -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) From: =?utf-8?q?Alex_Benn=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 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_Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, =?utf-8?q?Philippe_Mat?= =?utf-8?q?hieu-Daud=C3=A9?= , cota@braap.org, aurelien@aurel32.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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ée Reviewed-by: Daniel P. Berrangé Reviewed-by: Robert Foley --- v2 - add explicit parser.add_argument("commands", nargs="*") --- tests/vm/basevm.py | 93 ++++++++++++++++++++++++---------------------- 1 file changed, 48 insertions(+), 45 deletions(-) -- 2.20.1 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 - parser = optparse.OptionParser( - description="VM test utility. Exit codes: " - "0 = success, " - "1 = command line error, " - "2 = environment initialization failed, " - "3 = test command failed") - parser.add_option("--debug", "-D", action="store_true", - help="enable debug output") - parser.add_option("--image", "-i", default="%s.img" % vmcls.name, - help="image file name") - parser.add_option("--force", "-f", action="store_true", - help="force build image even if image exists") - parser.add_option("--jobs", type=int, default=get_default_jobs(), - help="number of virtual CPUs") - parser.add_option("--verbose", "-V", action="store_true", - help="Pass V=1 to builds within the guest") - parser.add_option("--build-image", "-b", action="store_true", - help="build image") - parser.add_option("--build-qemu", - help="build QEMU from source in guest") - parser.add_option("--build-target", - help="QEMU build target", default="check") - parser.add_option("--build-path", default=None, - help="Path of build directory, "\ - "for using build tree QEMU binary. ") - parser.add_option("--interactive", "-I", action="store_true", - help="Interactively run command") - parser.add_option("--snapshot", "-s", action="store_true", - help="run tests with a snapshot") - parser.add_option("--genisoimage", default="genisoimage", - help="iso imaging tool") - parser.add_option("--config", "-c", default=None, - help="Provide config yaml for configuration. "\ - "See config_example.yaml for example.") - parser.add_option("--efi-aarch64", - default="/usr/share/qemu-efi-aarch64/QEMU_EFI.fd", - help="Path to efi image for aarch64 VMs.") - parser.add_option("--log-console", action="store_true", - help="Log console to file.") - parser.disable_interspersed_args() + parser = argparse.ArgumentParser( + formatter_class=argparse.ArgumentDefaultsHelpFormatter, + description="Utility for provisioning VMs and running builds", + epilog="""Remaining arguments are passed to the command. + Exit codes: 0 = success, 1 = command line error, + 2 = environment initialization failed, + 3 = test command failed""") + parser.add_argument("--debug", "-D", action="store_true", + help="enable debug output") + parser.add_argument("--image", "-i", default="%s.img" % vmcls.name, + help="image file name") + parser.add_argument("--force", "-f", action="store_true", + help="force build image even if image exists") + parser.add_argument("--jobs", type=int, default=get_default_jobs(), + help="number of virtual CPUs") + parser.add_argument("--verbose", "-V", action="store_true", + help="Pass V=1 to builds within the guest") + parser.add_argument("--build-image", "-b", action="store_true", + help="build image") + parser.add_argument("--build-qemu", + help="build QEMU from source in guest") + parser.add_argument("--build-target", + help="QEMU build target", default="check") + parser.add_argument("--build-path", default=None, + help="Path of build directory, "\ + "for using build tree QEMU binary. ") + parser.add_argument("--interactive", "-I", action="store_true", + help="Interactively run command") + parser.add_argument("--snapshot", "-s", action="store_true", + help="run tests with a snapshot") + parser.add_argument("--genisoimage", default="genisoimage", + help="iso imaging tool") + parser.add_argument("--config", "-c", default=None, + help="Provide config yaml for configuration. "\ + "See config_example.yaml for example.") + parser.add_argument("--efi-aarch64", + default="/usr/share/qemu-efi-aarch64/QEMU_EFI.fd", + help="Path to efi image for aarch64 VMs.") + parser.add_argument("--log-console", action="store_true", + help="Log console to file.") + parser.add_argument("commands", nargs="*", help="""Remaining + commands after -- are passed to command inside the VM""") + return parser.parse_args() def main(vmcls, config=None): try: if config == None: config = {} - args, argv = parse_args(vmcls) - if not argv and not args.build_qemu and not args.build_image: + args = parse_args(vmcls) + if not args.commands and not args.build_qemu and not args.build_image: print("Nothing to do?") return 1 config = parse_config(config, args) @@ -619,12 +622,12 @@ def main(vmcls, config=None): if args.build_qemu: vm.add_source_dir(args.build_qemu) cmd = [vm.BUILD_SCRIPT.format( - configure_opts = " ".join(argv), + configure_opts = " ".join(args.commands), jobs=int(args.jobs), target=args.build_target, verbose = "V=1" if args.verbose else "")] else: - cmd = argv + cmd = args.commands img = args.image if args.snapshot: img += ",snapshot=on" From patchwork Fri Jun 26 18:13:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 191896 Delivered-To: patch@linaro.org Received: by 2002:a54:3249:0:0:0:0:0 with SMTP id g9csp650008ecs; Fri, 26 Jun 2020 11:22:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxEYQE0su3MHrDRXTavdLQxGXVX/Emv/lCoJri25/Dp9ss+K+3ckhq9Xy97aH3B7g+29pUK X-Received: by 2002:a25:8807:: with SMTP id c7mr5491006ybl.210.1593195727679; Fri, 26 Jun 2020 11:22:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593195727; cv=none; d=google.com; s=arc-20160816; b=awwFrDdx9FtSda7ShAvG9OlrM5C/DdyO3nO3w+0p9Sxr05MB4u/C5pi1tLI7f2mk1I CrtOaPddVzJQgOVLjwtwIBqgiUUbXluO63ge6ypbSqhVtRkp+BibfWx62lgv8kl2OHRJ YoJFN2s/3etsfyFoaiWr+eNI0ONNKmyOcQ1/A+UyVE6/CcYRTz8fPFQVnHTw2QQWqhox QEPDb1fnI3lNJPIfBxCyvJNwBiJ41Cm42QC6LWN42vPsFHtQyTKjQVl4OdtUdTCC4Zqz qItpHuwLtSfOoZ7DQ9xNU9kGylfaLj7QcEc4wBvcuGckQa6V7W5je65UeIaFYe2QVJuC 1yKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=efB7wfcutdBc5W3t5fL1ob0gckNKfFStml2EZYTXVio=; b=Lpt7sZ2QCDam6JrIbWz+LW+qPzx4wZ42/6gGXw0QdHWLp7BWLVnMxgOgz6+kaT+19C AEM5qtxjabFv9tY15nMGg8GEfdTl/udFk3SXEWX+hsdOw3ztOyVEevGg1V44ktHv0oka T6Vy6+L+imYVW9K4u4Cjfs1LfdmwUB5LzkI/amvmwB2wdtdpanUW3potGOFsfS0JEUI4 hfNzXjdKemRz18J1E8eSinm2/EbwsJolSyoOq2sET9gIeN4Z6VUHDxN2Gy4slmRUwCQA oKDgRmp7zeuDz98LHyzWXeJZyMPo+BXYiCBBazdLcWYqbSvI3qcJOzvfJSwrd8mM0OWj ymyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=hRDwUXvV; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id w191si1658675ybe.103.2020.06.26.11.22.07 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 26 Jun 2020 11:22:07 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=hRDwUXvV; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:37372 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1joszH-0001US-3q for patch@linaro.org; Fri, 26 Jun 2020 14:22:07 -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) 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-Received: by 2002:a1c:98cc:: with SMTP id a195mr4654221wme.89.1593195259961; Fri, 26 Jun 2020 11:14:19 -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) From: =?utf-8?q?Alex_Benn=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 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_Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, =?utf-8?q?Philippe_Mat?= =?utf-8?q?hieu-Daud=C3=A9?= , cota@braap.org, aurelien@aurel32.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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ée Reviewed-by: Robert Foley --- tests/vm/basevm.py | 6 ++++++ 1 file changed, 6 insertions(+) -- 2.20.1 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 == "x86_64" and \ + vmcls.arch in ["aarch64", "x86_64", "i386"]: + # MTTCG is available on these arches and we can allow more cores. + # 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 From patchwork Fri Jun 26 18:13:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 191898 Delivered-To: patch@linaro.org Received: by 2002:a54:3249:0:0:0:0:0 with SMTP id g9csp650797ecs; Fri, 26 Jun 2020 11:23:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy7GgEb7rk2dN8s3YLPNN+gTGZFZt2gHIsrCkazMx3AqimgVkYAeUxaFk9+6Xv32LG8MaMe X-Received: by 2002:a25:be05:: with SMTP id h5mr7086568ybk.131.1593195792229; Fri, 26 Jun 2020 11:23:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593195792; cv=none; d=google.com; s=arc-20160816; b=tgidPKGL+tbT/iCjeFbSuCG1zJRN8X3N70R1TlC+X4X4kttg7MgUfr/sE9hH0FIdch mtaWMB1lvs2SchRyDUx6Nkml9+6/BKT6RWP7l4rfNUm90IW7z49xVHXsxA4ehezUP3gf mBno0lXYdKDl3tW10f+8g0jpZ6w3eWRlCRryl0hIg/Rd+AAJRwZZ1FGZW+5y2vo7TJql RBqnJWuGgF/toer5OX/sAr21dEeOOud9NEqszLztUPtYL/GgmMKsXiSrtCCFztkKdeF9 ejtoAH3aoX58VVgYgyTkid5uhD9ksISO47NaVRYQmfsNrFz2iTD6DxWQXyfKyEmCmu4G GbKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=UsvCJ1FtgsYHjIIgU0bFzUSnvljWkIkb9Subsb2kO6E=; b=HShTNYqauIKl3jmMcC5Vd4AhEFUNJ9KOBWcG4CXslj+Jq6bHhNz+bn/nAp4q3gGRFH /kK5p1K8kz36urx0MQRTT6J/Gt7LBXiM0YpRW23j1nL/mTxVXMRlMDd/V4Yx4Vigpsms 432i/5UqBdRDU7gphAx3C0oJOTZBzpSaR5rpp0abfSelnrHRQcofQvse9CUbz1NmiCnC xKRtX/Jr4Gr08ITu6PxQnfagk9OYu08ruBYm0uKaLNLhpaWnBmEj+hIwyiiwTQ/9SN1S u+BvJ1hODNn5fiW89tH/hqn/QbQXms5AidSTsFMLt2OeKcwbzUU65fRS5bbHIB7cTvNi aumg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=HI4KS185; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id j190si26690087ybg.386.2020.06.26.11.23.12 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 26 Jun 2020 11:23:12 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=HI4KS185; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:42452 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jot0J-0003YD-HX for patch@linaro.org; Fri, 26 Jun 2020 14:23:11 -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) 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-Received: by 2002:a1c:2e47:: with SMTP id u68mr4929167wmu.45.1593195774898; Fri, 26 Jun 2020 11:22:54 -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) From: =?utf-8?q?Alex_Benn=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 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_Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, =?utf-8?q?Philippe_Mat?= =?utf-8?q?hieu-Daud=C3=A9?= , cota@braap.org, aurelien@aurel32.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Reported-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée Suggested-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé --- tests/docker/common.rc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.20.1 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 [ $# == 0 ]; then INVOCATION="check" else INVOCATION="$@" From patchwork Fri Jun 26 18:13:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 191908 Delivered-To: patch@linaro.org Received: by 2002:a54:3249:0:0:0:0:0 with SMTP id g9csp654369ecs; Fri, 26 Jun 2020 11:28:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwuyilXJuYZEdEoKZL2T9+sahMj/Kh3Ud+PcNaOaeIYx0J1ZLx2Cj1ilDYl3JtFc/IMLaCz X-Received: by 2002:a25:3c85:: with SMTP id j127mr7126678yba.359.1593196138568; Fri, 26 Jun 2020 11:28:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593196138; cv=none; d=google.com; s=arc-20160816; b=cI0Y4vcHhWtF2zCHlMTfLMInsF7gk7rV+jFCegDim7a4cYqmpnDZAJriNT+5v+iJ1j wxim7MXIkAvQPA3IqSRcyz1SyeKMhkHRoFduIXum9XQ+njrGL4L4p5sSUCBDxCa7AYlf uM9ZRyn0CnW+sxkN7ADtt7T0xmblHNB4yw7kD6lrQ4lx8bWJ7f0o8+NCZDVSg5/SGQke C0L0TCskivhwyrPnKulVsuAEa0vYAHkF8fIn1n6w7XdJKeW+qfj3UuHbesuJ4f9t5D8S Lbw3Jvm8CWgvyjXl8XH+cAt17bYR3EIl3fKGku0hpcyBYtZeXDWXHGKOFbWZXJy8SaoB q21g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=7QeBZdYC9ESv3VbweN3wgD6BXczlT/siekZ5tWA8J1E=; b=0vrdwt308R/pGVUabbTWuwgY798aBPabAiTdoEIihJVm0/JktjTpmRrNjjSgdSHHRd AooQ1Q991JkBnSGIRF66CHwhS+waTTgag447ukp4jx7vZ38KkaTYu+KcLDo5IjMFf7mA EyQYQANNemNxhDXb6b1C1MS5G43bS1Z6te6ZQLBw7uLprOOvYzTwWgoaZ96ePirB0+95 4XGCuHH5A/Ay5trAeXcdx8/9NaxlJyOa0x0bGoQe/J35bPd5fPC7IpSHej+ffEFfs5XT DC3YvP1VhZL5R2Zki0zQJ4RwGSV9Qy/hyTGi6ki/E3uTD+dpVfb0QnszynxlZSPj8rPu Wq5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=vaI3vD6t; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d18si27713274ybc.349.2020.06.26.11.28.58 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 26 Jun 2020 11:28:58 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=vaI3vD6t; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:39864 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jot5t-0005cy-VT for patch@linaro.org; Fri, 26 Jun 2020 14:28:57 -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) 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-Received: by 2002:a7b:c246:: with SMTP id b6mr5048226wmj.161.1593195778728; Fri, 26 Jun 2020 11:22:58 -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) From: =?utf-8?q?Alex_Benn=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 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_Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, =?utf-8?q?Philippe_Mat?= =?utf-8?q?hieu-Daud=C3=A9?= , cota@braap.org, aurelien@aurel32.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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é Signed-off-by: Alex Bennée --- 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(-) -- 2.20.1 Reviewed-by: Philippe Mathieu-Daudé 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 = $(shell echo '$@' | sed -e 's/docker-run-\([^@]*\)@\(.*\)/\1/') docker-run-%: IMAGE = $(shell echo '$@' | sed -e 's/docker-run-\([^@]*\)@\(.*\)/\2/') docker-run-%: - @$(MAKE) docker-run TEST=$(CMD) IMAGE=qemu:$(IMAGE) + @$(MAKE) docker-run TEST=$(CMD) IMAGE=qemu/$(IMAGE) 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()) == 0 or l.startswith("#"): continue - from_pref = "FROM qemu:" + from_pref = "FROM qemu/" if l.startswith(from_pref): # TODO: Alternatively we could replace this line with "FROM $ID" # where $ID is the image's hex id obtained with diff --git a/tests/docker/dockerfiles/debian-alpha-cross.docker b/tests/docker/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 RUN apt update && \ DEBIAN_FRONTEND=noninteractive eatmydata \ diff --git a/tests/docker/dockerfiles/debian-amd64-cross.docker b/tests/docker/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ée # Add the foreign architecture we want and install dependencies diff --git a/tests/docker/dockerfiles/debian-amd64.docker b/tests/docker/dockerfiles/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é RUN apt update && \ diff --git a/tests/docker/dockerfiles/debian-arm64-cross.docker b/tests/docker/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 # 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/tests/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 # 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/docker/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é # Add the foreign architecture we want and install dependencies diff --git a/tests/docker/dockerfiles/debian-armhf-cross.docker b/tests/docker/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 # 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/docker/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 RUN apt update && \ DEBIAN_FRONTEND=noninteractive eatmydata \ diff --git a/tests/docker/dockerfiles/debian-m68k-cross.docker b/tests/docker/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 RUN apt update && \ DEBIAN_FRONTEND=noninteractive eatmydata \ diff --git a/tests/docker/dockerfiles/debian-mips-cross.docker b/tests/docker/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 MAINTAINER Philippe Mathieu-Daudé diff --git a/tests/docker/dockerfiles/debian-mips64-cross.docker b/tests/docker/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 RUN apt update && \ DEBIAN_FRONTEND=noninteractive 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. # -FROM qemu:debian10 +FROM qemu/debian10 MAINTAINER Philippe Mathieu-Daudé diff --git a/tests/docker/dockerfiles/debian-mipsel-cross.docker b/tests/docker/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 MAINTAINER Philippe Mathieu-Daudé diff --git a/tests/docker/dockerfiles/debian-powerpc-cross.docker b/tests/docker/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 RUN apt update && \ DEBIAN_FRONTEND=noninteractive eatmydata \ diff --git a/tests/docker/dockerfiles/debian-ppc64-cross.docker b/tests/docker/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 RUN apt update && \ DEBIAN_FRONTEND=noninteractive eatmydata \ diff --git a/tests/docker/dockerfiles/debian-ppc64el-cross.docker b/tests/docker/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 # 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/docker/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 RUN apt update && \ DEBIAN_FRONTEND=noninteractive eatmydata \ diff --git a/tests/docker/dockerfiles/debian-s390x-cross.docker b/tests/docker/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 # Add the s390x architecture RUN dpkg --add-architecture s390x diff --git a/tests/docker/dockerfiles/debian-sh4-cross.docker b/tests/docker/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 RUN apt update && \ DEBIAN_FRONTEND=noninteractive eatmydata \ diff --git a/tests/docker/dockerfiles/debian-sparc64-cross.docker b/tests/docker/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 RUN apt update && \ DEBIAN_FRONTEND=noninteractive eatmydata \ diff --git a/tests/docker/dockerfiles/debian-tricore-cross.docker b/tests/docker/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 MAINTAINER Philippe Mathieu-Daudé diff --git a/tests/docker/dockerfiles/debian-win32-cross.docker b/tests/docker/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 MAINTAINER Philippe Mathieu-Daudé diff --git a/tests/docker/dockerfiles/debian-win64-cross.docker b/tests/docker/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 MAINTAINER Philippe Mathieu-Daudé diff --git a/tests/docker/dockerfiles/debian9-mxe.docker b/tests/docker/dockerfiles/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 MAINTAINER Philippe Mathieu-Daudé From patchwork Fri Jun 26 18:13:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 191903 Delivered-To: patch@linaro.org Received: by 2002:a54:3249:0:0:0:0:0 with SMTP id g9csp652609ecs; Fri, 26 Jun 2020 11:26:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw0kxyVOnfzkvy42EoiPx+cS4XwCHQvhlEdoJOKPDJvxjR8xfDdQOkVtxwbBb4ki+/gXhlV X-Received: by 2002:a25:aaf1:: with SMTP id t104mr7321350ybi.163.1593195963799; Fri, 26 Jun 2020 11:26:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593195963; cv=none; d=google.com; s=arc-20160816; b=BnWOXU8yCKMHIgxfvFsSDcATBVJXrE5c839gWKv2Gmt03Gs9xQKxEHugae0YAEhjOh RHinKKxcGxXOFjMU4RGyXg7RX3HJLnOkCOA+iQt66PR7veqSpJnI2MztTyjpY4GvYzCF KK377ZJxDFkO0MW9k0DE4q85LiJVgJ+BS6hJLSN+czla7jg8yfdK+FUC9H+vI4s3fqN5 zIxUCIh4C/T3/g8ca/icNvHK9zj9woYcfZaHeh1ulAnOCSy//8FpuxuD2J1YKam/bd+f ER8e+PYoLVp5BsPl+na9gJKK7ngmFmIMfRdS6+r3Ayv0e5VknWxBlrIb64dNj57zQ9YO 4psg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=XJD1GL90UWNycRg4BT4TsZXTpQO4+SzPpVo+RlIQlho=; b=Z8AiXnFfpTb61H1JB2UWHFOaNpdJik2IJhmS2JpafDeFC4JmmIEm89Kx/sWIuCz87f xJoHqR5Bu9K6KvbMJiupbknIXgbxyM1TwCWrh3AmCBledv/XpMGO4v+xvvRbUP+b1854 scez0ZoLXc/4fGsMOIYdDUpYZnhlz7Umuf5rRKZxjoxaZTFlFad/BQVqItBO6kJzIMxk gB0hJwurF6QxALWqizr9ZI35bdCYVS4z/Ty7n8tFE8M+Ae0cZsolXjn9NU5lWqcSeM7Z IersUcuxX/KlSLr6OEfXSf0lxWqX8l/xER2kqZUMuEWBesLPHbfX1Mn+9g7L6raL44HF /2Og== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=odO2m+38; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d33si11417132ybe.4.2020.06.26.11.26.03 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 26 Jun 2020 11:26:03 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=odO2m+38; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:56558 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jot34-0000ul-UC for patch@linaro.org; Fri, 26 Jun 2020 14:26:02 -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) 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-Received: by 2002:adf:cd92:: with SMTP id q18mr4951864wrj.113.1593195773822; Fri, 26 Jun 2020 11:22:53 -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) From: =?utf-8?q?Alex_Benn=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 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_Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, cota@braap.org, aurelien@aurel32.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" The sooner we deprecate in-tree builds the sooner this mess of regexes can be thrown away. Signed-off-by: Alex Bennée --- v2 - just use explicit !/.gitlab-ci.d --- .gitignore | 1 + 1 file changed, 1 insertion(+) -- 2.20.1 Reviewed-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé 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 From patchwork Fri Jun 26 18:13:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 191894 Delivered-To: patch@linaro.org Received: by 2002:a54:3249:0:0:0:0:0 with SMTP id g9csp649012ecs; Fri, 26 Jun 2020 11:20:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwiMJDUUk2UNYeZSqZC8edF4w0C8Pljju/Ja3jUl/EHV7G31ngK7M+apggeuVjp7bnjeXki X-Received: by 2002:a25:abef:: with SMTP id v102mr3948719ybi.518.1593195646559; Fri, 26 Jun 2020 11:20:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593195646; cv=none; d=google.com; s=arc-20160816; b=YOdseuKtrgxW3w8q3y/7l6ogoxBp8agbKvaDL3aKqNUpiQ7d9UCZsdEK09IQCgDHkc R8WGbpdqvSyx1AOJhv+WekdudA0lyTKHmC/CNkM8WoyWa+y0xxW4IoWcFpAw7DTZAJzX XxLczXqmxcaFvDLuphHe/rO8AHzea4qn6u5o5jb11odXEOXOlDJdpQT6JusVTiEqRULG NSC9dfjxbnCsyg3nuOIgxj5IazOtGUlETQzkMd3IB58xaJIFS5EbKaLOiyEaIFinBT/R hhHrQNNkFzcD7LbJB9bgOk4cV7eayPj+SM6rTbcd8opYvmLcF6cxQNQGwOrKKH1NYrgf bYTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=R/BE2XE6etuSC77gKrMmoWm+NEYkm1ni6VwaHNKkepk=; b=d3PKFAw1LwpZrivTCDJd6yP7eaQG5usvKgwXO/9qiaVzjSrVpel4DmjP6knAe37HWl N2+Kw3ygWAvRSoEbJYie5Q9vdMOrpZ3AF0vqwQb0cHk3K0qlWsKZh5Yk7igmAuQHwUOt V3Zhu4vbT2v8MYWRhmr6NOUCWp0jDqrJ5ZWIkaow4Al0V1ABNYErTj2Wx9JbglgpM79h 1d4zXIntxyVbbssINnFkwYpEKLyUxKBdMdkDE5A0WV+mrRe/K5Xt8OUN/6GkaGv+7/58 gfLXgrmOOSHgO906wXkrCf1EKACkYwXg5//6/4Ukq7rPfl4Y6vTO+TJA7n3Gq+pChIEM u8Hw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=QOinNast; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id f76si28344927ybg.468.2020.06.26.11.20.46 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 26 Jun 2020 11:20:46 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=QOinNast; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:33210 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1josxx-0008AE-Un for patch@linaro.org; Fri, 26 Jun 2020 14:20:45 -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) 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-Received: by 2002:a7b:ca52:: with SMTP id m18mr4663236wml.92.1593195258752; Fri, 26 Jun 2020 11:14:18 -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) From: =?utf-8?q?Alex_Benn=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 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_Mathieu-Daud=C3=A9?= , richard.henderson@linaro.org, f4bug@amsat.org, Laszlo Ersek , cota@braap.org, aurelien@aurel32.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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é Message-Id: <20200625151627.24986-1-thuth@redhat.com> --- .gitlab-ci.d/edk2.yml | 2 +- .gitlab-ci.d/opensbi.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -- 2.20.1 Reviewed-by: Laszlo Ersek 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 From patchwork Fri Jun 26 18:13:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 191881 Delivered-To: patch@linaro.org Received: by 2002:a54:3249:0:0:0:0:0 with SMTP id g9csp646104ecs; Fri, 26 Jun 2020 11:16:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz2ik3D1YV3AWWYbBudrsAPYEMzaMQEDd3Ikm0tDtXupxRTFr8AIoNSxxgYv8W2tk6zkzDC X-Received: by 2002:a25:3784:: with SMTP id e126mr7529773yba.267.1593195399486; Fri, 26 Jun 2020 11:16:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593195399; cv=none; d=google.com; s=arc-20160816; b=IylwAofpv677doerD7oP7tBuq+AExT3NKmvqDhzbBTs9uEizuES7Dyy0xRbdgfE7LL gDwzwgebp0zUQ3INi2oHNPKtu5LX0jBeHf//GnwZdrTMXd8BOSFkpGIZGr94U181CJni s+5+2EBK2WGV6PLoKdZ0mrVsmzwWbn/Pvc136McBP18VjcvmVe0PwgD7U9fxPlFLy2yo C6CRCqi2BV54ksD9s3MgncJHAckYK4JmYEHSMAZDeJ23UQxKxn5zVPaqT0GF1IzwHzhs uZs06lw+2ucpS2THWxltUpM21glnddCzBiRUjn0H//gCKlFSUnpSVtLolgIRqPzNoems bo/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=BoQbWA8pgX9GC2xijlmIAV/4o0rgmcM2g2psEePuq2U=; b=eybeNgc9UiuTZ3URAGOxnPaaMSClDlm4OprIMdZJVCp8yNPfO4CkJ3Wp+nnpFd2Xw1 kh4rLvDI6rCse/6sRq8Ib8HV8QrqMVL7F0BDOq24cLxfEWoRQ8tefCOfPX/3KV0WPzia OEPsJpDukvVyiu3n7j+Gu2Tmc0eqqKbMhkXT1bJQWVMOsaDdVFbey1GAbYQo3IHBtXD4 GDqLJ0fo47goFxM3SgUkNAMHjboQgRiE1bdjBUEQE+746VC8e6ULxX02sAut8Hk6lKLZ lv+PTwZtw6HHk3paR2V9N72cwbPO6gjOUfKi290/xezCmCHt6X+AZc2R6dYfSfh8JLdC a2GQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=hWxqrGXs; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id h71si5187593ybg.152.2020.06.26.11.16.39 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 26 Jun 2020 11:16:39 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=hWxqrGXs; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:47988 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1josty-0002Y6-Th for patch@linaro.org; Fri, 26 Jun 2020 14:16:38 -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) 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-Received: by 2002:a1c:b4c2:: with SMTP id d185mr4495615wmf.57.1593195254714; Fri, 26 Jun 2020 11:14:14 -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) From: =?utf-8?q?Alex_Benn=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 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_Mathieu-Daud=C3=A9?= , =?utf-8?q?Alex_Benn=C3=A9e?= , cota@braap.org, aurelien@aurel32.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Daniel P. Berrangé 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é Acked-by: Laszlo Ersek Signed-off-by: Alex Bennée Reviewed-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé 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(-) -- 2.20.1 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 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 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=$(expr $(nproc) + 1) build-system1: + stage: build image: ubuntu:19.10 <<: *before_script_apt script: @@ -31,6 +36,7 @@ build-system1: - make -j"$JOBS" check build-system2: + stage: build image: fedora:latest <<: *before_script_dnf script: @@ -46,6 +52,7 @@ build-system2: - make -j"$JOBS" check build-disabled: + stage: build image: fedora:latest <<: *before_script_dnf script: @@ -62,6 +69,7 @@ build-disabled: - make -j"$JOBS" check-qtest SPEED=slow 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 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 build-clang: + stage: build image: fedora:latest <<: *before_script_dnf script: @@ -106,6 +116,7 @@ build-clang: - make -j"$JOBS" check build-tci: + stage: build image: centos:8 <<: *before_script_dnf script: From patchwork Fri Jun 26 18:13:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 191910 Delivered-To: patch@linaro.org Received: by 2002:a54:3249:0:0:0:0:0 with SMTP id g9csp654908ecs; Fri, 26 Jun 2020 11:29:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyvAb5Au+g9PGRr8DlyLjY0LXuifuxRIUbiCe5dEABFJKkxJ5ZT3vRz0GrRI6E5e5hzC4cj X-Received: by 2002:a25:a226:: with SMTP id b35mr7127758ybi.356.1593196190169; Fri, 26 Jun 2020 11:29:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593196190; cv=none; d=google.com; s=arc-20160816; b=PRsheCkdQuAg2CiNZtqTGe8tk1AlvTS8y9MHcTArFDUOllwk7TPAjwUMxvyQzYj9Vy jhTcPWyXF8DU0iUgiyJucXAxBbiB+rrmCgH6Hee+u3kHuLg7RvogxxVpI/pOt5ldC8v6 ii4acUfrxuyOHdz3CKX9vvAs1IINIroAE3pLU+VXUC/qLc6tfzXsRCozopomqeheqhxa 0XIbpv/WiZgs+rxpT4fvvzvG0zKK4JntXQ9TTyuuA1rPqqkglBgzSbEocQEAzofwwmeX slQvlXOFV37iA+aLoizYe9o6a1Zbnz0C4HjwrUMGz3DDJpyu5ClYvI/U3lP8qqjYw90W idWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=xUZG6tLp/xI8r3bd4dXEs/uYPfQvAur5hQZG/hEKfXs=; b=dDnh37L8gYj3qE8jycCmyW1ZWta5EkKvfRMdwBqzj1xNU8Uq2ClADiLevct47bPmwq KybGg/pXMJU+Csy9rrTroLqxv67PyA3cFuFDcFe+VlPaoN64EdL/m/3tLMf057/d7dAx 5mu0w09aX3JTGstKWKYUDLDVbeB+NMG65vcN2ZChwdAqM7A5OV2ilHhJQ9PKK4GkGN6z 4P0cwGsvPf0gxt9UrWZdD/n3MaZyftwqGk4J/XD3Z0s7XNLtL9Vf1N0LY1TF35SXpbMe PT+vym5zWvGA2KJOTSP6gTzZFIRNNcJextQqlfkPVFELfktj0ouEJt75d3oq6ToP9Swi FnFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=podm8Phc; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id h1si26004742ybo.141.2020.06.26.11.29.49 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 26 Jun 2020 11:29:50 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=podm8Phc; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:42420 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jot6j-0006et-Fd for patch@linaro.org; Fri, 26 Jun 2020 14:29:49 -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) 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-Received: by 2002:adf:f2cd:: with SMTP id d13mr4821906wrp.378.1593195779870; Fri, 26 Jun 2020 11:22:59 -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) From: =?utf-8?q?Alex_Benn=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 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_Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, Wainer dos Santos Moschetta , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?b?w6k=?= , cota@braap.org, aurelien@aurel32.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Daniel P. Berrangé 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é Message-Id: <20200622153318.751107-3-berrange@redhat.com> [AJB: tweak the tag format] Signed-off-by: Alex Bennée 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 -- 2.20.1 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="$CI_REGISTRY_IMAGE/qemu/$NAME:latest" + - export COMMON_TAG="$CI_REGISTRY/qemu-project/qemu/$NAME:latest" + - docker info + - docker login registry.gitlab.com -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_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 include: - local: '/.gitlab-ci.d/edk2.yml' - local: '/.gitlab-ci.d/opensbi.yml' + - local: '/.gitlab-ci.d/containers.yml' .update_apt_template: &before_script_apt before_script: From patchwork Fri Jun 26 18:13:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 191902 Delivered-To: patch@linaro.org Received: by 2002:a54:3249:0:0:0:0:0 with SMTP id g9csp652015ecs; Fri, 26 Jun 2020 11:25:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy/7hbjdr0PoYtsa4y9AlS7Y2RPW1qHFxPWQbiV7or0GMUEHn+Oyazs4xU7bAYobC3yNrCX X-Received: by 2002:a25:3bca:: with SMTP id i193mr7143884yba.182.1593195909575; Fri, 26 Jun 2020 11:25:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593195909; cv=none; d=google.com; s=arc-20160816; b=b0tvEDfPZjBl/2Km53acnVg+ty/e9Ex3nljCa2YBbiyKLFbLahJDvVF0iNshDF7vVe nq8SQhQTYtivnrs0gM1/+Go3lvbcgNTQYzM988HIqBzTP5q3ZRg3KVGM5Zp12w0ZpoEW Gybo+MXY7wHtci8yvLBNNCjRa30z3cx+RxD/co4ftOyKJymVV6xJswQETH02WLd5lpkX j1FbrUVuhZtr5wh2yM4jAxAVXXaU0QEZ8WhNe0PtFBB5TweVzfjgEwdiyvKQbXBCkQMU ev2NMeLwtoD7LvlwlfqN637nFfX6cX4MAuAymTntfQJ4g0TzCm+FuwEDtU+qzpns0lp9 nhaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=gYny8RQMLGvnYX7pxE0cYv3y41J+K9oraa4mW6ajsxI=; b=g8YK1uZhUXR7/35uf2EjFdyUXdXMuVezexmcCUYHwRQ8MMEW04k+g8a5sTh6924pHw s7ZVXktKFMkd3Uc9/i/THMDUlbGuYcqZGvA7JtCzePkvFOjrWge/OIpnGdK+7TJSSlbA 859MRfbTvKCqmObca8BxGQjLb0gx8dbTxvFolkLl7TEAUwP21HPOHbWcfjWkCQLMmpwq kxs28C3+mJmi5CCf6xVKrxdnBkRQXSY6/S7pcXbCqXWQWaN1QsV096VDt6C12mgOq/Wl zeMm0KOml0UXBmiPJ+lyhaaxC15NMs5Z7sDy05s+oCydNqY6VYI9S6TNid1iOT++9jV1 Wgjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=bn5Ixda0; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id s9si25203183ybk.329.2020.06.26.11.25.09 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 26 Jun 2020 11:25:09 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=bn5Ixda0; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:50784 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jot2C-0006x3-Ui for patch@linaro.org; Fri, 26 Jun 2020 14:25:08 -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) 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-Received: by 2002:a1c:9ad8:: with SMTP id c207mr4506785wme.45.1593195775996; Fri, 26 Jun 2020 11:22:55 -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) From: =?utf-8?q?Alex_Benn=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 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_Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, Wainer dos Santos Moschetta , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?b?w6k=?= , cota@braap.org, aurelien@aurel32.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Daniel P. Berrangé 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é Message-Id: <20200622153318.751107-4-berrange@redhat.com> [AJB: tweak naming convention] Signed-off-by: Alex Bennée --- .gitlab-ci.yml | 187 +++++++++++++++++++++---------------------------- 1 file changed, 81 insertions(+), 106 deletions(-) -- 2.20.1 Acked-by: Thomas Huth 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' -.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=$(expr $(nproc) + 1) - -.update_dnf_template: &before_script_dnf - before_script: - - dnf update -y - - dnf install -y bzip2 diffutils gcc git genisoimage findutils glib2-devel - make python3 perl-podlators perl-Test-Harness pixman-devel zlib-devel - - JOBS=$(expr $(nproc) + 1) +.native_build_job_template: &native_build_job_definition + stage: build + image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:latest + before_script: + - JOBS=$(expr $(nproc) + 1) + script: + - mkdir build + - cd build + - if test -n "$TARGETS"; + then + ../configure --enable-werror $CONFIGURE_ARGS --target-list="$TARGETS" ; + else + ../configure --enable-werror $CONFIGURE_ARGS ; + fi + - make -j"$JOBS" + - make -j"$JOBS" $MAKE_CHECK_ARGS 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 libvdeplug-dev - - mkdir build - - cd build - - ../configure --enable-werror --target-list="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 -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 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-devel - libzstd-devel - - mkdir build - - cd build - - ../configure --enable-werror --target-list="tricore-softmmu unicore32-softmmu - microblaze-softmmu mips-softmmu riscv32-softmmu s390x-softmmu sh4-softmmu - sparc64-softmmu x86_64-softmmu xtensa-softmmu nios2-softmmu or1k-softmmu" - - make -j"$JOBS" - - make -j"$JOBS" check + <<: *native_build_job_definition + variables: + IMAGE: fedora + TARGETS: tricore-softmmu unicore32-softmmu microblaze-softmmu mips-softmmu + riscv32-softmmu s390x-softmmu sh4-softmmu sparc64-softmmu x86_64-softmmu + xtensa-softmmu nios2-softmmu or1k-softmmu + MAKE_CHECK_ARGS: check build-disabled: - stage: build - image: fedora:latest - <<: *before_script_dnf - script: - - mkdir build - - cd build - - ../configure --enable-werror --disable-rdma --disable-slirp --disable-curl + <<: *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-tpm --disable-qom-cast-debug --disable-spice --disable-vhost-vsock --disable-vhost-net --disable-vhost-crypto --disable-vhost-user - --target-list="i386-softmmu ppc64-softmmu mips64-softmmu i386-linux-user" - - make -j"$JOBS" - - make -j"$JOBS" check-qtest SPEED=slow + TARGETS: i386-softmmu ppc64-softmmu mips64-softmmu i386-linux-user + MAKE_CHECK_ARGS: check-qtest SPEED=slow 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=clang --enable-werror --disable-tcg --audio-drv-list="" - - 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="" + - 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 102 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 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-linux-user 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-devel - - mkdir build - - cd build - - ../configure --cc=clang --cxx=clang++ --enable-werror - --target-list="alpha-softmmu arm-softmmu m68k-softmmu mips64-softmmu - ppc-softmmu s390x-softmmu x86_64-softmmu arm-linux-user" - - make -j"$JOBS" - - make -j"$JOBS" check + <<: *native_build_job_definition + variables: + IMAGE: fedora + CONFIGURE_ARGS: --cc=clang --cxx=clang++ + TARGETS: alpha-softmmu arm-softmmu m68k-softmmu mips64-softmmu + ppc-softmmu s390x-softmmu x86_64-softmmu arm-linux-user + MAKE_CHECK_ARGS: check build-tci: - stage: build - image: centos:8 - <<: *before_script_dnf - script: - - TARGETS="aarch64 alpha arm hppa m68k microblaze moxie ppc64 s390x x86_64" - - mkdir build - - cd build - - ../configure --enable-tcg-interpreter - --target-list="$(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="${tg}-softmmu/qemu-system-${tg}" ; - ./tests/qtest/boot-serial-test || exit 1 ; - ./tests/qtest/cdrom-test || exit 1 ; - done - - QTEST_QEMU_BINARY="x86_64-softmmu/qemu-system-x86_64" ./tests/qtest/pxe-test - - QTEST_QEMU_BINARY="s390x-softmmu/qemu-system-s390x" - ./tests/qtest/pxe-test -m slow + <<: *native_build_job_definition + variables: + IMAGE: fedora + script: + - TARGETS="aarch64 alpha arm hppa m68k microblaze moxie ppc64 s390x x86_64" + - mkdir build + - cd build + - ../configure --enable-tcg-interpreter + --target-list="$(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="${tg}-softmmu/qemu-system-${tg}" ; + ./tests/qtest/boot-serial-test || exit 1 ; + ./tests/qtest/cdrom-test || exit 1 ; + done + - QTEST_QEMU_BINARY="x86_64-softmmu/qemu-system-x86_64" ./tests/qtest/pxe-test + - QTEST_QEMU_BINARY="s390x-softmmu/qemu-system-s390x" ./tests/qtest/pxe-test -m slow From patchwork Fri Jun 26 18:13:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 191890 Delivered-To: patch@linaro.org Received: by 2002:a54:3249:0:0:0:0:0 with SMTP id g9csp647395ecs; Fri, 26 Jun 2020 11:18:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwg9XEbR9F894GDeLNPvjpiGy1sJErR2dX796GCurxIGGvG+ds7K8zVi/+oMFO83CkesyHe X-Received: by 2002:a25:c5c3:: with SMTP id v186mr6685384ybe.233.1593195509620; Fri, 26 Jun 2020 11:18:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593195509; cv=none; d=google.com; s=arc-20160816; b=MPN6+oyzeyM3BNIOu4Zcvwr9+xQlbVbf6DaVZjEAqPC6Ek/g4QRLV/vyRKovqNX5Rs EhY5wQknyV0hJatQl4ZzeCaCE3TfF8jVuku+6zHNPtcROhCuC2dkkoG6nXCe7oV8u5IN ehcN9JGttZ371GuWpD5jvFuK1YDrRwQk4yCCgHPvpItIkd2ytDFjjdHoPym5fyvzFRD7 usrXMaXT3cQNeJNI0jDMLTbdcR1FFKzfRZNO0b1YOb9kdyzcFq5BN3NoizeivA7Kqd9r grj1BSZkESD4z/5CqI9isvfoPO7gQPchVgJzmoSvDIt4NsqaWDoFoGjur+HbWyCnQydG LpTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=WD6VNcX9MpLlUaAe843m6W+P0R0E6C+GHfBa0ZiWKL8=; b=D5CWAksE1JDOOXuyhi2Jo2sUqC3hoeOfO+DrdOSpXCObFeKP15aeALBHNyzmsied4+ B4l87gRkODmj/nBRUu56vk6i6jERZ92F4OUvpwjoGAkgp9UlviIx2OAAnsrFa0MouY+a msWyyu81EzBqkOUOI/AAKn4hbMS8grc0xLBZeZWFX+WL8VhUSJGHxbPwieM6BOaggxsK 5rVuhbAT87etFCfpgmrpc/dbdYnSy3ePvnfzOZj0k03wrYhwAnVlkf4PWgr4zNcLqCfy sln01qOOMTALlm5nWwGqGCMXsQNpIzVWGHSkXlJL/c/xrzducj8Hy/S2v4sHPFAKjkkn zJ+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=sB4t23C6; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id u14si27552818ybc.169.2020.06.26.11.18.29 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 26 Jun 2020 11:18:29 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=sB4t23C6; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:54436 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1josvl-0005F5-10 for patch@linaro.org; Fri, 26 Jun 2020 14:18:29 -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) 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-Received: by 2002:adf:e850:: with SMTP id d16mr5223297wrn.426.1593195261491; Fri, 26 Jun 2020 11:14:21 -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) From: =?utf-8?q?Alex_Benn=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 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_Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, cota@braap.org, aurelien@aurel32.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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ée --- .gitlab-ci.d/containers.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- 2.20.1 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=1 docker build --cache-from "$TAG" --cache-from "$COMMON_TAG" --tag "$TAG" + --build-arg BUILDKIT_INLINE_CACHE=1 + -f "tests/docker/dockerfiles/$NAME.docker" tests/docker/dockerfiles - docker push "$TAG" after_script: - docker logout From patchwork Fri Jun 26 18:13:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 191904 Delivered-To: patch@linaro.org Received: by 2002:a54:3249:0:0:0:0:0 with SMTP id g9csp652632ecs; Fri, 26 Jun 2020 11:26:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxH8gtATlF8nzLkhw7h0fIFp8rqv6Zbd60Lmz/wV7MiHJJ3k+t+EV2537Ud2Y3KQjoaz4je X-Received: by 2002:a25:7d04:: with SMTP id y4mr7464799ybc.17.1593195965518; Fri, 26 Jun 2020 11:26:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593195965; cv=none; d=google.com; s=arc-20160816; b=JRXrME7PHpWbtzN3v1XZE1Zt9FpThaUl1e2Tj58EcHR3kxyBvtefmQDUGo2fB3z/8+ 19yhjy4R00qeTi5K9LPxmfHrNDhcuZMaCSNr3wYo9uvmmQaDBZzAEYLa1vj/YjkgEogy 81lLkMW4N5gzJ59Ts0xqktxiEAf8RNYK0gfFJLMSbGVW2ovb5AF3OoDXap9LuwcjXS3H Kje2eJpjY6tf6ufdKvXKefzafDrtDZOs133YmyHfxuro7KqN6M1JiihS0eYSwf2B9l// UuJUtQn+cVYjKrt3vyditz4B70iIGoYk1vx07WdpgOUjeLUUObV/e6etDYTtaEIdEyp4 4IWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=wmP5rJyYoOCoZ0LFVlYt2bUhEVWWIR3nI4aOboxhEsg=; b=Sx5gqep3ng7egRKDBeLbO5FvhXxg4AU9md/eCddnNd+DvCNvFwI0yeETTqLdvXU3Pm yjQlLacczq6MfeZgGfCtRXK5lu60zcEMhHvScSSAzKOteNasjBuPkPQUr3q0c9mmNJ4t yPBllcAs51gCNdUJ8RiHo8UNDGadthG410pPGOx5JCui0hn5a9Oal6EmC8AkxEbLDkd0 GZzQVKoZoyowHSy9/T7VntvquE8pXyqR5CnIlUAMQKkLIt2Byd1JCEHHnbMJwVK5S1CM iVLpDdkiih7K7P/Ytdajz6hTrXivIUruS4x2lwy54MsbWuO28IlVptZWAGEWtGcAMOp9 slPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Cq7GKvjG; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id k125si26173945ybf.269.2020.06.26.11.26.05 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 26 Jun 2020 11:26:05 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Cq7GKvjG; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:54090 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jot36-0008Hk-TY for patch@linaro.org; Fri, 26 Jun 2020 14:26:04 -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) 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-Received: by 2002:a7b:c746:: with SMTP id w6mr5005421wmk.171.1593195787882; Fri, 26 Jun 2020 11:23:07 -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) From: =?utf-8?q?Alex_Benn=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 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_Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, =?utf-8?q?Philippe_Mat?= =?utf-8?q?hieu-Daud=C3=A9?= , cota@braap.org, aurelien@aurel32.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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ée --- 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(-) -- 2.20.1 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 := $(sort $(notdir $(basename $(wildcard $(DOCKER_FILES_DIR)/*.doc DOCKER_TARGETS := $(patsubst %,docker-image-%,$(DOCKER_IMAGES)) # Use a global constant ccache directory to speed up repetitive builds DOCKER_CCACHE_DIR := $$HOME/.cache/qemu-docker-ccache +DOCKER_REGISTRY := $(if $(REGISTRY),$(REGISTRY),registry.gitlab.com/stsquad/qemu) DOCKER_TESTS := $(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=$(EXECUTABLE)),\ @@ -213,6 +215,7 @@ endif @echo ' Include extra files in image.' @echo ' ENGINE=auto/docker/podman' @echo ' Specify which container engine to run.' + @echo ' REGISTRY=url Cache builds from registry (default:$(DOCKER_REGISTRY))' # 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 = _guess_engine_command() + + if "docker" in self._command and "TRAVIS" not in os.environ: + os.environ["DOCKER_BUILDKIT"] = "1" + self._buildkit = True + else: + self._buildkit = False + self._instance = 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", "") def build_image(self, tag, docker_dir, dockerfile, - quiet=True, user=False, argv=None, extra_files_cksum=[]): + quiet=True, user=False, argv=None, registry=None, + extra_files_cksum=[]): if argv is None: argv = [] + if registry is not None: + dockerfile = dockerfile.replace("FROM qemu/", + "FROM %s/qemu/" % + (registry)) + # see if we can fetch a cache copy, may fail... + pull_args = ["pull", "%s/%s" % (registry, tag)] + self._do(pull_args, quiet=quiet) + + tmp_df = tempfile.NamedTemporaryFile(mode="w+t", encoding='utf-8', dir=docker_dir, suffix=".docker") @@ -313,8 +330,17 @@ class Docker(object): tmp_df.flush() - self._do_check(["build", "-t", tag, "-f", tmp_df.name] + argv + - [docker_dir], + build_args = ["build", "-t", tag, "-f", tmp_df.name] + if self._buildkit: + build_args += ["--build-arg", "BUILDKIT_INLINE_CACHE=1"] + + if registry is not None: + cache = "%s/%s" % (registry, tag) + build_args += ["--cache-from", cache] + build_args += argv + build_args += [docker_dir] + + self._do_check(build_args, quiet=quiet) def update_image(self, tag, tarball, quiet=True): @@ -403,6 +429,8 @@ class BuildCommand(SubCommand): parser.add_argument("--add-current-user", "-u", dest="user", action="store_true", help="Add the current user to image's passwd") + parser.add_argument("--registry", "-r", + help="cache from docker registry") parser.add_argument("-t", dest="tag", help="Image Tag") parser.add_argument("-f", dest="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=args.quiet, user=args.user, argv=argv, + quiet=args.quiet, user=args.user, + argv=argv, registry=args.registry, extra_files_cksum=cksum) rmtree(docker_dir) From patchwork Fri Jun 26 18:13:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 191911 Delivered-To: patch@linaro.org Received: by 2002:a54:3249:0:0:0:0:0 with SMTP id g9csp655732ecs; Fri, 26 Jun 2020 11:31:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw9EFuNVIOdae80/riP12RqF7fNAvWZdymyixZv0tEELt+z/dL7uM22KWIgW3PoAKP7nfV3 X-Received: by 2002:a25:d3d0:: with SMTP id e199mr6803677ybf.27.1593196263585; Fri, 26 Jun 2020 11:31:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593196263; cv=none; d=google.com; s=arc-20160816; b=kwgDE2r2gZ3SZS/o8IuAl2YIP3mgGOGop/y63zwZRouY2fAHkHdgfGURiYZWVTenED 5Vi2GHqMUgL7f2Rmpq/bzI1qKW2jjxZPV8503bZKwT5KeJW3EbJcFuRIh/6kiQuNzaOw JAmnMsjeFpua8KmQLUS/9pPBv5UwJyaRcpfVUIhQz+0apEgGY0Mbc72llFWexaSMTINJ zt7ncl9SOkiln86EK5/UOjcd8VFewROj34eChsEhCsgglIHs+s+X6OqMrmJDz3cFi9mG YZ2xorRcuQnUyjXbSaAc4DpUBd/7lYmvIOk7HZ72I09dQuAKMSvVA1WJ8S91IdAYbrqJ tFVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=ZwuOstmGcuTAVE1dTjCYiOJLUEzogyRARo4KTgzkFM4=; b=OzJUuzasOXH8LYnZYuPznp8yDkDGTYyOlbiQ5XlhkvqORqk0pxbcKY6GHMnFxXUF0F XXe8EIj7WQa0jbRNiB3JGfwWwW6imMHgfQvpZyoJSKaHNqxLz7giENiQIgK8p3+w/F4D 6btkEV74jOFjFSSJHuIcPTv4C3/9XidLapvRgEgkzX5Jz9N60FmG6j+yBNPoobsNyVvH 5sEtgXUvGCN4oNSyrFTs5tzPn66ltUH0gxEITDua/Q1c0xnH+5KmwRh3sOGVxxjXYJIT cXC9Tk2yAdQrT1SWQeWkM8YzYBHchzzzcJasYvXnyakGHxlm24NdL3hYIzs2C/OLr2w8 GYCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Jy6b2Sgy; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id s3si5399611ybk.485.2020.06.26.11.31.03 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 26 Jun 2020 11:31:03 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Jy6b2Sgy; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:45710 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jot7u-0007ye-TY for patch@linaro.org; Fri, 26 Jun 2020 14:31:02 -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) 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-Received: by 2002:adf:f2c5:: with SMTP id d5mr5195462wrp.96.1593195781484; Fri, 26 Jun 2020 11:23:01 -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) From: =?utf-8?q?Alex_Benn=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 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_Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, =?utf-8?q?Philippe_Mat?= =?utf-8?q?hieu-Daud=C3=A9?= , cota@braap.org, aurelien@aurel32.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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ée --- tests/docker/dockerfiles/fedora.docker | 7 +++++++ tests/docker/dockerfiles/ubuntu2004.docker | 10 +++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) -- 2.20.1 Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth diff --git a/tests/docker/dockerfiles/fedora.docker b/tests/docker/dockerfiles/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/dockerfiles/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 From patchwork Fri Jun 26 18:13:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 191906 Delivered-To: patch@linaro.org Received: by 2002:a54:3249:0:0:0:0:0 with SMTP id g9csp653398ecs; Fri, 26 Jun 2020 11:27:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwDHKonaBi26yoOl5CAx+10WSjOmG8vv2xEZeVdEj8u3rcXICSktby9FT4GE+tpQYmYVH0O X-Received: by 2002:a25:c101:: with SMTP id r1mr6907317ybf.112.1593196036267; Fri, 26 Jun 2020 11:27:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593196036; cv=none; d=google.com; s=arc-20160816; b=bNTvFSnqFpe30/xk5cypBZPJ+m7ogirI/FB3B3dWTQt0mVNbkl1OEis9Ex6A/YLABo xsZaSxPcAqlqOLbyzZnQmU+j3QP0Slzot+TnFDxl2eI7kuy1+BP8zO4cwRI/nseWqqPV QJcEBbqwYY+GDkUoQt1m45BSfSLvUNZEE6iQj8bOq1h+mxd9c1Dp+19Eu78y+Y2fmZkN +WqX9a4HJKreJIsiqaJorfjEJ8Qo3BDM8jflw81CbVzPTylDrh1wYtpiuWvbpqYYwfo1 eozRbwtwFEu6VoFF3pGXEp/4QIHj6gkkYqjPeTHY+4uQGw/GnwO4en5mZ1nwzttYIaT0 LMHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=8+ywLSq/cpQR9jk1x4FDeODnKkLS2LjIS17ZB0FsQ2E=; b=b95OnVmn3rmtX1lCVQonCb0R9Q9TlLeWmECdwbaLeGy90a0tXy6WOHT6nxSJ6MegAL RfxEJutx871Gqx+Pc3yOBHLuqZOc54m7oaLkC2vPI7J2ouBl+aOSKfmPGjsCchFeqob7 0ua9YrPAdL/ivfFyA0eAA9KeVAT8kvY6EAFSWaE4uxq5PqxaKPMwzAtUTVuKleMvRoTT +bNxnGprMHNKnwipBbxo6Bbefm4ac4daeQ8IuFtjHIf+BQrLy/BWl58U/e8K6nQplfIZ ZXoo6TDhp+hSIdfrMFjajOPyQzK3/uW7PpaZEwM9F8rFQ1rhyB+3YQO/Qwa20TEWLWuN flNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=t2VuEGbP; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id e3si25391419ybr.362.2020.06.26.11.27.16 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 26 Jun 2020 11:27:16 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=t2VuEGbP; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:59302 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jot4F-00020w-MB for patch@linaro.org; Fri, 26 Jun 2020 14:27:15 -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) 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-Received: by 2002:adf:82f5:: with SMTP id 108mr5009572wrc.218.1593195785203; Fri, 26 Jun 2020 11:23:05 -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) From: =?utf-8?q?Alex_Benn=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 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_Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, Wainer dos Santos Moschetta , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?b?w6k=?= , cota@braap.org, aurelien@aurel32.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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ée Message-Id: <20200622143204.12921-16-alex.bennee@linaro.org> --- 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(-) -- 2.20.1 Reviewed-by: Philippe Mathieu-Daudé 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 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 = json.load(open("tests/results/latest/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 -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 -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-softmmu riscv32-softmmu s390x-softmmu sh4-softmmu sparc64-softmmu x86_64-softmmu 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 +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 - # Acceptance (Functional) tests - - name: "GCC check-acceptance" - dist: bionic - env: - - CONFIG="--enable-tools --target-list=aarch64-softmmu,alpha-softmmu,arm-softmmu,m68k-softmmu,microblaze-softmmu,mips-softmmu,mips64el-softmmu,nios2-softmmu,or1k-softmmu,ppc-softmmu,ppc64-softmmu,s390x-softmmu,sh4-softmmu,sparc-softmmu,x86_64-softmmu,xtensa-softmmu" - - TEST_CMD="make check-acceptance" - - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-acceptance" - after_script: - - python3 -c 'import json; r = json.load(open("tests/results/latest/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: From patchwork Fri Jun 26 18:13:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 191913 Delivered-To: patch@linaro.org Received: by 2002:a54:3249:0:0:0:0:0 with SMTP id g9csp656844ecs; Fri, 26 Jun 2020 11:32:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx0xZ/F5AtK6rObLJA5K2WQeZ2qo06TZ5xqA/YwPK4gcaQF3r5OhKNhstL4f+y1ldCbrCr4 X-Received: by 2002:a25:b992:: with SMTP id r18mr6892035ybg.283.1593196361734; Fri, 26 Jun 2020 11:32:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593196361; cv=none; d=google.com; s=arc-20160816; b=cKWLeNDAfXBEdYhuxs+ZAKaNTaw9+HWpawqhWa0FANyUpw+VyPTLgkE4ePhO6bgzRy JXaBmn2NIZOZtyTrvqHPtRqaaENWWG1baHrniFzTgivieiGzbS0D3ijfSSzeS0nq8gjW u6FWWqe925HcZuY8nvWjq3CnGzVklpoHvyUAwCEWW2CfqQl7VQVwbqXEEQn9DrZQieOE sscz3L9PlhQwJo/xAN04KXlow0WQ93GJ/b4W/vWUQstBESZilxBSfIZVsMkjhodOsjsf FjYQatw44AKZKUGMH1t5uhk9umxYcZtVVZvIncKKrPa3yWRr8PDOl/nnIhOg3Fx8pE5p zpug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=GGghav/BtSCa7AI7P4AufN/sAMwmqjG67Lv4jNv44bc=; b=ZfkWUhRfqXdIOz4SrEyy5Vt9LN7zTqEmx7EXeiWmU+6wCrZWcaMHgnfYPqhJJ/ri3e /8ssv4Jwx+hULr4W1Uyvtdd3UzB/4ljX0hk+YIEIGZxUk8ePoymfVnqE/OhOXDP7DAdb qER+G+wAe6U8X1ae1rZL5OS/XMfwI3nNXMlz7vnjJFFnt+EgL6f8GAjWzbvDsLfxPWRU S/0HQuV7m+ABsh3P5B4XXiLECapJvck0TxsUZA8zrZWuSJZwjQQmzxRP9+uBCEMN8s0d 2KJX2qmVtlHNwqVDe7rvgQlWgtiFjrypXm8DwdiIpf6DtJZuKsb1wUitEPfAnSXv8Ltw 3xAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=BySoWsPu; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 132si25557506yba.45.2020.06.26.11.32.41 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 26 Jun 2020 11:32:41 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=BySoWsPu; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:51430 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jot9V-0001yM-5O for patch@linaro.org; Fri, 26 Jun 2020 14:32:41 -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) 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-Received: by 2002:adf:e908:: with SMTP id f8mr4956493wrm.3.1593195789624; Fri, 26 Jun 2020 11:23:09 -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) From: =?utf-8?q?Alex_Benn=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 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_Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, =?utf-8?q?Philippe_Mat?= =?utf-8?q?hieu-Daud=C3=A9?= , cota@braap.org, aurelien@aurel32.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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ée --- .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 -- 2.20.1 Reviewed-by: Philippe Mathieu-Daudé 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 +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=1 # 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 # These images may be good enough for building tests but not for test builds 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=noninteractive eatmydata \ + apt build-dep -yy qemu + +# Add the foreign architecture we want and install dependencies +RUN DEBIAN_FRONTEND=noninteractive 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,hppa-linux-user,i386-linux-user,m68k-linux-user,mips-linux-user,mips64-linux-user,mips64el-linux-user,mipsel-linux-user,ppc-linux-user,ppc64-linux-user,ppc64le-linux-user,riscv64-linux-user,s390x-linux-user,sh4-linux-user,sparc64-linux-user From patchwork Fri Jun 26 18:13:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 191907 Delivered-To: patch@linaro.org Received: by 2002:a54:3249:0:0:0:0:0 with SMTP id g9csp654016ecs; Fri, 26 Jun 2020 11:28:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy9nplNIBhiQXBbYoex+r2nbFdB8wG+vOWwm8P5/r087yDmcIAQ5Qhlh9vZek8ZhSkqI0lk X-Received: by 2002:a25:1941:: with SMTP id 62mr7883429ybz.16.1593196102501; Fri, 26 Jun 2020 11:28:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593196102; cv=none; d=google.com; s=arc-20160816; b=srAP4xAIscxTyrkhMWxTCsdd5XZSssX4tyc1rvJPUufOzlAkLBFmM9vkWnU8U/Zt+0 LRmDe5ctzIZHLWC0XMxdMJ2h+pYAppOvFmJ14UbMAxoBra+vp2gJHWD9q2kpCpW65orZ vOxPxcCQULm5TtLTiBt9Gym5bdYBg83HsMIGNsCKIkcCqQKmkYnUGEPkHBk+IN7OlaAn 8DmieXBuL8N2QieeMYSsH6ogSoa5EFyFFlrIIzCI+6++4r2mWPBaMdveYHEZY+h4TM7r seCRQ4WuYZhyUHhYg/SDPcCSYEw3BeIDuLrnmWl9O/bSGMDK0mr+QXNnuU/5t7wQFc95 /mFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=/rK0Sms5MapCn5tnpSN1o9DxY3jR2MXQyjMdJcVhwfU=; b=R5Ut9NTHP4qvmvjsI3IQdPLh6asVQ7ZWdY9twmNf4pzGzuyLoL47qGGz6uE2IKmzmG 6wn2Fm1eLtC/FB75iRyFaooOeKCE97gl69ICvMm5ILLWUBtTkHJBvNN3AiIaMdreVRMt AWCPuXxdHddHVF7IZn3/6ZkAWM39Mk0CopsqA4SZN+ZIwDQto5LCZB/1Xv8iFfXxHDA6 8BZRKg6DfHMf4+1nf41qxEj7ybuvUYmyjoiE+sc75CD+pNSWZgW2CuQGDfugjvGtMOOl jq8XreDsRUIFKuzLKVzC5eRvx+9FvsMvOYyuBKToSU1AqUgF8I8jHZYgrerVivRDc8mc H6dg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=boXIJc9W; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id a13si4599119ybs.401.2020.06.26.11.28.22 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 26 Jun 2020 11:28:22 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=boXIJc9W; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:36224 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jot5J-0004AT-Tl for patch@linaro.org; Fri, 26 Jun 2020 14:28:21 -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) 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-Received: by 2002:adf:de01:: with SMTP id b1mr4897537wrm.305.1593195777236; Fri, 26 Jun 2020 11:22:57 -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) From: =?utf-8?q?Alex_Benn=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 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_Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, Wainer dos Santos Moschetta , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?b?w6k=?= , cota@braap.org, aurelien@aurel32.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Switch to building in the new debian-all-test-cross image which has most of the cross compilers inline. Signed-off-by: Alex Bennée --- .gitlab-ci.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) -- 2.20.1 Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth 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-linux-user + IMAGE: debian-all-test-cross + CONFIGURE_ARGS: --disable-tools --disable-system + MAKE_CHECK_ARGS: check-tcg build-clang: <<: *native_build_job_definition From patchwork Fri Jun 26 18:13:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 191909 Delivered-To: patch@linaro.org Received: by 2002:a54:3249:0:0:0:0:0 with SMTP id g9csp654396ecs; Fri, 26 Jun 2020 11:29:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxW9AJlMJjTCHiGrjMl5Rrom9QptLkOiUBsdktcsloIxDW+d3zj5ENks7yUP/5YRoElwo3Y X-Received: by 2002:a25:cd83:: with SMTP id d125mr6837694ybf.38.1593196141142; Fri, 26 Jun 2020 11:29:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593196141; cv=none; d=google.com; s=arc-20160816; b=vtzqDMO5G1PouRmOKw7aVLL2fMyVPsnSbLEo3hOwQ+wuddFTzxCgA6t4VaVubddPr4 RdwFEMXxcHE4Kq82s+zPCFsGzpETpFGXEZS1s7eMGRhA7RsNJtYotCRdDXB6QqEr3LDG fhcmfkNppIl0/t7nHPnWJclDlg4MgovNPokgz0q11H/wXGgEM0LPFHzjcg66YR48XQaw sjooZT5SBj8lRueceEIFAtoFj0qBCNTYbEHP7rTCwX3m5O7D/ovw4sgqPulFuXwPRNqP pir2GNB/yucojvp31DVf0U3YGnGC+oKyYmtlt0+0tWy1Cutkr6Z8LH1UTkgN8yOyKiHX kthw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=yj24Wzj4vkjm2AUHX/QFJODVj3pT/AuxBZvUIsPK3rA=; b=GMksSS4ToipXPjIYmHVhAroyKmHiEKdbpiIA4X2tYPfEkz+Gyut1VRr2Y5GNLE2CeD EvOesIztrWxTEaZjHwwrnidu0g8UgHj1j06aNmJdFU2kS6yso1taE4265hgGVpVwIfTr 42EYAXRRX4/0tPyEHCzm9pShynEKckrtZGrRn22Rg0jdaHSNVPSbaulCzbJ3ijyAQmYs U3LSFIFDINTR28W6K5wPypx4iFDsz8dP3foXLXeSPEaQdQHpuS167fk82U4PZPDYTOZN tIdlqyDEAJhMKBoH7kEK2DQGvs797H+U2TqyyTcfYpNv5UStfgMHdjkNIepm2uwW+ycL 5Jlg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=X3gWdjH8; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id i1si567850ybj.344.2020.06.26.11.29.01 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 26 Jun 2020 11:29:01 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=X3gWdjH8; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:38204 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jot5w-0004wb-Gq for patch@linaro.org; Fri, 26 Jun 2020 14:29:00 -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) 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-Received: by 2002:a5d:6045:: with SMTP id j5mr4936219wrt.209.1593195786722; Fri, 26 Jun 2020 11:23:06 -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) From: =?utf-8?q?Alex_Benn=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 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_Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, Wainer dos Santos Moschetta , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?b?w6k=?= , cota@braap.org, aurelien@aurel32.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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ée Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20200622143204.12921-19-alex.bennee@linaro.org> --- .gitlab-ci.yml | 6 ++++++ 1 file changed, 6 insertions(+) -- 2.20.1 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 +# 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' From patchwork Fri Jun 26 18:13:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 191899 Delivered-To: patch@linaro.org Received: by 2002:a54:3249:0:0:0:0:0 with SMTP id g9csp651344ecs; Fri, 26 Jun 2020 11:24:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw1w2uedEqYMQ8s1b44qX/dFOda1qzbVMPHk97Ou/s/2oc1veCptITYupPTYB5/HFbvqvys X-Received: by 2002:a25:bd4c:: with SMTP id p12mr7589064ybm.471.1593195845849; Fri, 26 Jun 2020 11:24:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593195845; cv=none; d=google.com; s=arc-20160816; b=xc6j1Gxg3PojRabhawUSjnrYoB3gZlZDzkvpODx0mN5UgtZ7YzsxjoiC4lMCqJ7bfG 3cn7/a55iaL3EQLPpk9Bf/GnyV6iEFY1CaLH1hX5zRhuHjO/tP477sxjebCSIdU14YXx 2y2t6TJtk/gsPleWJt560cTgKmwjQRQ/GLQcy3rehkASd19Mrx3XvhYSDEVg44sU9kki +5h1aPsQLreLux7bSuuSIqGzBlPDb/0c0nlPcdzY8N7CiJWF7W09LmQyTDOP1kY5DTqv zhnuSPA/nbkKT3eW1RqRLc0TOjd6k3fCqJqBwDe2FojOyihHFUYrFckyhxaxpTbJHP1m wkrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=vbgKfgzF0oNn2074SqLFMYEK1X+QIMzjn//YRC3OJSQ=; b=rKEnZhpNYNSjZ7iOtQj/sQvFfQA2r3yy9JwEGYjC3VG7BO3LAj0EcMQTm6F7IjEwuD ECOKE3A30s9DZJzudhYZVON4EkzQcFjJrEAStc8w7qI1RzElyYGTcyoxFe/FOfrMs000 hnDvgtL+uBtRcyO/LtBWSvByEFJmYR88iV4jViMRn3oxtoipZdfOmljzQvEg5qcLji2t WfvxAb/5tWh6y6ifsKHB7iynHAsI6XOjbET8DmL329HgB5iTzB8zHuGDHPwjnOahWBam pJ6aM7unX/wQEavrtANy3xgTGy5hX4bHtDycGmNCni5xslUZzWzz7FS9oRMEKfqyzNCb mibw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="Ly/I8LaG"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id c4si24060623ybs.411.2020.06.26.11.24.05 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 26 Jun 2020 11:24:05 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="Ly/I8LaG"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:45622 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jot1B-0004rU-5m for patch@linaro.org; Fri, 26 Jun 2020 14:24:05 -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) 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-Received: by 2002:a7b:ce97:: with SMTP id q23mr4784657wmj.89.1593195782665; Fri, 26 Jun 2020 11:23:02 -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) From: =?utf-8?q?Alex_Benn=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 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_Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, Wainer dos Santos Moschetta , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?b?w6k=?= , cota@braap.org, aurelien@aurel32.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" As we run check-qtest in "SLOW" mode this can timeout so split into two jobs. Signed-off-by: Alex Bennée --- .gitlab-ci.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) -- 2.20.1 Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth 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 -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=slow build-tcg-disabled: From patchwork Fri Jun 26 18:13:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 191912 Delivered-To: patch@linaro.org Received: by 2002:a54:3249:0:0:0:0:0 with SMTP id g9csp655881ecs; Fri, 26 Jun 2020 11:31:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxD7i5h+UgsYum0szEDT4t7RZkrqlTSv8hN/PyLyNKhfLgmJ+niFq0NQ0VQep0I9SYLJ9gt X-Received: by 2002:a05:6902:1005:: with SMTP id w5mr7993933ybt.173.1593196276827; Fri, 26 Jun 2020 11:31:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593196276; cv=none; d=google.com; s=arc-20160816; b=wUL6/O0fT4fP7j0wzs/2xCPX5O4OJwUWIGVtpjJ50c7k9bpL7gHX7EAcpHVs3YG+I1 PGzOStNndIM8qcx4ZbFqn9JDIcamc0LHVUf8t41Fw6Bq4KW1ovehMU6H8bjnMHqX6Qix WfXghQ89QXl5OcpUKDckh9LeJ+XHpV5xhuEJwruAzqC7SPXiMPmlPc45HBZFeD3JBF+o cAfdKs3Il1W9N5OE49/Tfe16hzW3JUAwD4jtJlAIm2hKl5kmwt70kj+1dDEtmxa0E6Rd 97DO+28R7l0PpO3CGd/ZHelkX3PWvydD7Fn6KjEwvo/hjS6WtFMRf0AX3OATMb0hInXF OEag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=AGl2Uc8EGJJxA1tr+9fN1UmCX9zweogDk66dtMF1ioY=; b=YsfLIbVTZmRWqSh39lRK4A14PYhiEAJI2r3fNbxlc4TCvCAAxOQMuUicyq9yi4vfNv UYVNk/nrB/o4x/gw0k0RrW2da6aq/9BYVMAyeNoFPIVXnFMJbKqqeYNtrBcpRprGthjm YfAbZ7d1NzIjXzFrzoGKj3TUDDqaK2C+W50bi+K/vGaY7dCx5gW9wYwp+nBMyOfu5JVY VjbTCYIsx/sJhbES1eO3Amgs+F10RTtSglYCgS4tDTtWh2fIVT70wq7yTjV7O4bSUmEV BTaMQr0tt0rr7nRIsgPEOv/iezYV8+/oPsmbS1maaGaKmgCUk9BZYCm3El7lpqiKJQey B81Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=M9PAo1GG; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id n191si25717084yba.173.2020.06.26.11.31.16 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 26 Jun 2020 11:31:16 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=M9PAo1GG; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:47604 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jot88-0000Qh-6C for patch@linaro.org; Fri, 26 Jun 2020 14:31:16 -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) 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-Received: by 2002:a1c:f608:: with SMTP id w8mr4632677wmc.78.1593195783948; Fri, 26 Jun 2020 11:23:03 -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) From: =?utf-8?q?Alex_Benn=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 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_Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, cota@braap.org, aurelien@aurel32.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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ée --- .gitlab-ci.d/containers.yml | 4 ++++ 1 file changed, 4 insertions(+) -- 2.20.1 Reviewed-by: Philippe Mathieu-Daudé 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/* amd64-centos7-container: <<: *container_job_definition From patchwork Fri Jun 26 18:13:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 191901 Delivered-To: patch@linaro.org Received: by 2002:a54:3249:0:0:0:0:0 with SMTP id g9csp651719ecs; Fri, 26 Jun 2020 11:24:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyaWqQOjIs/xVEgBX2r1jjGf1xf8kpDKIiI2sFwdpObWrmLYq4Zl99Fls45K2fHBceYi6pX X-Received: by 2002:a25:c683:: with SMTP id k125mr7608974ybf.305.1593195881959; Fri, 26 Jun 2020 11:24:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593195881; cv=none; d=google.com; s=arc-20160816; b=C/h78mglo9ofMwl6ig/iS761p60TboGGL97Xe3uqxaAT1NB6t+k3KkmcwD0MvbEH7M wJfw6+DkZWHputA9ry5v67LeNBKo1QVFXOpSyQgWUQxZbIkdeC2hvTKKga96qp4VFIG9 U5YXOoni/a1QbM/uGfTs51d8fct+DNc8cGvbsrbM9HUKzextDAsmjEOKWh0o9eIcgmuj m9zU6qzQz+UnSyi1rAooqKocw0lkxhyeVYg+QfOp8vDAWArl8O5ixIbQwh3qty+DNqaS hA3D3GAgy5meMi+dgMmz/WsfdEB9iHlPYGQLVkpjr0fExlPCBD1WwK4KzooS4JSMCePD 4AeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=eb5iaPGhoDcsV6Aa17DQE5OucQ4Fpz4RuFDlJP0p52E=; b=nmu3Ldv8w1rRb5wUPqaEsPUTduOd156BRNKHZdhpQlluFo84y+N+owWFb8Ptpx6QCz S9NEhfpYsvdhANxjzBMohq4724TsSdmOSg30vqDP7OzyvZdwiT21tSbu34oRpzd/dr1M 57oGI2r9/rUve7RsnoC5O29BvcoOsgwWe4+cK44Z+FmRdf73kvD7DXTp/JT8786wi1Cv np8EJ44DlNIhqXQBr1Nj67c989FM9oqeLdBhKMXWx+fPt921uaJt8zOQI00lZhoZIa34 C2THPVHnDBAdNgBAUVvByJObg00KysogbNDBVYPLCZgjYgrOxoFDQ/bgx8KnyblQRhC9 VyIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=uNC4KkaH; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 194si24236330ybn.352.2020.06.26.11.24.41 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 26 Jun 2020 11:24:41 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=uNC4KkaH; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:48128 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jot1l-0005sl-Bs for patch@linaro.org; Fri, 26 Jun 2020 14:24:41 -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) 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-Received: by 2002:a1c:28c5:: with SMTP id o188mr4573163wmo.62.1593195772856; Fri, 26 Jun 2020 11:22:52 -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) From: =?utf-8?q?Alex_Benn=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 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_Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, cota@braap.org, aurelien@aurel32.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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: => 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ée --- .gitlab-ci.d/containers.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) -- 2.20.1 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="$CI_REGISTRY_IMAGE/qemu/$NAME:latest" - export COMMON_TAG="$CI_REGISTRY/qemu-project/qemu/$NAME:latest" + - apk add python3 - docker info - docker login registry.gitlab.com -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_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=1 docker build --cache-from "$TAG" --cache-from "$COMMON_TAG" --tag "$TAG" - --build-arg BUILDKIT_INLINE_CACHE=1 - -f "tests/docker/dockerfiles/$NAME.docker" 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