From patchwork Mon Apr 19 14:54:11 2021 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: 423997 Delivered-To: patch@linaro.org Received: by 2002:a02:6a6f:0:0:0:0:0 with SMTP id m47csp2791272jaf; Mon, 19 Apr 2021 07:56:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx44mjGghhGgaBjwCBhDRcUzWiR/xvCeTA2MdHms2IKucO8iRreVBBhijJDPqkFqy7QrePD X-Received: by 2002:a02:c908:: with SMTP id t8mr17151335jao.78.1618844166285; Mon, 19 Apr 2021 07:56:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618844166; cv=none; d=google.com; s=arc-20160816; b=eWZtL12sT50wIoTdpFpBW5TELuiyBd4zASTtTdd1pFVwIAqhzmUQjOcbBGgHvtKBEo YZ2ohbUZuBL7yJbi73yhT1l7cBE+A8To2+MXZ2asm57HhdMbx4SdwtSUEhPd1f0j5ARv 6clkwsbyo2jpeoGjhMLm4ESLzQElI3Vg2Wz3Ri2fbhIvAzlUgjHucwcDP49dWasGq+aB LCyoP4N+VNRqbtIpKEaktafoa9OK0ZuvVY+HIRIFXgDQmdYoZk/8ULyISllwjC3WftOB AxVkA6K+SSIVhcfDU+9Fr6Zqchpvr3VUUqMfs5s4xB7iZNhv5hpBJgMmjZfKYrkQ9ilk jIAw== 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=tLKjqMKIjh3YXoNizCAFrfsiNgZ3bBB8hCFaWw47VeQ=; b=L/TyCkQ674EcpSIynvsftgT8OqX6ndJyMdBw9MSN1hqwyLrD/p9mUHaLQWGEfZC7bO 3APqs+rrF+633KKoC1Tlurp5674DsCUQwuJ1wL/aayl0p5Z1qGElyEkXZJaCv3EmGHDa bcjNTMr6bASo0O8QD5skcqjhhy9aUGbW3hYmr5KMcQXxeGe31jFI/xt+cdC+9OOt1kBR kwua14KWxE4hAA7d6IsfCLJ2J1ppJoj/x+cCUZJ1twYYszV+k6qc58d+pSxeR1k3e2nT Nr7/fjg9nZyFNBHPdoaJMvaUZLdrHHX4TCVAUBsZvhNqH8xeof6K6rEwkhesk1H+6HjD fiKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=qg5j9pPo; 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 b27si11781963jav.110.2021.04.19.07.56.06 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 19 Apr 2021 07:56:06 -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=qg5j9pPo; 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]:49050 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lYVJl-0002za-My for patch@linaro.org; Mon, 19 Apr 2021 10:56:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44502) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lYVIP-0002yj-1P for qemu-devel@nongnu.org; Mon, 19 Apr 2021 10:54:41 -0400 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]:36419) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lYVIN-0006s5-HK for qemu-devel@nongnu.org; Mon, 19 Apr 2021 10:54:40 -0400 Received: by mail-wm1-x333.google.com with SMTP id o9-20020a1c41090000b029012c8dac9d47so11367740wma.1 for ; Mon, 19 Apr 2021 07:54:39 -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=tLKjqMKIjh3YXoNizCAFrfsiNgZ3bBB8hCFaWw47VeQ=; b=qg5j9pPoXKLLVMKjdZXYeB9xLDGsqNfcMjAlCvRQ3hBBPoQiIaaiBNrqtD0Ly3nG0M CKKkF93sSqAMqcLvfxWvfvgC48ZtAMKRdu8C23LrKWd6Q/TklIp1Z7tGAE+NstgaUlVA FoMAhL5shFM6ztdmOHKjUcYZcEMaVwuUcSPsNDG4AeuscDGs79pSuuB6yhWArCd72GH/ hmxoDEzgKJc7jh6WWql+3BP1YYcE/0m3Ao2K7L87vSTh3JsWR73SxzKRjKfhdY5KSmD3 VfJPB+xWqGWeGrwMWmdeJdEaD6bC05Rt36WcErywmeOJipEJvHRfxdxFyTbXvDWW67Oo 17dg== 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=tLKjqMKIjh3YXoNizCAFrfsiNgZ3bBB8hCFaWw47VeQ=; b=lKwWbGXH7wtqkF0SjMPfi43SJMOmGMDhlwJTb8VXcrDVq4GNcY9o7zZ5/7VnsyhvH6 2q90hIuWZNyHIL2r0H8vIqKDE6CDSChI3hjomV3VlPF6UMqDKuJLZaf8gdEt6eCD4086 Q7aDB7aPSgmhF2OsOS0cswXE28vpZ9495jO8L1pAw87HGFxvmZJw5/NW9kPxSUEbON8R lZe2aeX1mZh7Nv995wxXjHgE1HCBUuiATjDPsXuY2N737STs5cPhcmjIs2E414GbGffX tk25AhubBecV9cyLDnK7DP/3mHcij/bNAsr54hJXgqkneKs+9lwzUyuXzsIUo/JCka7a MI2Q== X-Gm-Message-State: AOAM533CXVORqMHULOIHLxYUujl7xAF3wF1yrs3sTNEZnlgTCTbo5yPa f6BCBq7b0p5D2S8Kanhpr2hpzQ== X-Received: by 2002:a05:600c:3790:: with SMTP id o16mr17134396wmr.174.1618844077923; Mon, 19 Apr 2021 07:54:37 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id g9sm20127354wmh.21.2021.04.19.07.54.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:54:36 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id ABF171FF87; Mon, 19 Apr 2021 15:54:35 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 01/25] checkpatch: Fix use of uninitialized value Date: Mon, 19 Apr 2021 15:54:11 +0100 Message-Id: <20210419145435.14083-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210419145435.14083-1-alex.bennee@linaro.org> References: <20210419145435.14083-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x333.google.com 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=ham autolearn_force=no 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, Isaku Yamahata , berrange@redhat.com, f4bug@amsat.org, Greg Kurz , stefanha@redhat.com, crosa@redhat.com, pbonzini@redhat.com, =?utf-8?q?Alex_Benn=C3=A9e?= , aurelien@aurel32.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Greg Kurz checkfilename() doesn't always set $acpi_testexpected. Fix the following warning: Use of uninitialized value $acpi_testexpected in string eq at ./scripts/checkpatch.pl line 1529. Fixes: d2f1af0e4120 ("checkpatch: don't emit warning on newly created acpi data files") Signed-off-by: Greg Kurz Reviewed-by: Isaku Yamahata Reviewed-by: Alex Bennée Cc: isaku.yamahata@intel.com Message-Id: <20210408164610.14229-1-alex.bennee@linaro.org> Message-Id: <161786467973.295167.5612704777283969903.stgit@bahia.lan> Signed-off-by: Alex Bennée --- scripts/checkpatch.pl | 1 + 1 file changed, 1 insertion(+) -- 2.20.1 diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 8f7053ec9b..3d185cceac 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -1532,6 +1532,7 @@ sub process { ($line =~ /\{\s*([\w\/\.\-]*)\s*\=\>\s*([\w\/\.\-]*)\s*\}/ && (defined($1) || defined($2)))) && !(($realfile ne '') && + defined($acpi_testexpected) && ($realfile eq $acpi_testexpected))) { $reported_maintainer_file = 1; WARN("added, moved or deleted file(s), does MAINTAINERS need updating?\n" . $herecurr); From patchwork Mon Apr 19 14:54:12 2021 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: 423998 Delivered-To: patch@linaro.org Received: by 2002:a02:6a6f:0:0:0:0:0 with SMTP id m47csp2791278jaf; Mon, 19 Apr 2021 07:56:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw5Pj3tcGlZEhs8jUe6eZOfhJwTsn+RbMM43VuRB6AUOghtEBSRmB9xRqziH7P1xYKOSqMI X-Received: by 2002:a05:6638:218b:: with SMTP id s11mr16832808jaj.81.1618844166681; Mon, 19 Apr 2021 07:56:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618844166; cv=none; d=google.com; s=arc-20160816; b=eTo4S2O0am/ShZWmyWuZjxYtZqrD7CFWbCypg5BV6fi6mKuMii5NIh/RN1b/ZBfOT9 dR2F/rLirBO0raTf5ayuVmibkBV3L1UrgzPR9JZMsLn68B7UWoOQD2ozqlwwHoTqa2IH KsxR3mRCCdnpXjkefmRrbHQA1LfGNHizOZUL9UWq8PyInJRMF2z4cA8Jp9iJpk18eC88 pR5TzsJHzxLwR597s04vbeEtV4AopTdvKS1N2xP4e7hWQ1REnLJArg0+iJ/8bW53bzo6 jJEPZh7bUFmvG6cJQ1FycBeaKgL+qOCpiJrw/SAz0x4aPiW16wea8kXGdHcxLTD6EGaV lsig== 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=3jUznPzvzYHkJS30t4l+mHbEcaUIGUHIWC+isF9wstk=; b=YGF8sV1Enmq8IumwhlkMQLYo+4lSZkglMQTsMOS/Jm8sq8lC6MjLPcyUWPdGh+0Tof EfmIzwUN0u9//EvlCIwFEYWbNH0XzHTyD5UvnB5RLwW+XPGL8GdypiFNltDoBXwVgzoz 6eGWHSowr9jsz/IB49tHEJn2Jrat4nNIbRu8K+TUifmZt4hViG3sthAb/agp/N44djCZ Ka2kL06pjuT+1p4NcxEa2kspfelVO1Ci6CH9MVaUjRNGdNCVWkwUvAco6u4Tg50u9Qzq 3NjwMm+wS8f3SEXZhCetLCgRrMN1Q9PW4dpl2CC+oa6wK830Uf/TyUNsN/fz0G0T6Xsm F7/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=ZH4KduCB; 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 k25si14404030iom.55.2021.04.19.07.56.06 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 19 Apr 2021 07:56:06 -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=ZH4KduCB; 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]:49118 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lYVJm-00031e-2x for patch@linaro.org; Mon, 19 Apr 2021 10:56:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44524) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lYVIQ-0002zp-MI for qemu-devel@nongnu.org; Mon, 19 Apr 2021 10:54:42 -0400 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]:55041) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lYVIP-0006sr-5Y for qemu-devel@nongnu.org; Mon, 19 Apr 2021 10:54:42 -0400 Received: by mail-wm1-x32e.google.com with SMTP id k128so18366916wmk.4 for ; Mon, 19 Apr 2021 07:54:40 -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=3jUznPzvzYHkJS30t4l+mHbEcaUIGUHIWC+isF9wstk=; b=ZH4KduCBUrOjWxEcg37NF6qIRyjPN05++M+GQYpBlk3zCOpuP7o735wj8C9DrLDGkr bKg7MunXx9aLcXVil2GlagEgprlgV7Z2NNFgpC1aXQZOdz9VtAbsl8KK+uKQFehRNC87 RYdYrnZeKEBqTZWUaAjA8Hk3d705xAcQNdWRbUQwilNxrJs5PYhGpMuQ105+ImOBFWEU hacwtUTTrqDVvRn7gMycLTlx8T2vGT5gYE6DjjkjgoC5WjCzU+HF8dsK1+lUwpcwTgXI errfsvdQBLILd4VsECq9t8lA2teBdprmRtcXPxcY8mJRiX9jevRNPEWuwQKEdwOgSemg +tdA== 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=3jUznPzvzYHkJS30t4l+mHbEcaUIGUHIWC+isF9wstk=; b=lQ9ei85Z314ftqlpxW1lkbAkhGnclP/tzeAGxd/Dhqa0eQrV/3oAP8LS4ECkqyIyYR k5HS5pEF8f9WfcHblygMVwyEy6OXGYdKDOz/NZ4bSyfhuRM8SQRcEEi9IXp5lM5g6PEy qb46lycd3eogJW0h4nvxqJ1c1cmWefSy72Rcae4iFDqHK2ZuDVzLEbEayr0AxTMPPyau MjYRYsuc0VVJZ51mngRmSG4BpCnIcoxkA2+cMb8PVLTUZ1JbKLQPSi6TrV8vtOf577R5 ukipzd4q13bnj3UON50OB5kNsxh9+Eq3hOfZYIq/9hAPL83XRXIb+1+ZDbBVVvH9nFtP Nkog== X-Gm-Message-State: AOAM533mkZmoT1OQ2O8/uDnNSRaQFuLbYWnWOKAvtOziGlTw+fqjR3x1 oEc0Mz9bSm33gZ/fTDT66VSmPQ== X-Received: by 2002:a1c:2857:: with SMTP id o84mr21899136wmo.181.1618844079827; Mon, 19 Apr 2021 07:54:39 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id c77sm19939554wme.37.2021.04.19.07.54.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:54:36 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id C41E21FF8C; Mon, 19 Apr 2021 15:54:35 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 02/25] tests/docker: fix copying of executable in "update" Date: Mon, 19 Apr 2021 15:54:12 +0100 Message-Id: <20210419145435.14083-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210419145435.14083-1-alex.bennee@linaro.org> References: <20210419145435.14083-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32e.google.com 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=ham autolearn_force=no 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, f4bug@amsat.org, Wainer dos Santos Moschetta , Willian Rampazzo , stefanha@redhat.com, crosa@redhat.com, pbonzini@redhat.com, =?utf-8?q?Alex_Benn=C3=A9e?= , aurelien@aurel32.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" We have the same symlink chasing problem when doing an "update" operation. Fix that. Based-on: 5e33f7fead ("tests/docker: better handle symlinked libs") Signed-off-by: Alex Bennée --- tests/docker/docker.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) -- 2.20.1 Reviewed-by: Willian Rampazzo diff --git a/tests/docker/docker.py b/tests/docker/docker.py index d28df4c140..0435a55d10 100755 --- a/tests/docker/docker.py +++ b/tests/docker/docker.py @@ -548,7 +548,14 @@ def run(self, args, argv): libs = _get_so_libs(args.executable) if libs: for l in libs: - tmp_tar.add(os.path.realpath(l), arcname=l) + so_path = os.path.dirname(l) + name = os.path.basename(l) + real_l = os.path.realpath(l) + try: + tmp_tar.add(real_l, arcname="%s/%s" % (so_path, name)) + except FileNotFoundError: + print("Couldn't add %s/%s to archive" % (so_path, name)) + pass # Create a Docker buildfile df = StringIO() From patchwork Mon Apr 19 14:54:13 2021 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: 423999 Delivered-To: patch@linaro.org Received: by 2002:a02:6a6f:0:0:0:0:0 with SMTP id m47csp2791323jaf; Mon, 19 Apr 2021 07:56:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzbuK0WHQYUCYqs17GslB6Q+CKVRQAg0m8lu+dGql99tWx9yUZcPWDY40QPPxC4RIgjDzXq X-Received: by 2002:a05:6e02:1bc3:: with SMTP id x3mr1325998ilv.47.1618844170436; Mon, 19 Apr 2021 07:56:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618844170; cv=none; d=google.com; s=arc-20160816; b=Qb5SW6c4jyIOWY5vaPu3kRVTKp/BLLHa9G86ZV7K0LMggm7UiFRipqfkcyjGnXo2kK Cv26vozIxk63pX4Mv2j1FmLk57lJNpDDvgHKpUompsCyUOAktb03zDoFqnu5HdMs/ToU DjCtSTD9yhY1lkFngLgMf1Z+D+Nv4VsZmEL2heXVpikTSOhujuJNpriEXzUabTt/JsO4 0iCoRPQxsJRJcSy5JELSncRq0Iq5ys+2+KSSXET3H1tUSmjy2S+Lmop3snPDvNB26Tbg 2Hhp2mXZiZP/Tem5T12ot6zyZTsoZ+aJDqIR8VlIMYYPkHIWILAeIiDp4guly5H93b4g oTmA== 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=+RapX0rJktJJYzf8Ecx4whGcyCHUxIuWWJtgYesJZUs=; b=wBE0qGx0L1z2if+knM1bWoEXIxQBSCQhKZVnbOacbO6/LiNA4fIYZgN0eoz5jNolmy kAs9tf5+q1GOgaJ34Qk2gVsD0TSlzf71R1ssGdPfFz208B39rYzMFKShrIKNQhdL7uis OqgljlA9a7Fdk/z/EhYNabH3/ZyYbtsr29IGilw7Dni5DXJy013or0wwmmc/9e1NpQOR 7ALnHHNx77Nwgcyye5J+X9P156Eo/vb3GZVuarHcxN0011Nz/2NMuwHkMo/58oxxTJME svjtHAuwwBa+GpdfjgoD4JH7RETSkAoMBh2xuVs5mNtvs09Y0axF4mX+SVmFbL2LyuV2 F0og== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Hy8rdEtJ; 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 w25si12311430jal.57.2021.04.19.07.56.10 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 19 Apr 2021 07:56:10 -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=Hy8rdEtJ; 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]:49282 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lYVJp-00035l-Pl for patch@linaro.org; Mon, 19 Apr 2021 10:56:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44532) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lYVIR-00031y-PR for qemu-devel@nongnu.org; Mon, 19 Apr 2021 10:54:43 -0400 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]:41831) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lYVIQ-0006u8-23 for qemu-devel@nongnu.org; Mon, 19 Apr 2021 10:54:43 -0400 Received: by mail-wr1-x42c.google.com with SMTP id k26so17947001wrc.8 for ; Mon, 19 Apr 2021 07:54:41 -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=+RapX0rJktJJYzf8Ecx4whGcyCHUxIuWWJtgYesJZUs=; b=Hy8rdEtJxP3XroBgcZV2gMf6fJHKnaRo2ms18KU9mCANVRP2qVgEcpAAPtcdOSHg5E 3aJTEqiTd5u42VI88BXEy+O0VAWMCeW4KmP2DCyRRpOLm4Be5TVge+p9XqqTMQvtnJ+D ZYZCcUGeJY5AE8BOwO5K6j5uG+Js0OC0e9AwojLsEJ/chWY21LvjKDW7gDv7czkZVMbM 6PfpEHCLpciGcs7QI9GDVem2a/QsKjzjedQwHI6UwOfPrSRhXUjlm70AhiABf2TCe7nC o/W0Z1zl9vnbta8z6194QQIF//UAI4yrSgAzgmR31H3fJuAPlIbA+GkDT2b2/XPnQHqY ncIg== 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=+RapX0rJktJJYzf8Ecx4whGcyCHUxIuWWJtgYesJZUs=; b=F2/wCz9m6gh1sNplvbJ+YkRyXLfqy41M+TnSc8KR815YyneAtyKPTQ/SBQ8hf/Qr2D vOoGTIOA7CDq2Dgsx5YqEL7s9M32+FCv85HijBIoXhHbMJFki7iQx/1sm21K6WjCeapq Kjl4sbDp8twd8DJuBUNRbSWLmAHqURgOh0Yfb20PRvb+jM9lS9CNGFknnAkvQIt8doqZ mVExUT5Ta2sMM3+n+q0mkafuVhai69xkX15GHtYXVDdRGJ+Uklz7q9E0H+IucxurV/0H sFYgXglCyrsqK+9BbECk96dEd0deHGjYN6P91PNGKwTPNJigT+7q6Poy/neJe02XEh9U kdYQ== X-Gm-Message-State: AOAM532wNBAahlhIjhKcY3ScQeL5IhZW8Tn+HQI+nIW6M+ksqAbPO2/n WUIPjQgmM/tbn/CPCXO7xIJBxA== X-Received: by 2002:adf:f0cc:: with SMTP id x12mr15297419wro.16.1618844080688; Mon, 19 Apr 2021 07:54:40 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id l4sm23482169wrx.24.2021.04.19.07.54.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:54:37 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id DCC141FF8F; Mon, 19 Apr 2021 15:54:35 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 03/25] tests/docker: make executable an optional argument to "update" Date: Mon, 19 Apr 2021 15:54:13 +0100 Message-Id: <20210419145435.14083-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210419145435.14083-1-alex.bennee@linaro.org> References: <20210419145435.14083-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42c.google.com 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=ham autolearn_force=no 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, f4bug@amsat.org, Wainer dos Santos Moschetta , Willian Rampazzo , stefanha@redhat.com, crosa@redhat.com, pbonzini@redhat.com, =?utf-8?q?Alex_Benn=C3=A9e?= , aurelien@aurel32.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" We're going to extend the abilities of the command shortly. Signed-off-by: Alex Bennée --- v2 - fix indention issue --- tests/docker/Makefile.include | 2 +- tests/docker/docker.py | 56 ++++++++++++++++++----------------- 2 files changed, 30 insertions(+), 28 deletions(-) -- 2.20.1 Reviewed-by: Willian Rampazzo diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include index 9f464cb92c..820423d718 100644 --- a/tests/docker/Makefile.include +++ b/tests/docker/Makefile.include @@ -248,7 +248,7 @@ docker-run: docker-qemu-src $(if $(EXECUTABLE), \ $(call quiet-command, \ $(DOCKER_SCRIPT) update \ - $(IMAGE) $(EXECUTABLE), \ + $(IMAGE) --executable $(EXECUTABLE), \ " COPYING $(EXECUTABLE) to $(IMAGE)")) $(call quiet-command, \ $(DOCKER_SCRIPT) run \ diff --git a/tests/docker/docker.py b/tests/docker/docker.py index 0435a55d10..9b3425fec2 100755 --- a/tests/docker/docker.py +++ b/tests/docker/docker.py @@ -523,7 +523,7 @@ class UpdateCommand(SubCommand): def args(self, parser): parser.add_argument("tag", help="Image Tag") - parser.add_argument("executable", + parser.add_argument("--executable", help="Executable to copy") def run(self, args, argv): @@ -532,35 +532,37 @@ def run(self, args, argv): tmp = tempfile.NamedTemporaryFile(suffix="dckr.tar.gz") tmp_tar = TarFile(fileobj=tmp, mode='w') - # Add the executable to the tarball, using the current - # configured binfmt_misc path. If we don't get a path then we - # only need the support libraries copied - ff, enabled = _check_binfmt_misc(args.executable) - - if not enabled: - print("binfmt_misc not enabled, update disabled") - return 1 - - if ff: - tmp_tar.add(args.executable, arcname=ff) - - # Add any associated libraries - libs = _get_so_libs(args.executable) - if libs: - for l in libs: - so_path = os.path.dirname(l) - name = os.path.basename(l) - real_l = os.path.realpath(l) - try: - tmp_tar.add(real_l, arcname="%s/%s" % (so_path, name)) - except FileNotFoundError: - print("Couldn't add %s/%s to archive" % (so_path, name)) - pass - # Create a Docker buildfile df = StringIO() df.write(u"FROM %s\n" % args.tag) - df.write(u"ADD . /\n") + + if args.executable: + # Add the executable to the tarball, using the current + # configured binfmt_misc path. If we don't get a path then we + # only need the support libraries copied + ff, enabled = _check_binfmt_misc(args.executable) + + if not enabled: + print("binfmt_misc not enabled, update disabled") + return 1 + + if ff: + tmp_tar.add(args.executable, arcname=ff) + + # Add any associated libraries + libs = _get_so_libs(args.executable) + if libs: + for l in libs: + so_path = os.path.dirname(l) + name = os.path.basename(l) + real_l = os.path.realpath(l) + try: + tmp_tar.add(real_l, arcname="%s/%s" % (so_path, name)) + except FileNotFoundError: + print("Couldn't add %s/%s to archive" % (so_path, name)) + pass + + df.write(u"ADD . /\n") df_bytes = BytesIO(bytes(df.getvalue(), "UTF-8")) From patchwork Mon Apr 19 14:54:14 2021 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: 424003 Delivered-To: patch@linaro.org Received: by 2002:a02:6a6f:0:0:0:0:0 with SMTP id m47csp2793216jaf; Mon, 19 Apr 2021 07:58:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyMFFV8dBlr2TsgAHD3+5CFajt5HvY/POA2YPi/oLBUt6cp4+7Rd/TIicxBMwRT25bSNJRJ X-Received: by 2002:a05:6638:150:: with SMTP id y16mr3816632jao.122.1618844308730; Mon, 19 Apr 2021 07:58:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618844308; cv=none; d=google.com; s=arc-20160816; b=lVptJmgIiErHvFwnQdLVJUw9AT0AlR/UtYJ9A3ALyEza5wRfmSoIy47J8k7oBCG/KZ kDaOh0gwJLkmp90Tk8VRluxdNwR3/6TVNavLjcuy+PvdS1H69LSHaMeHRBtB2X9mFJuA 5bDgbprM0ecKg+5Zh7L6tE7dK8/DtyMGeJK+gG4A/4hNB+CfzK5RDSCimgm5SPu8mEWI vhEtiUiA+3fOgvIcXusP7IMYXz6KHvTY3BMLg2SVa1XnvVfRvmiyYkYiCo1iFoacHbnM lEhrrA1bCIbUo281l5qwTHTLaywqRvdkH6D+t1o+RF/cYzVF13gHZw0SR4V6zjCUA0Ys vCmQ== 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=Ie/HrKCWMTgDMtDkCgxYlk1rMs08SJcDlY4V+84QG/k=; b=l6D48VlQlli3RjBySPn86XNuikFtlE3/MiQbh4e+k8W/Ychx0axyQagzhvZHr5JkU+ dqTmwvtKgz+mfhA+XgXWIBYPWKLBJaFgoQq7AvwMCsFNpKpRJNhVROD5K5D/KhFooT// 39dU5ISuyMe50TCUva4K6CCyhtvMMS+CS8JJZAYVciw1lMtEwwLa2jHPHuy+qOQLdtly hiSvBBqgR3+Q7z6HV6/h8/Wj3De0RKY6Ra/H6JSmusW2oVZ1SSnSi9ETf93tl5niqiC/ VrZLrD/knlT7FwIqi956KHzbLHH2ujw8Hh7dg/V7O3nDxk9l+LNIlK8O8SofjHXJQmND 6J/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=GwRCwpNr; 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 j8si14398144jat.114.2021.04.19.07.58.28 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 19 Apr 2021 07:58:28 -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=GwRCwpNr; 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]:57960 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lYVM4-0006jH-4w for patch@linaro.org; Mon, 19 Apr 2021 10:58:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44562) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lYVIU-00039Y-Pk for qemu-devel@nongnu.org; Mon, 19 Apr 2021 10:54:46 -0400 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]:35774) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lYVIR-0006ur-Vl for qemu-devel@nongnu.org; Mon, 19 Apr 2021 10:54:46 -0400 Received: by mail-wm1-x332.google.com with SMTP id w7-20020a1cdf070000b0290125f388fb34so18261884wmg.0 for ; Mon, 19 Apr 2021 07:54:43 -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=Ie/HrKCWMTgDMtDkCgxYlk1rMs08SJcDlY4V+84QG/k=; b=GwRCwpNroyxUenjgMzBfjd9rXFP8QZLVy9nC6E8HdrUZUhMXaK0SbT4uCas25vRaoV sEWCpjCToFMw0gaQr8MxSc25KZSdJWGb5VV9/Z+s1JbruHdQym9MlefD31kCq3C6YKmM Nb4UG3MlbvhJYXc0Tp/n9HP1OKfC893eE8sY6qcVrLj7YFU68woj2KIci6eZRHsME/nk aszUt3AG+FTeiP1S3HOG4tD7qVIImcF5q5+c7h0Yapqvwq3J22JHAKbJQODyZOg5K8Q0 0uPj+Zo1J9Ww0nqW96w0VE4BUFkny66YGREL6AwQ/ufbYAEaHv+JisuR4zYJtg2XJYb5 Zh5g== 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=Ie/HrKCWMTgDMtDkCgxYlk1rMs08SJcDlY4V+84QG/k=; b=YuGkLmX3UuaVS4yrdY2TbRwcHEu1laOoHmXm1okT1CpOMX4eyI2AffPVI9Q+Gb7joG yQNwFhaMgnrKIBPZfV9Mw38ndq6bS+jyzEAkQVgtyvm8OuFXTBub1olNx/h1/o8BxsNQ gdUN5rJl/La23UP4DqrEakzDMQKgxB3gtCEXTukB8qOKVutLjslAeujbGztgA3Z2Pjxa Lekg9LJNEw3QTTHuXba3fH9PZO1cDTOuUfH8eYsbfAl7fV0WPWX7iqPoEG2l31iu3H9w /GWlu4iPtET4PR3hfBgjYIXV82yiuzW11cS/i/ReAiciez5QY5LPqPxgo+Ib/muV3Ydb dk5w== X-Gm-Message-State: AOAM531D2/rid/4fpbKk8RiWew/7hYuBRn/4sDYmJxYoql7f1O5UUC3U RAHPQHCRy1TOO3Cqu5aKILuc5g== X-Received: by 2002:a05:600c:20c:: with SMTP id 12mr21434683wmi.138.1618844082675; Mon, 19 Apr 2021 07:54:42 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id a142sm1477950wmd.7.2021.04.19.07.54.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:54:39 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id F1FEC1FF90; Mon, 19 Apr 2021 15:54:35 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 04/25] tests/docker: allow "update" to add the current user Date: Mon, 19 Apr 2021 15:54:14 +0100 Message-Id: <20210419145435.14083-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210419145435.14083-1-alex.bennee@linaro.org> References: <20210419145435.14083-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x332.google.com 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=ham autolearn_force=no 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, f4bug@amsat.org, Wainer dos Santos Moschetta , Willian Rampazzo , stefanha@redhat.com, crosa@redhat.com, pbonzini@redhat.com, =?utf-8?q?Alex_Benn=C3=A9e?= , aurelien@aurel32.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" The current user functionality is used for cross compiling to avoid complications with permissions when building test programs. However for images that come from the registry we still need the ability to add the user after the fact. Signed-off-by: Alex Bennée --- tests/docker/docker.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) -- 2.20.1 Reviewed-by: Willian Rampazzo diff --git a/tests/docker/docker.py b/tests/docker/docker.py index 9b3425fec2..7a14058801 100755 --- a/tests/docker/docker.py +++ b/tests/docker/docker.py @@ -517,7 +517,7 @@ def run(self, args, argv): class UpdateCommand(SubCommand): - """ Update a docker image with new executables. Args: """ + """ Update a docker image. Args: """ name = "update" def args(self, parser): @@ -525,6 +525,9 @@ def args(self, parser): help="Image Tag") parser.add_argument("--executable", help="Executable to copy") + parser.add_argument("--add-current-user", "-u", dest="user", + action="store_true", + help="Add the current user to image's passwd") def run(self, args, argv): # Create a temporary tarball with our whole build context and @@ -564,6 +567,13 @@ def run(self, args, argv): df.write(u"ADD . /\n") + if args.user: + uid = os.getuid() + uname = getpwuid(uid).pw_name + df.write("\n") + df.write("RUN id %s 2>/dev/null || useradd -u %d -U %s" % + (uname, uid, uname)) + df_bytes = BytesIO(bytes(df.getvalue(), "UTF-8")) df_tar = TarInfo(name="Dockerfile") From patchwork Mon Apr 19 14:54:15 2021 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: 424000 Delivered-To: patch@linaro.org Received: by 2002:a02:6a6f:0:0:0:0:0 with SMTP id m47csp2792818jaf; Mon, 19 Apr 2021 07:58:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxhLWgeVQXxxebLNsx1omY+j6ca08U+pr+quBa8LgXAkh0By1Fsz1BPApFMu+StUCFLbduZ X-Received: by 2002:a05:6602:2e82:: with SMTP id m2mr14780273iow.70.1618844281071; Mon, 19 Apr 2021 07:58:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618844281; cv=none; d=google.com; s=arc-20160816; b=fFDEjHBYZmO0OJp92GPWWHzPx1SB/M4+HJXqDT5mIsvdmgChFgQiXvUOcw6xnpI1rs 46kEMo/XQzK0nbElJmFrpwyJQRij6kyF3FdbjHoaRFEwbhUaCSya04bNQxxEUvzTMyI+ WPaSRdWsv4OhS36mrRNl4SSyBKuT7mi77R6J8YoPudBtH1yUMvL8U7RckbSlxFnmGofH KO+na0wAkQ8+diz/pYXiytxsQ7rcGiKWRikR5/Y+/Tmwir8oT6zRxlNy/YZ9Jk6mKHtK 2jyWgNv1OBnjU/lMKy56Hd+gqAt/ZPZWk/IhwnseIYZg9gAttlF8jMw8r9GtHL4xBgEG gTlA== 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=RbxDIMfGuk4jyYqFSJ3FeoHclrUhVHd7ZrGgUd6bcYQ=; b=F0ChlN//yoX+w4aZJDWd7y6md1X6l9Xp9qK5zOsSZ2P2GO6flf/wa2oElIqPJRwMbe AEDEDuxPu2WOjW83QEQN84TDYgXv5gKNrRsC8x6S4I95wYDqhJXXMZzmsFkHwuHl7qNO 0ysq6PgLO20NpHHuZvFRbUaQurimTjhR4MWo2GTAtlRNBwS2mB05yYCRugszqr31jXNK 5Dg90mh2RCE9LG/Swdpw568hC+2V659RFyRmfsizjJ07DPDXXXL/JpCI2Jj0RogprJUH nRpII1K9DLhJHl8rDykOQNeDB6kecTApVJS2GvaoSYQCbNygrX8C+5zQgV1yFQ9sgsLB 5ScA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=g1+DkCbm; 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 c11si12772363iow.87.2021.04.19.07.58.01 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 19 Apr 2021 07:58: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=g1+DkCbm; 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]:57584 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lYVLc-0006aS-Gy for patch@linaro.org; Mon, 19 Apr 2021 10:58:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44570) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lYVIV-0003B9-Cu for qemu-devel@nongnu.org; Mon, 19 Apr 2021 10:54:47 -0400 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]:45901) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lYVIT-0006w7-Rm for qemu-devel@nongnu.org; Mon, 19 Apr 2021 10:54:47 -0400 Received: by mail-wm1-x32d.google.com with SMTP id n4-20020a05600c4f84b029013151278decso7029356wmq.4 for ; Mon, 19 Apr 2021 07:54:45 -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=RbxDIMfGuk4jyYqFSJ3FeoHclrUhVHd7ZrGgUd6bcYQ=; b=g1+DkCbmXu//AkXBCmYTkjWYOO4LUh5AF2gnTYT1QBmuGNDOz8xQieQhdlU0rbbYO8 L7pCVt33dklKjIYpOUiBYMMw+hir0yukXt2vo8mJkVXgIzeJNtlWqLpWXKnw1w1arSID xY7SYa7l6wRTj1QWWjBjWpr6ve/Pv01G0Szdumj7U1cHCdaz1EWWCcMJ3dJE1K5oQt3z aN2DWzZjtfD1QHr6xuUUZ07wAyhjfSSVwBFKJrw5FntgDp/0GWA2/zCQw5G0+++Z7fAu W2EeitlKpqABbKETDPmeMo1JJlnZciy0M5yDWaNGGsfHTxYBas0lGYIl9/lJ/DG9PNUZ Ubdw== 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=RbxDIMfGuk4jyYqFSJ3FeoHclrUhVHd7ZrGgUd6bcYQ=; b=CxQlybPavQw6NWdoT8u7LG9J5mo4FMrc3SM8PsnldMS0PdWE7BGqVKc4HnqbP0r4nN zlNymrTSCSLH3KMGMJnFQdRBuw65261FtQqvCauQMjy+GTwNajCaeHp0yjuB6QDUWUcS a34Dk1RjNzm6uGW8N77ONlkPOwpXXLoTunrsmvIS7eiSVAaSATGItZdhQ3ZwkTdTfKGs 2tS+2B3e2uIOKNCKvdE0qIyYoCa3Pud9MF3m2fElpr3Szq+B30mJecQ3rCtX11iwnszM V+K1ZSpVzx3hdt705LuahOqvLVJROj6ihwhkTLMsYH0daKOMVmhYvRDAHqB7lwMathHQ WIUw== X-Gm-Message-State: AOAM531TnadIO5zETouzY28lfJQjJ2RTUN2QUpwnCUo5HPJTn1+KbhZP BUVtJe2rkTwdjCwU483XA2XZNA== X-Received: by 2002:a05:600c:19d3:: with SMTP id u19mr9942266wmq.80.1618844084435; Mon, 19 Apr 2021 07:54:44 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id o17sm3780411wrg.80.2021.04.19.07.54.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:54:41 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 13BF81FF91; Mon, 19 Apr 2021 15:54:36 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 05/25] tests/docker: add "fetch" sub-command Date: Mon, 19 Apr 2021 15:54:15 +0100 Message-Id: <20210419145435.14083-6-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210419145435.14083-1-alex.bennee@linaro.org> References: <20210419145435.14083-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-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=ham autolearn_force=no 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, f4bug@amsat.org, Wainer dos Santos Moschetta , Willian Rampazzo , stefanha@redhat.com, crosa@redhat.com, pbonzini@redhat.com, =?utf-8?q?Alex_Benn=C3=A9e?= , aurelien@aurel32.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" This simply wraps up fetching a build from the registry and tagging it as the local build. Signed-off-by: Alex Bennée --- tests/docker/docker.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) -- 2.20.1 Reviewed-by: Willian Rampazzo diff --git a/tests/docker/docker.py b/tests/docker/docker.py index 7a14058801..4d9bb7c7ed 100755 --- a/tests/docker/docker.py +++ b/tests/docker/docker.py @@ -515,6 +515,23 @@ def run(self, args, argv): return 0 +class FetchCommand(SubCommand): + """ Fetch a docker image from the registry. Args: """ + name = "fetch" + + def args(self, parser): + parser.add_argument("tag", + help="Local tag for image") + parser.add_argument("registry", + help="Docker registry") + + def run(self, args, argv): + dkr = Docker() + dkr.command(cmd="pull", quiet=args.quiet, + argv=["%s/%s" % (args.registry, args.tag)]) + dkr.command(cmd="tag", quiet=args.quiet, + argv=["%s/%s" % (args.registry, args.tag), args.tag]) + class UpdateCommand(SubCommand): """ Update a docker image. Args: """ From patchwork Mon Apr 19 14:54:16 2021 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: 424009 Delivered-To: patch@linaro.org Received: by 2002:a02:6a6f:0:0:0:0:0 with SMTP id m47csp2799378jaf; Mon, 19 Apr 2021 08:05:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxaLxUtPrQ9teZLpYPkGrk5q9xPNigECLwop/wGD2APt2fX99szbbrKFXfQJBdqcydQKkP7 X-Received: by 2002:a92:3203:: with SMTP id z3mr17774300ile.22.1618844700118; Mon, 19 Apr 2021 08:05:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618844700; cv=none; d=google.com; s=arc-20160816; b=0yzDc6Exwn+lKIRS9nQpFBcZPCkz8w4ZKBSwZedu14ylue9QCJ+HEMIKjEJ11XEBzq y32bQvbaANcUACx1oasBQz9xGuaBjJDg4GEf67/bMd+iPGZ7J05LRs+gHEHKWLLzwc3M iLGzuhtyGxXP0TV4iab58Ri1fi2RBpqU/jev2FAo/x37B1uTg38bbHa+TYzV1f9HLgDY /HYCGIOK1nlnRwiQr7onSv4bwnCsSVoPhVYPVzw2+PwxNabSnXtTBkAcrIThewhlWNwm ntcMIsrCMXfPt1bny4S0hL5fShbM6eOL0E8R10xg1WGakXrMlRXOD1h31Zxvyehs9UX/ 4ZNQ== 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=zUwPvAASkc9VUCakLnjBUW6g0/GpCjb8PUUlx7YN2ig=; b=kUSKL8IY7/WPRcpHwYdifxsX4nxWjCMkyHxoLVsHcUrkzAt5IK5aHDEw82VxBQ4r7B I0cnG4DHzfWfXuUBGHt5xdEqng22eyx+Ck7UB6aNS5ZSmGd1pbz71o/5r21aeJDYYzHN 5X0HnXUs3rkYvg32RzM/5Cxg/uPldeuzjaGJr1j5GdAxyF3Q7iKYqVOVdm6HVGfJNiEH 4DnrMiH2vXP3iZaDaEx3LvAumQF8Jfii5vakuCN3w3TVeloqpzKbCyQ4tq4D51J0UJzm Q4pCPv2SrvVlKRLXqY6BR4JSMjLOk+Wco/LVkVWJHnQbn9iZP0jGgabHadIIpgDtgm8h H8pQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=NBubwI5r; 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 e6si3957529jam.56.2021.04.19.08.05.00 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 19 Apr 2021 08:05: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=NBubwI5r; 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]:46546 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lYVSL-0005VB-Ry for patch@linaro.org; Mon, 19 Apr 2021 11:04:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44668) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lYVIf-0003Zw-Kb for qemu-devel@nongnu.org; Mon, 19 Apr 2021 10:54:57 -0400 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]:44805) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lYVIc-00071Q-Ob for qemu-devel@nongnu.org; Mon, 19 Apr 2021 10:54:57 -0400 Received: by mail-wm1-x330.google.com with SMTP id f195-20020a1c1fcc0000b029012eb88126d7so8267373wmf.3 for ; Mon, 19 Apr 2021 07:54: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=zUwPvAASkc9VUCakLnjBUW6g0/GpCjb8PUUlx7YN2ig=; b=NBubwI5rUFoPwb/Slfvtz5cPFN6Y7pbL2MD4jHD8smQkVmEBmMEvuC95Fluf309zGm yVd0LCfoDT/vMIq68xfXdkV2dleVSmWjpHCAWDDTUV2hxB15d/JsLmnM0yWewxWQcMcB AXEbbA4tjbXYcAaCNDIXaT2ChlhqJuHkCiLEOiLYsAwKw+h9d7Tzmn70qrNsdtjF5xZo DgGoMjXxDil8LBVP5oJROsPccyARDM9neDbfV2CkVirfI0JO+JLYNyTPHOQJ8eIdST3+ GMK8pinNUKYQOMh3HAYymtsfteOjuxQv0ik9IC9TgM3ElHmUVOtYMP7eTSwDpxPH8tBT SjSQ== 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=zUwPvAASkc9VUCakLnjBUW6g0/GpCjb8PUUlx7YN2ig=; b=kU/nJBm04pSup7kfenqbd1vghz7QPludhHG2Qph6rQSl8ZlqGJPN4tkTKURxf/ezag rD6HO5KB8YqhVT5nIQsBtADFzeHQLklJn+EehXL8ZHRQz7Nw74XU1TWQm84iTGz1rviK HqeYv4k3323V6viowTFST8ICay0LCdOwA3pinpYLL0g9EMGG4yPs86iUIfNkjBtwJdtA JQsRXuQ4p7FsTKI/yDzlqYM28EybG2l7Z4zjqz7kyRgIulfzOSGBFz+3EfNN0IUBpCve 3uls/Oka3Gq2VBWCWHllXjd8NLofjR0TD+ez7iXotnlVdmO+t0xV2PMWhzxwiYwFFzT9 reZw== X-Gm-Message-State: AOAM5300ULwPbbmcW9BlF34t2rHhVvz7EzUldOn6vXiebQH5kPWu7QM5 +SqkGTXwhVo7JQK+WelfM/LKzA== X-Received: by 2002:a1c:f618:: with SMTP id w24mr21884772wmc.93.1618844093330; Mon, 19 Apr 2021 07:54:53 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id g3sm23195866wrp.46.2021.04.19.07.54.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:54:41 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 316CC1FF92; Mon, 19 Apr 2021 15:54:36 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 06/25] docker: Add Hexagon image Date: Mon, 19 Apr 2021 15:54:16 +0100 Message-Id: <20210419145435.14083-7-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210419145435.14083-1-alex.bennee@linaro.org> References: <20210419145435.14083-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::330; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x330.google.com 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=ham autolearn_force=no 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, Alessandro Di Federico , Thomas Huth , berrange@redhat.com, Brian Cain , f4bug@amsat.org, Wainer dos Santos Moschetta , Willian Rampazzo , stefanha@redhat.com, crosa@redhat.com, pbonzini@redhat.com, =?utf-8?q?Alex_Benn=C3=A9e?= , aurelien@aurel32.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Alessandro Di Federico This image is a little special because it takes a long time to build. As such most users don't want to be doing that and just pull random binaries from the ether as intended by the container gods. This involves someone with credentials and a beefy machine running: make docker-image-debian-hexagon-cross V=1 NOCACHE=1 J=30 docker tag qemu/debian-hexagon-cross registry.gitlab.com/qemu-project/qemu/qemu/debian-hexagon-cross docker push registry.gitlab.com/qemu-project/qemu/qemu/debian-hexagon-cross With a suitable binary in the "cloud" a normal user will run: make docker-image-debian-hexagon-cross or have it run for them through the dependency mechanism of our over-engineered makefiles and get the binary they wanted. There are a few wrinkles of course including needing to tweak the final image to have the credentials of the user so we can actually do our cross compiles. Signed-off-by: Alex Bennée Cc: Alessandro Di Federico Cc: Philippe Mathieu-Daudé Cc: Brian Cain --- vAJB: - dropped all r-b/sob due to rewrite - split into a multi-stage dockerfile - make dockerfile standalone - play fugly make games v2 - update LLVM version per BN7PR02MB4194DF5752EF3BADE858018DB8799@BN7PR02MB4194.namprd02.prod.outlook.com --- MAINTAINERS | 2 + tests/docker/Makefile.include | 22 +++ .../dockerfiles/debian-hexagon-cross.docker | 44 ++++++ .../build-toolchain.sh | 141 ++++++++++++++++++ 4 files changed, 209 insertions(+) create mode 100644 tests/docker/dockerfiles/debian-hexagon-cross.docker create mode 100755 tests/docker/dockerfiles/debian-hexagon-cross.docker.d/build-toolchain.sh -- 2.20.1 Reviewed-by: Willian Rampazzo Tested-by: Philippe Mathieu-Daudé diff --git a/MAINTAINERS b/MAINTAINERS index 36055f14c5..26c901527e 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -197,6 +197,8 @@ F: linux-user/hexagon/ F: tests/tcg/hexagon/ F: disas/hexagon.c F: default-configs/targets/hexagon-linux-user.mak +F: docker/dockerfiles/debian-hexagon-cross.docker +F: docker/dockerfiles/debian-hexagon-cross.docker.d/build-toolchain.sh HPPA (PA-RISC) TCG CPUs M: Richard Henderson diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include index 820423d718..8967ecf118 100644 --- a/tests/docker/Makefile.include +++ b/tests/docker/Makefile.include @@ -148,6 +148,28 @@ docker-image-debian-s390x-cross: docker-image-debian10 docker-image-debian-sh4-cross: docker-image-debian10 docker-image-debian-sparc64-cross: docker-image-debian10 +# +# The build rule for hexagon-cross is special in so far for most of +# the time we don't want to build it. While dockers caching does avoid +# this most of the time sometimes we want to force the issue. +# +docker-image-debian-hexagon-cross: $(DOCKER_FILES_DIR)/debian-hexagon-cross.docker + $(if $(NOCACHE), \ + $(call quiet-command, \ + $(DOCKER_SCRIPT) build -t qemu/debian-hexagon-cross -f $< \ + $(if $V,,--quiet) --no-cache \ + --registry $(DOCKER_REGISTRY) --extra-files \ + $(DOCKER_FILES_DIR)/debian-hexagon-cross.docker.d/build-toolchain.sh, \ + "BUILD", "debian-hexagon-cross"), \ + $(call quiet-command, \ + $(DOCKER_SCRIPT) fetch $(if $V,,--quiet) \ + qemu/debian-hexagon-cross $(DOCKER_REGISTRY), \ + "FETCH", "debian-hexagon-cross") \ + $(call quiet-command, \ + $(DOCKER_SCRIPT) update $(if $V,,--quiet) \ + qemu/debian-hexagon-cross --add-current-user, \ + "PREPARE", "debian-hexagon-cross")) + # Specialist build images, sometimes very limited tools docker-image-debian-tricore-cross: docker-image-debian10 docker-image-debian-all-test-cross: docker-image-debian10 diff --git a/tests/docker/dockerfiles/debian-hexagon-cross.docker b/tests/docker/dockerfiles/debian-hexagon-cross.docker new file mode 100644 index 0000000000..1d19e8f29c --- /dev/null +++ b/tests/docker/dockerfiles/debian-hexagon-cross.docker @@ -0,0 +1,44 @@ +# +# Docker Hexagon cross-compiler target +# +# This docker target is used for building hexagon tests. As it also +# needs to be able to build QEMU itself in CI we include it's +# build-deps. It is also a "stand-alone" image so as not to be +# triggered by re-builds on other base images given it takes a long +# time to build. +# +FROM qemu/debian10 + +# Install common build utilities +RUN apt update && \ + DEBIAN_FRONTEND=noninteractive apt install -yy eatmydata && \ + DEBIAN_FRONTEND=noninteractive eatmydata \ + apt install -y --no-install-recommends \ + bison \ + cmake \ + flex \ + lld \ + rsync \ + wget + +ENV TOOLCHAIN_INSTALL /usr/local +ENV ROOTFS /usr/local + +ENV LLVM_URL https://github.com/llvm/llvm-project/archive/bfcd21876adc3498065e4da92799f613e730d475.tar.gz +ENV MUSL_URL https://github.com/quic/musl/archive/aff74b395fbf59cd7e93b3691905aa1af6c0778c.tar.gz +ENV LINUX_URL https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.6.18.tar.xz + +ADD build-toolchain.sh /root/hexagon-toolchain/build-toolchain.sh + +RUN cd /root/hexagon-toolchain && ./build-toolchain.sh + +FROM debian:buster-slim +# Duplicate deb line as deb-src +RUN cat /etc/apt/sources.list | sed "s/^deb\ /deb-src /" >> /etc/apt/sources.list +# Install QEMU build deps for use in CI +RUN apt update && \ + DEBIAN_FRONTEND=noninteractive apt install -yy eatmydata && \ + DEBIAN_FRONTEND=noninteractive eatmydata \ + apt build-dep -yy --arch-only qemu +COPY --from=0 /usr/local /usr/local +ENV PATH $PATH:/usr/local/bin/ diff --git a/tests/docker/dockerfiles/debian-hexagon-cross.docker.d/build-toolchain.sh b/tests/docker/dockerfiles/debian-hexagon-cross.docker.d/build-toolchain.sh new file mode 100755 index 0000000000..19b1c9f83e --- /dev/null +++ b/tests/docker/dockerfiles/debian-hexagon-cross.docker.d/build-toolchain.sh @@ -0,0 +1,141 @@ +#!/bin/bash + +set -e + +BASE=$(readlink -f ${PWD}) + +TOOLCHAIN_INSTALL=$(readlink -f "$TOOLCHAIN_INSTALL") +ROOTFS=$(readlink -f "$ROOTFS") + +TOOLCHAIN_BIN=${TOOLCHAIN_INSTALL}/bin +HEX_SYSROOT=${TOOLCHAIN_INSTALL}/hexagon-unknown-linux-musl +HEX_TOOLS_TARGET_BASE=${HEX_SYSROOT}/usr + +function cdp() { + DIR="$1" + mkdir -p "$DIR" + cd "$DIR" +} + +function fetch() { + DIR="$1" + URL="$2" + TEMP="$(readlink -f "$PWD/tmp.tar.gz")" + wget --quiet "$URL" -O "$TEMP" + cdp "$DIR" + tar xaf "$TEMP" --strip-components=1 + rm "$TEMP" + cd - +} + +build_llvm_clang() { + fetch "$BASE/llvm-project" "$LLVM_URL" + cdp "$BASE/build-llvm" + + cmake -G Ninja \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=${TOOLCHAIN_INSTALL} \ + -DLLVM_ENABLE_LLD=ON \ + -DLLVM_TARGETS_TO_BUILD="Hexagon" \ + -DLLVM_ENABLE_PROJECTS="clang;lld" \ + "$BASE/llvm-project/llvm" + ninja all install + cd ${TOOLCHAIN_BIN} + ln -sf clang hexagon-unknown-linux-musl-clang + ln -sf clang++ hexagon-unknown-linux-musl-clang++ + ln -sf llvm-ar hexagon-unknown-linux-musl-ar + ln -sf llvm-objdump hexagon-unknown-linux-musl-objdump + ln -sf llvm-objcopy hexagon-unknown-linux-musl-objcopy + ln -sf llvm-readelf hexagon-unknown-linux-musl-readelf + ln -sf llvm-ranlib hexagon-unknown-linux-musl-ranlib + + # workaround for now: + cat < hexagon-unknown-linux-musl.cfg +-G0 --sysroot=${HEX_SYSROOT} +EOF +} + +build_clang_rt() { + cdp "$BASE/build-clang_rt" + cmake -G Ninja \ + -DCMAKE_BUILD_TYPE=Release \ + -DLLVM_CONFIG_PATH="$BASE/build-llvm/bin/llvm-config" \ + -DCMAKE_ASM_FLAGS="-G0 -mlong-calls -fno-pic --target=hexagon-unknown-linux-musl " \ + -DCMAKE_SYSTEM_NAME=Linux \ + -DCMAKE_C_COMPILER="${TOOLCHAIN_BIN}/hexagon-unknown-linux-musl-clang" \ + -DCMAKE_ASM_COMPILER="${TOOLCHAIN_BIN}/hexagon-unknown-linux-musl-clang" \ + -DCMAKE_INSTALL_PREFIX=${HEX_TOOLS_TARGET_BASE} \ + -DCMAKE_CROSSCOMPILING=ON \ + -DCMAKE_C_COMPILER_FORCED=ON \ + -DCMAKE_CXX_COMPILER_FORCED=ON \ + -DCOMPILER_RT_BUILD_BUILTINS=ON \ + -DCOMPILER_RT_BUILTINS_ENABLE_PIC=OFF \ + -DCMAKE_SIZEOF_VOID_P=4 \ + -DCOMPILER_RT_OS_DIR= \ + -DCAN_TARGET_hexagon=1 \ + -DCAN_TARGET_x86_64=0 \ + -DCOMPILER_RT_SUPPORTED_ARCH=hexagon \ + -DLLVM_ENABLE_PROJECTS="compiler-rt" \ + "$BASE/llvm-project/compiler-rt" + ninja install-compiler-rt +} + +build_musl_headers() { + fetch "$BASE/musl" "$MUSL_URL" + cd "$BASE/musl" + make clean + CC=${TOOLCHAIN_BIN}/hexagon-unknown-linux-musl-clang \ + CROSS_COMPILE=hexagon-unknown-linux-musl \ + LIBCC=${HEX_TOOLS_TARGET_BASE}/lib/libclang_rt.builtins-hexagon.a \ + CROSS_CFLAGS="-G0 -O0 -mv65 -fno-builtin -fno-rounding-math --target=hexagon-unknown-linux-musl" \ + ./configure --target=hexagon --prefix=${HEX_TOOLS_TARGET_BASE} + PATH=${TOOLCHAIN_BIN}:$PATH make CROSS_COMPILE= install-headers + + cd ${HEX_SYSROOT}/.. + ln -sf hexagon-unknown-linux-musl hexagon +} + +build_kernel_headers() { + fetch "$BASE/linux" "$LINUX_URL" + mkdir -p "$BASE/build-linux" + cd "$BASE/linux" + make O=../build-linux ARCH=hexagon \ + KBUILD_CFLAGS_KERNEL="-mlong-calls" \ + CC=${TOOLCHAIN_BIN}/hexagon-unknown-linux-musl-clang \ + LD=${TOOLCHAIN_BIN}/ld.lld \ + KBUILD_VERBOSE=1 comet_defconfig + make mrproper + + cd "$BASE/build-linux" + make \ + ARCH=hexagon \ + CC=${TOOLCHAIN_BIN}/clang \ + INSTALL_HDR_PATH=${HEX_TOOLS_TARGET_BASE} \ + V=1 \ + headers_install +} + +build_musl() { + cd "$BASE/musl" + make clean + CROSS_COMPILE=hexagon-unknown-linux-musl- \ + AR=llvm-ar \ + RANLIB=llvm-ranlib \ + STRIP=llvm-strip \ + CC=clang \ + LIBCC=${HEX_TOOLS_TARGET_BASE}/lib/libclang_rt.builtins-hexagon.a \ + CFLAGS="-G0 -O0 -mv65 -fno-builtin -fno-rounding-math --target=hexagon-unknown-linux-musl" \ + ./configure --target=hexagon --prefix=${HEX_TOOLS_TARGET_BASE} + PATH=${TOOLCHAIN_BIN}/:$PATH make CROSS_COMPILE= install + cd ${HEX_TOOLS_TARGET_BASE}/lib + ln -sf libc.so ld-musl-hexagon.so + ln -sf ld-musl-hexagon.so ld-musl-hexagon.so.1 + cdp ${HEX_TOOLS_TARGET_BASE}/../lib + ln -sf ../usr/lib/ld-musl-hexagon.so.1 +} + +build_llvm_clang +build_kernel_headers +build_musl_headers +build_clang_rt +build_musl From patchwork Mon Apr 19 14:54:17 2021 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: 424002 Delivered-To: patch@linaro.org Received: by 2002:a02:6a6f:0:0:0:0:0 with SMTP id m47csp2793172jaf; Mon, 19 Apr 2021 07:58:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzSl2wNW38sL7HpvhoJbrVIEHZ+lJyJLo0G5sJ4oejoTtMETtfsXqKhXdvSeqDSquo3+GZ4 X-Received: by 2002:a92:ab01:: with SMTP id v1mr16704097ilh.230.1618844305958; Mon, 19 Apr 2021 07:58:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618844305; cv=none; d=google.com; s=arc-20160816; b=f5MtfCnNmMszVSRLI0sudyC78SQwT5OcBhKHWg2C831Gm3CNV0pfgr/zKNlNtO7WsT dPiSm8zRNt9Y5hapyMQge53IKJWubAQIJnq7un9XGV0pkFMTchL/qK9CeXbCcSLNrYE7 wBLdYlvtZ00CXP0S5eE5PZpVSnzi+3XgNvMlviQRKZtg4guho0y8Wxn2jBKt6E69t017 VQddrocXbuKG9UG13nZBzGurkl7QYFKQrJ38LVj5EXvbwEEDgCMOstZMGxZz2Y5xuu2/ HsVS/w3H8wqMgHRjMlsps52y9O5NrJjQcu2wP8/deGkziHwyHLlofxZobf364mlGlLe3 DL9w== 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=NfQWLdBWIgKsNWC8ZCEGrHzxCbu+vjdpX5KlljKYAME=; b=zs6TYChJgemgf/nX1iUufa+gLGVh/98iJXaL7okSVV5WXvRHnoRpvknpC0p4z0dMXV U1tu3SGzRbUMGB16sh4hwx7OI64CfzdJ6M9wyWHzZ6jh+WsJZDsE8n5hpd638ID45H/n CQYq4+fa++8rAa0Z/JxmWGHfVa6NZ0mHZ/z9VwvMBmbHyz7nhF2oGn6X89CbTX22Snr5 gmrd+gv8PXn8RbrpAjx1RWPkEzD64Y3THBEGM7mobujbdxLXudd5yPwKR/AColOaQ1Mx +QJxeLuWxg/OVfTxMIIf7eNRI4ed82o2p4KXpUvklnSEPZ/RzUxgZyB68rI4hNlGwr86 g3rQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=CEWgJ2Jy; 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 p10si15792247ilp.47.2021.04.19.07.58.25 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 19 Apr 2021 07:58:25 -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=CEWgJ2Jy; 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]:57582 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lYVM1-0006aP-Dl for patch@linaro.org; Mon, 19 Apr 2021 10:58:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44574) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lYVIW-0003DE-71 for qemu-devel@nongnu.org; Mon, 19 Apr 2021 10:54:48 -0400 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]:34740) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lYVIU-0006wD-IK for qemu-devel@nongnu.org; Mon, 19 Apr 2021 10:54:47 -0400 Received: by mail-wr1-x42d.google.com with SMTP id r7so22359638wrm.1 for ; Mon, 19 Apr 2021 07:54:46 -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=NfQWLdBWIgKsNWC8ZCEGrHzxCbu+vjdpX5KlljKYAME=; b=CEWgJ2Jy92P6I+GlQNN/qs8k0s1Rk1JG+HOm+SfHbdzOGPDMIUmZ4im9d4QoRUeDFZ d5w/r3enlVDnS1dj7U9ZxQiU3bHCFzp3mW7yB9r8hTAHjdpUVFsMMmZut1AUV7xYSJ+9 /rkPnUTv6vspDC0Phsl51JoICd71Uhdu4jn7SaZo+WucoSGqBRVJTK6OVBYHl85KCVks m0HM2aGr3V6ziZbtpZzFpXlODFh9/pTfbkZfDDOou0MXTPSxe+a3oEWf8p9Uk5xvQz9g tDmu7dtck6DsagIm2moMMwFHKsOsw1wewsadv6dM9aeh1BUJmGDl39TURts76u8NRbSY 3Pjw== 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=NfQWLdBWIgKsNWC8ZCEGrHzxCbu+vjdpX5KlljKYAME=; b=LK+7vAXNocw3BvnFRiiZyxSV2BnAmxKzswS5H6AeZ2uvt29fiOvUirG7e0id4tSYV5 PSKmCJTfV3sXQJxD/iM6ZptQ2xwxeOA7nQE9UNPeEH7CQtblXg7TXud4Fjw690NAB6ei UiLOSL3vPWkTOSlwYcBdPPp2tckjLGpFDagve0C1StZ9t9MCeWIZHg6yeVk6Fjwlj+V+ lrC76bDEjJ+3gK+kl9wnBxMlDYsrZflSHuwsRVdQ1Jl04u+U7p6IKwbDIJWfVEIrHB62 ggGhnFx0JLdBkEyj1asHGysMBDwzEkTu+0YeFhTsP2PiV86M8QIlBC3OIIPtcTkzuFpW cjRQ== X-Gm-Message-State: AOAM532GcOZ4aXZ83/89Wzus4HB8DKIzwEu1o+lNSvdnLJkAXFyMcPaR yg3HoFlDNHgmpcJUHt/XqBVkQw== X-Received: by 2002:adf:dd51:: with SMTP id u17mr14866933wrm.32.1618844085235; Mon, 19 Apr 2021 07:54:45 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id b12sm24738406wrn.18.2021.04.19.07.54.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:54:41 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 46E7C1FF93; Mon, 19 Apr 2021 15:54:36 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 07/25] tests/tcg: Use Hexagon Docker image Date: Mon, 19 Apr 2021 15:54:17 +0100 Message-Id: <20210419145435.14083-8-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210419145435.14083-1-alex.bennee@linaro.org> References: <20210419145435.14083-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-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=ham autolearn_force=no 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, Alessandro Di Federico , berrange@redhat.com, f4bug@amsat.org, stefanha@redhat.com, crosa@redhat.com, pbonzini@redhat.com, =?utf-8?q?Alex_Benn=C3=A9e?= , aurelien@aurel32.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Alessandro Di Federico [PMD: Split from 'Add Hexagon Docker image' patch] Signed-off-by: Alessandro Di Federico Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée Message-Id: <20210228222314.304787-5-f4bug@amsat.org> Message-Id: <20210305092328.31792-6-alex.bennee@linaro.org> --- tests/tcg/configure.sh | 4 ++++ 1 file changed, 4 insertions(+) -- 2.20.1 Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé diff --git a/tests/tcg/configure.sh b/tests/tcg/configure.sh index fa1a4261a4..8b97cc9a19 100755 --- a/tests/tcg/configure.sh +++ b/tests/tcg/configure.sh @@ -128,6 +128,10 @@ for target in $target_list; do container_image=fedora-cris-cross container_cross_cc=cris-linux-gnu-gcc ;; + hexagon-*) + container_image=debian-hexagon-cross + container_cross_cc=hexagon-unknown-linux-musl-clang + ;; hppa-*) container_hosts=x86_64 container_image=debian-hppa-cross From patchwork Mon Apr 19 14:54:18 2021 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: 424001 Delivered-To: patch@linaro.org Received: by 2002:a02:6a6f:0:0:0:0:0 with SMTP id m47csp2793146jaf; Mon, 19 Apr 2021 07:58:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx8Kd/ZcXy92Msq1p5VQofAxTPN6K3tY6UiWSCVt9wj754bmH+uExOKvIE+7k4SIztYwpGa X-Received: by 2002:a92:dace:: with SMTP id o14mr16259388ilq.183.1618844304470; Mon, 19 Apr 2021 07:58:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618844304; cv=none; d=google.com; s=arc-20160816; b=lPDH4PW9ghxmZnfDrUeg75jgCnEhyXbTjeOrZmFeZMZDv7L3fBTqM77aYWq+7QXwBo 92gYgiy9QPOG4y4QoCVW1jPVSQ2p8QTQEeu7uSMwCYHDbbV1roQOuKrYqzS/+Yf2WMJq jutX+rW6AaFyUg7hmBYpjogcU0qfdBc1TrVZHiyjhOuE5P94ykH5ZZsXXSqQex5Pz9yL E7bDKv962BvsuzXzoyxDymObhrTXrTtrc8JhhItd35VkMyK8krnDscIYsKhAxc1jNFCl 2TSuDpZK55eBFhopwzQBU5PfcFDh4bsXRTTBY340sL3Vki/kDHicbsT61CYBQQdbkblE O+tA== 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=8ZRa9dJU3X3YZmZI32EUbAw3uIAMhrZ7g8+qJZIpd14=; b=IFYQloD7AkyS8iBpKs/ujHzdob+DsAwvHhcem/tsQrW9euK1pZcFvqeKqV/i8lj4AO sFcIYVRjnu+52DcLQNyFwrh9c2lFexwMuAUkltVP4PnwVjesAHnfKM3bS9KphpdeYSZu nX0AdQbu6X/MkcmzmnR7VqUE3SmtsaBMaJwtbvuxZDb550GrlRKoaXfYUnw5DA5nPkVP TK0jrZS2Cmj1VnV0F5L8p7UzeToynS0lLKnoWjKpzYZEbShNHrkYWSI8OA1zEDK5OXcr RTnNq1ceF/FMYI4IaO9RVuQJiXIeDvaI24x9O+U96skhbnAxiJdZ/MWjFHr+5unjtyNi RUNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=R7KuBGii; 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 c20si6480389iow.68.2021.04.19.07.58.24 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 19 Apr 2021 07:58:24 -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=R7KuBGii; 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]:57482 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lYVLz-0006Xz-SZ for patch@linaro.org; Mon, 19 Apr 2021 10:58:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44602) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lYVIZ-0003KX-6e for qemu-devel@nongnu.org; Mon, 19 Apr 2021 10:54:51 -0400 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]:34745) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lYVIX-0006yE-IX for qemu-devel@nongnu.org; Mon, 19 Apr 2021 10:54:50 -0400 Received: by mail-wr1-x432.google.com with SMTP id r7so22359780wrm.1 for ; Mon, 19 Apr 2021 07:54:49 -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=8ZRa9dJU3X3YZmZI32EUbAw3uIAMhrZ7g8+qJZIpd14=; b=R7KuBGiic1QPQ1Wz3YMjjkaBnQkBNS0PXISsUopP53aVnDYxcHWnConjACZtQkYqHI M84LsQjj+Fxi1hNqhjd5qRljeWDUQz60bnWJ2TbMbSst6JwTQrA01PFblv3hzCJopseq Y+bN43K8qdMQF41lY2yEMCqzd5Se+CpjxpiIADQVfwHACOLjlyqfErl7c9C1+I57voMS RkXYarVWMwJDc2ueuksWdp7lnjY0rrB01aFPNWht01Tj41gML/D71AWsG3c//ZmvjhAN ErkI0KpSWm4H00PWHhTL5u/1aMORiaNOaYoJoP2SfmqM2rC452ErAxYvKQN3XlJEs8hM Cg4g== 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=8ZRa9dJU3X3YZmZI32EUbAw3uIAMhrZ7g8+qJZIpd14=; b=bMC7FyCJNAktFjL/iLuajEeGaylxhFKSHmtbLU+WNq86pVHqI+r2iweDZnqhq+DA4v DjmbjRZG1cP9ui96NzRLHnLLKHvReono6elWuv6kuf5WLqNK1ydoqWseXOUGKPL4OMUP Hl6PY9WeXaogWL9t15uO9U1oVjCqjdKN7ml2sKQ+4A/V94rxhRo/NcC+IypUyZVS/ijh PZ6KH73CGbblLahKznmsoi7nIDR8Wqd908EpM4qJ7yCRJXEjhEGJx5+0daXYe3ZngR8y gKkD467B8aDRDePjP15oEjUWl4hNcjoZLSlDuCVrTo718bhfUKQ5uIpYxm4apq0SSjNk JIxw== X-Gm-Message-State: AOAM532gUlT+Yz6TQfI9TKMhBHqNheZMPO4jU7JUkFxtVoqfRubONA5+ CvaYzID6YFRsMCqjI84gM+e2yw== X-Received: by 2002:a5d:484c:: with SMTP id n12mr14610699wrs.377.1618844088202; Mon, 19 Apr 2021 07:54:48 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id 200sm21131713wmb.1.2021.04.19.07.54.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:54:41 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 5D9E11FF96; Mon, 19 Apr 2021 15:54:36 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 08/25] gitlab: add build-user-hexagon test Date: Mon, 19 Apr 2021 15:54:18 +0100 Message-Id: <20210419145435.14083-9-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210419145435.14083-1-alex.bennee@linaro.org> References: <20210419145435.14083-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-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=ham autolearn_force=no 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, f4bug@amsat.org, Wainer dos Santos Moschetta , Willian Rampazzo , stefanha@redhat.com, crosa@redhat.com, pbonzini@redhat.com, =?utf-8?q?Alex_Benn=C3=A9e?= , aurelien@aurel32.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" We special case this as the container with the cross compiler for the tests takes so long to build it is manually uploaded into the registry. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Wainer dos Santos Moschetta Message-Id: <20210305092328.31792-7-alex.bennee@linaro.org> --- .gitlab-ci.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) -- 2.20.1 Reviewed-by: Willian Rampazzo Tested-by: Philippe Mathieu-Daudé diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 52d65d6c04..87d1172b03 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -413,6 +413,17 @@ build-user-static: CONFIGURE_ARGS: --disable-tools --disable-system --static MAKE_CHECK_ARGS: check-tcg +# Because the hexagon cross-compiler takes so long to build we don't rely +# on the CI system to build it and hence this job has no dependency +# declared. The image is manually uploaded. +build-user-hexagon: + <<: *native_build_job_definition + variables: + IMAGE: debian-hexagon-cross + TARGETS: hexagon-linux-user + CONFIGURE_ARGS: --disable-tools --disable-docs --enable-debug-tcg + MAKE_CHECK_ARGS: check-tcg + # Only build the softmmu targets we have check-tcg tests for build-some-softmmu: <<: *native_build_job_definition From patchwork Mon Apr 19 14:54:19 2021 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: 424008 Delivered-To: patch@linaro.org Received: by 2002:a02:6a6f:0:0:0:0:0 with SMTP id m47csp2799367jaf; Mon, 19 Apr 2021 08:04:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyCl/G6rWnFkBzOAGPoMPGJXo/FMZ6BWmN1IKCe5a4q3hNi+vvSg8oHMxh9FtX8wt0SFxu8 X-Received: by 2002:a5d:878e:: with SMTP id f14mr15035923ion.176.1618844699275; Mon, 19 Apr 2021 08:04:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618844699; cv=none; d=google.com; s=arc-20160816; b=BeAdRqVigq9hRRZXJKxVL/w8a2nHvAI6WykxywQwtG4USvQGb/nfH0Q/XytNY6kpAI 2XpdJkz6wlOlBayHoJv5NnZhWoTMyRmNgQXwxqpT215hY9J36eJ+0zP2kCFJWKhG5Sr3 utJY3KQyozv71+ajYV6iwJvKVSqv64ifuBHSn+9DymuwcUYU9tRi5/4vhveORfdUX7wB fLDYqllWD7/XWpcnx5CNp/Jb0vJmyBPtwUiJL4bUHNfQloMijUeNefKZlm88GTxvlLwT WH429kxXctCCH39GzOIiXACVHGPZhGIsD9qhMNsVCqnbYZHDh+ty6VbMP/96iZ3KvBAv K6CA== 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=CZjHpqmQVfyllOgB0pstF9mycrIGXTBaomG1IDBZIiM=; b=zWNu0+W15x26tKjkDn5RHjLaquqzVJ2fcn8wV580g/envaI94ACfT5qq7ijK2moTcG wR4kKNx30r8E6eidCusFafNi5viVkRlytqWCfeXqdwihZ2QKakRYQz5TNEb1CzixDH62 +65YQKS5hRT2Y2tkdz/vlh1m3JnskkRTV2IWQtK2XC8MW98oKfmGBrMRCTh99kAkeTKs zRJeCUPTx42JdSSjegul1+UpfNZ7umFFkkUmPim5ceoGOEmKEzEv487rh4mzlQTpvffW V3/Ky0haGNKUjUKJzivdJi51yj4zu/jc8vHOk2ViNrVOYiy9LlhX7S6t2uN/BMEmVIyO qzzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=tSIgzlJq; 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 l4si17377201iok.62.2021.04.19.08.04.59 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 19 Apr 2021 08:04:59 -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=tSIgzlJq; 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]:46514 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lYVSL-0005UF-RH for patch@linaro.org; Mon, 19 Apr 2021 11:04:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44674) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lYVIf-0003ae-RP for qemu-devel@nongnu.org; Mon, 19 Apr 2021 10:54:57 -0400 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]:41837) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lYVId-00071c-Fo for qemu-devel@nongnu.org; Mon, 19 Apr 2021 10:54:57 -0400 Received: by mail-wr1-x430.google.com with SMTP id k26so17947799wrc.8 for ; Mon, 19 Apr 2021 07:54: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=CZjHpqmQVfyllOgB0pstF9mycrIGXTBaomG1IDBZIiM=; b=tSIgzlJqTDQpyeLkMoEWrEsQVroCZhkCPOTfKD7bS21kJ5+HRfwII+q22nN6UXp66S bMyX2g1RJqS7g+j552M3W56YQuaFdZpt8Y8da300ruCDgVodFBByIqYiCMOg+fy/5PpR 5DGttnnKoJ8XiGNrwZ8GrQw/W6tRfjPb9/HEannFo3NuyyEUZJLGrZwFfQlMKxGM53gd 89quO/+eHw48Glg2p/4GcNhClEpFJ/Awf+RX1o0AVpAbpTA2XUPypqNDUXZd+pA/CE+W gdYtlnAhpBy5VOUEljOJ5b+rZFduI7XEHN1w0N5O3tWf2SVoMD3h3S5YlkS7a5JXcavW OA2A== 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=CZjHpqmQVfyllOgB0pstF9mycrIGXTBaomG1IDBZIiM=; b=jBH8aFFhebF67JPT7ioo7RvSJt3DF+3PrAuKoM2oqt6dz41P06Y2dlJEGQ4/Xua0bQ uhw00lScXPr7jzMpyrQJJyFDamHqBl33z5arAc13+MbwtYOBhmr7729IPyvdq5zPV2w1 pvhNl3BO9XSsg/1ae8TNKs56AEAfa19uJ9HlVk6dIJRJmyQ7j1N1zbRXw++cB5GEhI0y K/lCUSjXLh+N14uixKJxt6ax9cpdDK9OPwZBtAVWGd6YBTDT70n/urmdW98WWaBYNVLE 0KeNLAm6Lr7DNpE2GPIGKr5hXDxwYOfG1LBB5wMNkbE1z2gC2u6tQi9Ef0VumC2K/VRp LrZA== X-Gm-Message-State: AOAM532QBgoxSt11U4Y5h8zDEBquPh/FM4qBINM/4tkhgWSWHA9AfQQa XjdE1E4PZbfNuKBkyHLerMWOJQ== X-Received: by 2002:adf:f04d:: with SMTP id t13mr14964778wro.52.1618844094158; Mon, 19 Apr 2021 07:54:54 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id d5sm20249272wrx.15.2021.04.19.07.54.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:54:42 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 735801FF98; Mon, 19 Apr 2021 15:54:36 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 09/25] tests/tcg: don't iterate through other arch compilers Date: Mon, 19 Apr 2021 15:54:19 +0100 Message-Id: <20210419145435.14083-10-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210419145435.14083-1-alex.bennee@linaro.org> References: <20210419145435.14083-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-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=ham autolearn_force=no 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, f4bug@amsat.org, stefanha@redhat.com, crosa@redhat.com, pbonzini@redhat.com, =?utf-8?q?Alex_Benn=C3=A9e?= , aurelien@aurel32.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" There should only be one compiler per architecture. Those cases where the same compiler can deal with a different architecture should be explicitly set for both cross_cc and docker configurations. Otherwise you get strangeness like: --cross-cc-aarch64=/bin/false causing the logic to attempt to use a locally available arm-linux-gnueabihf-gcc rather than forcing the use of the docker image which is what is implied by the command line option. Signed-off-by: Alex Bennée --- tests/tcg/configure.sh | 148 ++++++++++++++++------------------------- 1 file changed, 59 insertions(+), 89 deletions(-) -- 2.20.1 diff --git a/tests/tcg/configure.sh b/tests/tcg/configure.sh index 8b97cc9a19..bfe9619217 100755 --- a/tests/tcg/configure.sh +++ b/tests/tcg/configure.sh @@ -74,35 +74,6 @@ fi for target in $target_list; do arch=${target%%-*} - case $arch in - arm|armeb) - arches=arm - ;; - aarch64|aarch64_be) - arches="aarch64 arm" - ;; - mips*) - arches=mips - ;; - ppc*) - arches=ppc - ;; - sh4|sh4eb) - arches=sh4 - ;; - x86_64) - arches="x86_64 i386" - ;; - xtensa|xtensaeb) - arches=xtensa - ;; - alpha|cris|hexagon|hppa|i386|lm32|microblaze|microblazeel|m68k|openrisc|riscv64|s390x|sh4|sparc64) - arches=$target - ;; - *) - continue - ;; - esac container_image= case $target in @@ -235,70 +206,69 @@ for target in $target_list; do echo "CROSS_CC_GUEST_CFLAGS=$target_compiler_cflags" >> $config_target_mak got_cross_cc=no - for i in $arch $arches; do - if eval test "x\${cross_cc_$i+yes}" != xyes; then - continue - fi - eval "target_compiler=\${cross_cc_$i}" - if ! has $target_compiler; then - continue - fi - write_c_skeleton - if ! do_compiler "$target_compiler" $target_compiler_cflags -o $TMPE $TMPC -static ; then - # For host systems we might get away with building without -static - if ! do_compiler "$target_compiler" $target_compiler_cflags -o $TMPE $TMPC ; then - continue - fi - echo "CROSS_CC_GUEST_STATIC=y" >> $config_target_mak - else - echo "CROSS_CC_GUEST_STATIC=y" >> $config_target_mak - fi - echo "CROSS_CC_GUEST=$target_compiler" >> $config_target_mak + if eval test "x\${cross_cc_$arch}" != xyes; then + eval "target_compiler=\${cross_cc_$arch}" - # Test for compiler features for optional tests. We only do this - # for cross compilers because ensuring the docker containers based - # compilers is a requirememt for adding a new test that needs a - # compiler feature. - case $target in - aarch64-*) - if do_compiler "$target_compiler" $target_compiler_cflags \ - -march=armv8.1-a+sve -o $TMPE $TMPC; then - echo "CROSS_CC_HAS_SVE=y" >> $config_target_mak - fi - if do_compiler "$target_compiler" $target_compiler_cflags \ - -march=armv8.3-a -o $TMPE $TMPC; then - echo "CROSS_CC_HAS_ARMV8_3=y" >> $config_target_mak - fi - if do_compiler "$target_compiler" $target_compiler_cflags \ - -mbranch-protection=standard -o $TMPE $TMPC; then - echo "CROSS_CC_HAS_ARMV8_BTI=y" >> $config_target_mak - fi - if do_compiler "$target_compiler" $target_compiler_cflags \ - -march=armv8.5-a+memtag -o $TMPE $TMPC; then - echo "CROSS_CC_HAS_ARMV8_MTE=y" >> $config_target_mak - fi - ;; - ppc*) - if do_compiler "$target_compiler" $target_compiler_cflags \ - -mpower8-vector -o $TMPE $TMPC; then - echo "CROSS_CC_HAS_POWER8_VECTOR=y" >> $config_target_mak - fi - ;; - i386-linux-user) - if do_compiler "$target_compiler" $target_compiler_cflags \ - -Werror -fno-pie -o $TMPE $TMPC; then - echo "CROSS_CC_HAS_I386_NOPIE=y" >> $config_target_mak - fi - ;; - esac + if has $target_compiler; then + write_c_skeleton + if ! do_compiler "$target_compiler" $target_compiler_cflags \ + -o $TMPE $TMPC -static ; then + # For host systems we might get away with building without -static + if do_compiler "$target_compiler" $target_compiler_cflags \ + -o $TMPE $TMPC ; then + got_cross_cc=yes + echo "CROSS_CC_GUEST_STATIC=y" >> $config_target_mak + echo "CROSS_CC_GUEST=$target_compiler" >> $config_target_mak + fi + else + got_cross_cc=yes + echo "CROSS_CC_GUEST_STATIC=y" >> $config_target_mak + echo "CROSS_CC_GUEST=$target_compiler" >> $config_target_mak + fi + fi + fi - enabled_cross_compilers="$enabled_cross_compilers $target_compiler" - got_cross_cc=yes - break - done + if test $got_cross_cc = yes; then + # Test for compiler features for optional tests. We only do this + # for cross compilers because ensuring the docker containers based + # compilers is a requirememt for adding a new test that needs a + # compiler feature. - if test $got_cross_cc = no && test "$container" != no && test -n "$container_image"; then + case $target in + aarch64-*) + if do_compiler "$target_compiler" $target_compiler_cflags \ + -march=armv8.1-a+sve -o $TMPE $TMPC; then + echo "CROSS_CC_HAS_SVE=y" >> $config_target_mak + fi + if do_compiler "$target_compiler" $target_compiler_cflags \ + -march=armv8.3-a -o $TMPE $TMPC; then + echo "CROSS_CC_HAS_ARMV8_3=y" >> $config_target_mak + fi + if do_compiler "$target_compiler" $target_compiler_cflags \ + -mbranch-protection=standard -o $TMPE $TMPC; then + echo "CROSS_CC_HAS_ARMV8_BTI=y" >> $config_target_mak + fi + if do_compiler "$target_compiler" $target_compiler_cflags \ + -march=armv8.5-a+memtag -o $TMPE $TMPC; then + echo "CROSS_CC_HAS_ARMV8_MTE=y" >> $config_target_mak + fi + ;; + ppc*) + if do_compiler "$target_compiler" $target_compiler_cflags \ + -mpower8-vector -o $TMPE $TMPC; then + echo "CROSS_CC_HAS_POWER8_VECTOR=y" >> $config_target_mak + fi + ;; + i386-linux-user) + if do_compiler "$target_compiler" $target_compiler_cflags \ + -Werror -fno-pie -o $TMPE $TMPC; then + echo "CROSS_CC_HAS_I386_NOPIE=y" >> $config_target_mak + fi + ;; + esac + elif test $got_cross_cc = no && test "$container" != no && \ + test -n "$container_image"; then for host in $container_hosts; do if test "$host" = "$ARCH"; then echo "DOCKER_IMAGE=$container_image" >> $config_target_mak From patchwork Mon Apr 19 14:54:20 2021 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: 424005 Delivered-To: patch@linaro.org Received: by 2002:a02:6a6f:0:0:0:0:0 with SMTP id m47csp2795477jaf; Mon, 19 Apr 2021 08:01:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzjoS3Qfvwkp1VgGVNOE8CcKYwz7WyEhq8ylqgtlR16P6hDe+2x4wj+iwl4sEAW23DXMbme X-Received: by 2002:a5e:a515:: with SMTP id 21mr15143916iog.164.1618844469318; Mon, 19 Apr 2021 08:01:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618844469; cv=none; d=google.com; s=arc-20160816; b=TyeTX1UdJz39nb/N0bIW/4Y1OyYaTZdBmsx1iu+yQhAl5+qHHZBCkzLrL2dem9Xz8m uN3/Fw2LCEXZkMRK0JkTDKEufiUZk0bb7CmX8SwvUoze5PITKf0SiKJaSMB14G5k8GKN YKYrmURvgXq54GDIG68KnLRfuSBDlRx+TaykFBkepGbNGwJtSOtLrNem2jL9p3hj79JN mHgdK2WN6M+sAmk9/ViP8nTJMwaFYFsnTIssdWvYI4++AOwAqjGGENa6xzBwRib9p6Gd q76DXOI7JOzB0Dg1OijQfDTLgdC975zWKCoWq/RBLadL81eqKBKfF1gxKWSRlOiPXy33 WUJg== 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=xhD95M88KH2ZeEX/qKVoo6UaDmfYvhnT/tyZbT8agKM=; b=tPhFwyBjfHdRDwwyKi3bLy/snsGtvQUvxDdXDa0NsOWlkk5sksUt4X5esYnFfxZ7Qg E3Ga2ixEZONNiZzM210D6r4tIjJ5VVUDs8hdnM1sdJ14NLMkrkDktB5MKHe73tY/dau9 iKlgma/OqJH8aF/EIStc0RCL0JXam2No09MTzlWSj4xpKFgxJBXLwJRRxle9WN25SqUR s2nj4R70zHNw41/2a6qGUE8IXms2TSvDz34RXsgnYut5p9FnAntsJki5fIlI+H67QcV0 wh4RT0pTYg1Yhf4amPiFiDt3YCDo2Pf2QkZBGo/ZWL9zp0Wt4wnt6L9fO3DlpXGeVuyA 4+IA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=zTpkU3y2; 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 d5si19757549iow.45.2021.04.19.08.01.09 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 19 Apr 2021 08:01: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=zTpkU3y2; 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]:37840 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lYVOe-0001YP-KG for patch@linaro.org; Mon, 19 Apr 2021 11:01:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44628) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lYVIb-0003Ra-Sn for qemu-devel@nongnu.org; Mon, 19 Apr 2021 10:54:53 -0400 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]:37557) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lYVIZ-0006zW-Ul for qemu-devel@nongnu.org; Mon, 19 Apr 2021 10:54:53 -0400 Received: by mail-wm1-x32f.google.com with SMTP id t14-20020a05600c198eb029012eeb3edfaeso8412290wmq.2 for ; Mon, 19 Apr 2021 07:54:51 -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=xhD95M88KH2ZeEX/qKVoo6UaDmfYvhnT/tyZbT8agKM=; b=zTpkU3y22tMs+VRG/IJIOkstb1jp3pocZQa0q5NgQduYmMv5rGluuxWAUDWGZ39wMd eA56SBB4OdyQdBALW8G8oxxusbzlKGC2UKueLDFY1mDwXdtxR8EJ4jh3v1LDy/6KzI8N 0Ky/GQCUWRqxPWh4I30N4cbFm6+twCl3R5pafrzlqFCqOq6ag4qAskgUwkd12Nc1hpA1 RSyagI/HlxLLrtSbkoE0jMy9AZO87dAM6/7eoNkhkcofLmoTNFXAFO8w6o8/JxwYWzvo 5T+q+KB5z5xLZYCJ5Cz8QVk8JBRJzJdBFspcTDqVp+FL3sS0c3Ec1MI/zWi9up8iDxXL m4aA== 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=xhD95M88KH2ZeEX/qKVoo6UaDmfYvhnT/tyZbT8agKM=; b=iJgv0GcK34ViFraCVWIjGFsJHP2XjkoahnSKVs8iaFU2Ud7plOjKTxeIxXQNVYRlSI Sx0PpwoJE4LokIuZBuLRjs7v/ZVFep56EP6gZecrrnA9oc545LBK2iux+EqkHyPAAHQ5 BQhuYBCiwfrFyDg9cGJAra2ZYhJAW1+tfo4zr6jwxETfkbdKV4SKIv3P8uuK8fqE1lld jd8O+hwwiuWyqA0WdDlZHvmgT5a9hhL5CXVu3MhGUkPCx8TrUs0HEIMVAHcVhA4nryZw FcH7FA2REOga1iEw3q4OcXCrxILNwyrYqiv9VcK2bagir2CJjrJyiVR50fHkGuxc7y29 FLHw== X-Gm-Message-State: AOAM530tACdKGF4HPOnl9v0lHBhjIdcBxjcpjFcWDJbQq76DclJzXxTN R67kIsB83vsVW3jhioeT5TrqMb8NdSnihA== X-Received: by 2002:a05:600c:b47:: with SMTP id k7mr21715856wmr.109.1618844090584; Mon, 19 Apr 2021 07:54:50 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id i15sm21817006wrr.73.2021.04.19.07.54.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:54:42 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 8DC221FF99; Mon, 19 Apr 2021 15:54:36 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 10/25] tests/docker: Added libbpf library to the docker files. Date: Mon, 19 Apr 2021 15:54:20 +0100 Message-Id: <20210419145435.14083-11-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210419145435.14083-1-alex.bennee@linaro.org> References: <20210419145435.14083-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-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=ham autolearn_force=no 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, Andrew Melnychenko , berrange@redhat.com, f4bug@amsat.org, Wainer dos Santos Moschetta , Willian Rampazzo , stefanha@redhat.com, crosa@redhat.com, Thomas Huth , pbonzini@redhat.com, =?utf-8?q?Alex_Benn?= =?utf-8?b?w6ll?= , aurelien@aurel32.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Andrew Melnychenko The series of patches for eBPF RSS adds libbpf dependency for qemu. https://lists.gnu.org/archive/html/qemu-devel/2021-03/msg08887.html With this patch, libbpf added: Alpine - added libbpf-dev Centos 8 - added libbpf-devel Fedora - added libbpf-devel Signed-off-by: Andrew Melnychenko Signed-off-by: Alex Bennée Message-Id: <20210406082947.672708-2-andrew@daynix.com> --- tests/docker/dockerfiles/alpine.docker | 1 + tests/docker/dockerfiles/centos8.docker | 1 + tests/docker/dockerfiles/fedora.docker | 1 + 3 files changed, 3 insertions(+) -- 2.20.1 Reviewed-by: Willian Rampazzo Reviewed-by: Philippe Mathieu-Daudé diff --git a/tests/docker/dockerfiles/alpine.docker b/tests/docker/dockerfiles/alpine.docker index d63a269aef..998a7584ed 100644 --- a/tests/docker/dockerfiles/alpine.docker +++ b/tests/docker/dockerfiles/alpine.docker @@ -19,6 +19,7 @@ ENV PACKAGES \ gnutls-dev \ gtk+3.0-dev \ libaio-dev \ + libbpf-dev \ libcap-ng-dev \ libjpeg-turbo-dev \ libnfs-dev \ diff --git a/tests/docker/dockerfiles/centos8.docker b/tests/docker/dockerfiles/centos8.docker index a8c6c528b0..efc1349cc8 100644 --- a/tests/docker/dockerfiles/centos8.docker +++ b/tests/docker/dockerfiles/centos8.docker @@ -14,6 +14,7 @@ ENV PACKAGES \ git \ glib2-devel \ libaio-devel \ + libbpf-devel \ libepoxy-devel \ libfdt-devel \ libgcrypt-devel \ diff --git a/tests/docker/dockerfiles/fedora.docker b/tests/docker/dockerfiles/fedora.docker index 915fdc1845..483f2d9f83 100644 --- a/tests/docker/dockerfiles/fedora.docker +++ b/tests/docker/dockerfiles/fedora.docker @@ -32,6 +32,7 @@ ENV PACKAGES \ libcurl-devel \ libepoxy-devel \ libfdt-devel \ + libbpf-devel \ libiscsi-devel \ libjpeg-devel \ libpmem-devel \ From patchwork Mon Apr 19 14:54:21 2021 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: 424004 Delivered-To: patch@linaro.org Received: by 2002:a02:6a6f:0:0:0:0:0 with SMTP id m47csp2795460jaf; Mon, 19 Apr 2021 08:01:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzrihD2rA4KWYA32C2/ETqJDrRugsSeM6ljDpMylwIpYuwVqvD7zx70BLUyRj4lKKXc07WS X-Received: by 2002:a5e:9316:: with SMTP id k22mr14669163iom.160.1618844468170; Mon, 19 Apr 2021 08:01:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618844468; cv=none; d=google.com; s=arc-20160816; b=0i1P1BYfiEnadBEAAqhAuKcKMYf2Il58zbRjYAjAR0tUHOQmhsQ9EVMfM33KDkx5cX finLKQb6YTULnEKUmDEuevX2UH+6xjgGCeC6mkhBsz3of1D10CpubA+TnE06JKtIuWhI HQT/ZEleh6n6uCj4OOXCqmcGzrjKT2O+zzkFyC6S/BYUJzd+7RPPxunW43PLXxEY02HF lPxOWRR+6VSLiEGt/hmLkemZo2+ztKxPdnZT+Bss1XcoMCYBE8VrqfcePuVJ6vn3xMpZ h2o7YpauJe9TFK5JLqq4hplTX5XVyKjMUaMJm5LCsFa6Rc9Et5L5OTUVr3RFdNbk2b9M HNkA== 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=iizzfPGhkn8lyZo+/wpl/UTbuqCuTImLvD1b5kAGalE=; b=Hd2AqIP1M9tXeVN8STixSbi7jhX8MXVM3nivxgdIjwZ2wWFo2L4ixk87YOApCNun/G EcpqCKNu1ssLvkvHQxz62IGHYpBxtbuITB+f24uO8SrHQ+rfGs1Db1YJYURkbUp0Kuud wPNFIYoIgA8ivrzrEC+dgUZO4+ccu6NWEE8gamOsaH4+jceiEDNTE5lEdc1HnnvKGjxK ATjjwtlKcNLckNkoi9UiCTFIGxhPAakDoAqlTlKNWZqKazG49ev+31x+0+fbAm84yPMT 9U1z7Ugz3pEo7bGJZLgV666qk8zGmQZ58m0rNIg0dO9BVmq0jN0zITnEcUaZPJLv+oRr wciQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=YUZww236; 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 l1si15488126jaj.50.2021.04.19.08.01.08 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 19 Apr 2021 08:01:08 -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=YUZww236; 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]:37948 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lYVOd-0001ae-D4 for patch@linaro.org; Mon, 19 Apr 2021 11:01:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44634) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lYVId-0003Ur-5V for qemu-devel@nongnu.org; Mon, 19 Apr 2021 10:54:55 -0400 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]:42593) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lYVIa-00070B-Nb for qemu-devel@nongnu.org; Mon, 19 Apr 2021 10:54:54 -0400 Received: by mail-wm1-x333.google.com with SMTP id y5-20020a05600c3645b0290132b13aaa3bso6496189wmq.1 for ; Mon, 19 Apr 2021 07:54:52 -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=iizzfPGhkn8lyZo+/wpl/UTbuqCuTImLvD1b5kAGalE=; b=YUZww2364DApKUBOOFecZAlH3Cjw0njXUMJB/SSvPzE+crGVZ1JzpBkcv0NC9H/5Jj u+b+9tw4yH7BDB1cSFhbLwfYY30aAMduALfJdpcfPZr8m6UQdoUf0urf2vO8yuU+IokW tooPV0yY3XHdTgywrbl/D6gZg6rhUZsGzANMeOD+k9iEwyxcK50RGkmddNk1HzO6wShs Jrpsp1yp7mVU4bO6ohT/RKuJGsWfSiu2lPBHql95w8wIxjej4SgGy2ttShLw+jUDGmww n+bvOhCi4jdvvpmbEErIfxvc4E9CUHBftx9+icXhlwtIA9JNaatELaWzTIMzrq3DAUyo vnVA== 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=iizzfPGhkn8lyZo+/wpl/UTbuqCuTImLvD1b5kAGalE=; b=YQ59wmSwAjKuukjxnx7HaGcspgZI1EhfQlxueWPKbedjP/sQpxAiF4QFmKWJK8+ft+ yCmIcg9CjngEShfwjA5xeYeCUOBAPLlacMfctln5BHyaUYtoQACaTRgN8Uw2kCghXTtQ yx4CKwBIMX3cKzFdyvvGrbj9OqbBjKilKsBwxOSglpdZufJfg3dcVCKEvdQi2n65BLCf pxy0Ytr6RPCBjHcgYWfNUt3ym5oWAO+6t3jW3v1/pDmi5pb7ryiwQ7qnlo/nOBgO01PK IC929rK2fyZTB7kJqoQDI1LTXnYzZh290M9QepEwSKtFiysOfqQq80CYQXYUxwBOh9iw Itbg== X-Gm-Message-State: AOAM530ICS0UylD61Mr7rtEkbLe7qKidKDuYxrGZZwyRFknO8d7HpB+X lxoHW5uuNMAlcDnWyr0fJRVPSQ== X-Received: by 2002:a1c:1dd0:: with SMTP id d199mr21577263wmd.54.1618844091428; Mon, 19 Apr 2021 07:54:51 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id 186sm20132107wme.10.2021.04.19.07.54.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:54:42 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id A41E21FF9A; Mon, 19 Apr 2021 15:54:36 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 11/25] tests/tcg: Add docker_as and docker_ld cmds Date: Mon, 19 Apr 2021 15:54:21 +0100 Message-Id: <20210419145435.14083-12-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210419145435.14083-1-alex.bennee@linaro.org> References: <20210419145435.14083-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x333.google.com 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=ham autolearn_force=no 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, Bastian Koppelmann , f4bug@amsat.org, stefanha@redhat.com, crosa@redhat.com, pbonzini@redhat.com, =?utf-8?q?Alex_Benn=C3=A9e?= , aurelien@aurel32.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Bastian Koppelmann At least for the TriCore target no easily available c compiler exists. Thus we need to rely on "as" and "ld". This allows us to run them through the docker image. We don't test the generation capabilities of docker images as they are assumed to work. Signed-off-by: Bastian Koppelmann [AJB: fix quoting, only handle docker & clear, test -n, tweak commit msg] Signed-off-by: Alex Bennée --- tests/tcg/Makefile.qemu | 15 +++++++++++++++ tests/tcg/configure.sh | 17 ++++++++++++++++- 2 files changed, 31 insertions(+), 1 deletion(-) -- 2.20.1 Reviewed-by: Philippe Mathieu-Daudé diff --git a/tests/tcg/Makefile.qemu b/tests/tcg/Makefile.qemu index a56564660c..2c4617516b 100644 --- a/tests/tcg/Makefile.qemu +++ b/tests/tcg/Makefile.qemu @@ -22,6 +22,8 @@ quiet-@ = $(if $(V),,@) quiet-command = $(quiet-@)$(call quiet-command-run,$1,$2,$3) CROSS_CC_GUEST:= +CROSS_AS_GUEST:= +CROSS_LD_GUEST:= DOCKER_IMAGE:= -include tests/tcg/config-$(TARGET).mak @@ -42,6 +44,7 @@ cross-build-guest-tests: $(call quiet-command, \ (mkdir -p tests/tcg/$(TARGET) && cd tests/tcg/$(TARGET) && \ $(MAKE) -f $(TCG_MAKE) TARGET="$(TARGET)" CC="$(CROSS_CC_GUEST)" \ + AS="$(CROSS_AS_GUEST)" LD="$(CROSS_LD_GUEST)" \ SRC_PATH="$(SRC_PATH)" BUILD_STATIC=$(CROSS_CC_GUEST_STATIC) \ EXTRA_CFLAGS="$(CROSS_CC_GUEST_CFLAGS)"), \ "BUILD","$(TARGET) guest-tests with $(CROSS_CC_GUEST)") @@ -59,11 +62,23 @@ DOCKER_COMPILE_CMD="$(DOCKER_SCRIPT) cc \ -i qemu/$(DOCKER_IMAGE) \ -s $(SRC_PATH) -- " +DOCKER_AS_CMD="$(DOCKER_SCRIPT) cc \ + --cc $(DOCKER_CROSS_AS_GUEST) \ + -i qemu/$(DOCKER_IMAGE) \ + -s $(SRC_PATH) -- " + +DOCKER_LD_CMD="$(DOCKER_SCRIPT) cc \ + --cc $(DOCKER_CROSS_LD_GUEST) \ + -i qemu/$(DOCKER_IMAGE) \ + -s $(SRC_PATH) -- " + + .PHONY: docker-build-guest-tests docker-build-guest-tests: docker-image-$(DOCKER_IMAGE) $(call quiet-command, \ (mkdir -p tests/tcg/$(TARGET) && cd tests/tcg/$(TARGET) && \ $(MAKE) -f $(TCG_MAKE) TARGET="$(TARGET)" CC=$(DOCKER_COMPILE_CMD) \ + AS=$(DOCKER_AS_CMD) LD=$(DOCKER_LD_CMD) \ SRC_PATH="$(SRC_PATH)" BUILD_STATIC=y \ EXTRA_CFLAGS="$(CROSS_CC_GUEST_CFLAGS)"), \ "BUILD","$(TARGET) guest-tests with docker qemu/$(DOCKER_IMAGE)") diff --git a/tests/tcg/configure.sh b/tests/tcg/configure.sh index bfe9619217..9f304b6c5a 100755 --- a/tests/tcg/configure.sh +++ b/tests/tcg/configure.sh @@ -75,7 +75,13 @@ fi for target in $target_list; do arch=${target%%-*} + # reset all container fields container_image= + container_hosts= + container_cross_cc= + container_cross_as= + container_cross_ld= + case $target in aarch64-*) # We don't have any bigendian build tools so we only use this for AArch64 @@ -272,7 +278,16 @@ for target in $target_list; do for host in $container_hosts; do if test "$host" = "$ARCH"; then echo "DOCKER_IMAGE=$container_image" >> $config_target_mak - echo "DOCKER_CROSS_CC_GUEST=$container_cross_cc" >> $config_target_mak + echo "DOCKER_CROSS_CC_GUEST=$container_cross_cc" >> \ + $config_target_mak + if test -n "$container_cross_as"; then + echo "DOCKER_CROSS_AS_GUEST=$container_cross_as" >> \ + $config_target_mak + fi + if test -n "$container_cross_ld"; then + echo "DOCKER_CROSS_LD_GUEST=$container_cross_ld" >> \ + $config_target_mak + fi fi done fi From patchwork Mon Apr 19 14:54:22 2021 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: 424007 Delivered-To: patch@linaro.org Received: by 2002:a02:6a6f:0:0:0:0:0 with SMTP id m47csp2795774jaf; Mon, 19 Apr 2021 08:01:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx1UOLC2a+jUhQ4fu+cfAbdvpLynN01FPZ7k3fPU5rxK+srZxjiJ98sL11QmNkqZIgmkYwq X-Received: by 2002:a05:6e02:1c24:: with SMTP id m4mr8206010ilh.279.1618844487103; Mon, 19 Apr 2021 08:01:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618844487; cv=none; d=google.com; s=arc-20160816; b=qHoGWSpy2BIYD3WgqdZI5Xp5XcPU1pIzrlXBM+yFmEta12VknnsjUdR16eZCQW3wvp My1ko9lm2aXpOTIKsGDNE2p9YPb3meFY8D5H4yVwgDfPjT7GdUa6cwtpJ5jyegMMjdFM KI+9iW4fpK/LdtdV3HOm5KqAp0nQl9EnhA6fvuaTx2A9QdzkZnuQbCE4H3AoP3iku/xp ZLusAcan44teurgdGp+/p87iRdf2Yh+f0EFDL5U7QKH6MUsAt+zIohjNviIRovfM8xer 0PHVglhAt9gDdkleFlfzde59fVWMeB/qmwV4Jz1MzZi1gzzpccM2T318SKKgVRZ634BE caUA== 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=VsOEBZtB0HF2JImaMnITvaw+tRLQeXiNM3E9i7SwoP8=; b=trtPX1heoyPH+l1X4SQFKO7V/HdslqLAUdVAq5+L5OwvlL+72o0Oc9MTd0Lk4yNC5E 7AjM+DsqbyqDfXN5RRWsx4bHeLlXpB5XEoN/8cyEdlT2Ca5/xhR00JwBX3x+FX78uCv6 LYSoAd7w17EygDzLNkwvUB6bgMc/P+dPDWXBdwaQb2h9TNadkuxl2VgW605iopFRdFtB vMDaCvskpqUi6oaaA9Xd1vI1v+SAshNFqkk+pEo3uInmMTChaSuO9kWk83c+wIUIDexH dmxnKuPeIEUJpq/zTqobi/iSUxeACIZ3C1csZ4P7N54qSSgUDvk8P8mdeEvuvxtNg2Gq WY1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=GFN1+Rn2; 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 p1si16123027iof.94.2021.04.19.08.01.27 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 19 Apr 2021 08:01: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=GFN1+Rn2; 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]:38320 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lYVOw-0001kW-Gu for patch@linaro.org; Mon, 19 Apr 2021 11:01:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44598) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lYVIY-0003Ih-FD for qemu-devel@nongnu.org; Mon, 19 Apr 2021 10:54:50 -0400 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]:36691) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lYVIW-0006xZ-MD for qemu-devel@nongnu.org; Mon, 19 Apr 2021 10:54:50 -0400 Received: by mail-wr1-x42a.google.com with SMTP id m9so21618228wrx.3 for ; Mon, 19 Apr 2021 07:54:48 -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=VsOEBZtB0HF2JImaMnITvaw+tRLQeXiNM3E9i7SwoP8=; b=GFN1+Rn29/ViShAWf0FgNR5ErIat2oYslMJfj8B6eKs5YtjBg1izAALZNgsZr+1T8l IL6x85VQyVaKjWnyBfIC+yjSDaHlxlKmCTA/s+SS/+PsHHjMM36iDdVNxa2LcQJjK2bk dj2jeJRBtElWcewQIp6qh5MoUef9IG+7kfOxkqVoQscopsGCpBcI/Uzren2zAn9GmGlm zIphi4mPF0CN5fBz5IOdoJHO7nT1/A1lfzW3yrNCg7TqEdBb50sTv27VNSGyvslP9FZ1 yMbp616g+CEauDWhEkBuXfFalZMW/Rt6YC8l+k8JsIYWupNzGoR2rH7hyH0z97wRZz4B 6QiQ== 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=VsOEBZtB0HF2JImaMnITvaw+tRLQeXiNM3E9i7SwoP8=; b=E9KRkin/U02Ezk2OvBCm5ajmfcFQeKNEeeeURMIqCXqFyKSLLElXqvCvSY1S0De1YV ++wBRaMJ8TERYOh3KIMR9uBXouyRAO6Ec5pR1Z4mZaHiBL8DgWFTWleUhAkiFnThcdMZ +NMIi0sVHIZdHzkU+Eam5Jx8sN9yTHA1DseXzlwkXwKPE/oPIoIDJMVM296D05GJVJdd S5OwpyGmhzktgOiS59oYucYKkEG6+NlXAqxOX2MD3lB05vgBn7uKx50HA1dUNOwOR5B5 FoAjkidfVy50qQQgBii7xSq+g3RbKw8+Hp8jM0WrlvLq23p57casJVBqX/92Za8JlwHk iSMQ== X-Gm-Message-State: AOAM530PVqGJKuEsswH/3AHYGwzlSXttt4q/FdK+KMaF6UMaVDpByHdM lnhUANoOzKgMTT1oKwRtVN9eHw== X-Received: by 2002:adf:e650:: with SMTP id b16mr14764273wrn.273.1618844087330; Mon, 19 Apr 2021 07:54:47 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id 66sm23752239wmb.36.2021.04.19.07.54.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:54:42 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id BAECA1FF9B; Mon, 19 Apr 2021 15:54:36 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 12/25] tests/tcg: Run timeout cmds using --foreground Date: Mon, 19 Apr 2021 15:54:22 +0100 Message-Id: <20210419145435.14083-13-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210419145435.14083-1-alex.bennee@linaro.org> References: <20210419145435.14083-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-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=ham autolearn_force=no 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, Bastian Koppelmann , f4bug@amsat.org, stefanha@redhat.com, crosa@redhat.com, pbonzini@redhat.com, =?utf-8?q?Alex_Benn=C3=A9e?= , aurelien@aurel32.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Bastian Koppelmann when trying to run successful short tests from the Makefile timeout would not terminate. Rather it would wait until the time runs out. Excerpt from the manpage: --foreground when not running timeout directly from a shell prompt, allow COMMAND to read from the TTY and get TTY signals; in this mode, chil‐ dren of COMMAND will not be timed out Signed-off-by: Bastian Koppelmann Signed-off-by: Alex Bennée Message-Id: <20210305170045.869437-3-kbastian@mail.uni-paderborn.de> --- tests/tcg/Makefile.target | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -- 2.20.1 diff --git a/tests/tcg/Makefile.target b/tests/tcg/Makefile.target index cab8c6b3a2..b29fae4630 100644 --- a/tests/tcg/Makefile.target +++ b/tests/tcg/Makefile.target @@ -43,9 +43,10 @@ quiet-command = $(if $(V),$1,$(if $(2),@printf " %-7s %s\n" $2 $3 && $1, @$1)) # $1 = test name, $2 = cmd, $3 = desc ifdef CONFIG_USER_ONLY -run-test = $(call quiet-command, timeout $(TIMEOUT) $2 > $1.out,"TEST",$3) +run-test = $(call quiet-command, timeout --foreground $(TIMEOUT) $2 > $1.out, \ + "TEST",$3) else -run-test = $(call quiet-command, timeout $(TIMEOUT) $2,"TEST",$3) +run-test = $(call quiet-command, timeout --foreground $(TIMEOUT) $2,"TEST",$3) endif # $1 = test name, $2 = reference From patchwork Mon Apr 19 14:54:23 2021 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: 424012 Delivered-To: patch@linaro.org Received: by 2002:a02:6a6f:0:0:0:0:0 with SMTP id m47csp2801608jaf; Mon, 19 Apr 2021 08:07:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxK3J3p670kdozcFQL/fLKIreTYtiWSlnHdpLW+7sIsdD/vzVbmqDAY06OIMRrO4UfEqh95 X-Received: by 2002:a92:6e0e:: with SMTP id j14mr17872745ilc.90.1618844841778; Mon, 19 Apr 2021 08:07:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618844841; cv=none; d=google.com; s=arc-20160816; b=eEHL+TJXCk0Ekd7+rbpA2f+GZAC+rYR8f2VNtf8N+wr7FUR7rhKVgXINb1f5MMTgYb 7WP3CruCjPtTE8Tk2UCidqgLco6ZpvZkz8+gFGMDC+5F4/marD6zqxchzHDAC9AJOBUJ H0Xhbaz7p2MEUpFvVQhR2MrHC0gi9b7cs3wmv+Epkbet7ZU/ezQdsZhylz5Za0jMaaOh Y8gVWFGlp9nMIB+gBCErTQnZmA4W4o1kfzy+MxwFAh06c0j5NGq9uYwFv2vvyLXAbhmp SQVoacp8kJ1xW5U9Sc/q5Bnl5JcsLoFAd5iaCVjfic+PkL/r+K1XbNosBZ0GujG2/818 foeQ== 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=7rjRZMpfOjz06kT3DXo4AnrGU+LQX663aqbqm3FCMKI=; b=rQqPS2PGpP9qqY0xUI5yhKRqpFF+29vfBKuRNYXaLO8M3QKO5bN2FbgYlFxfVxnHUe 7IhNie8SSG+HHOiuAhphgtObcKwrGV1yrQ4ai/+xChcmAS1T8U+DRwujjxZ26Bfhcqcd hJfFk4LvaawWV0UMdDW4XlsIKBGC/UeXzwq0I7okpayFMF1E7XjXamU7VZApNw5OyiaQ q182kJTBYv3FrLY+Ol69rpR1Ng3aCylgELtZtzI4BX0ELabLuc6HYtYnlJyYTTM0cErR l1BKZ6KIzsiZqLoC3QEgdhrbnNxKd+Es85mzI1mqtvmR80oi+4dMUW8rJsIBoXyk64iC FPLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="IynC/fJ8"; 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 l5si17092027ion.8.2021.04.19.08.07.21 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 19 Apr 2021 08:07:21 -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="IynC/fJ8"; 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]:55362 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lYVUf-00018M-4z for patch@linaro.org; Mon, 19 Apr 2021 11:07:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44750) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lYVIk-0003lI-5q for qemu-devel@nongnu.org; Mon, 19 Apr 2021 10:55:02 -0400 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]:38732) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lYVIg-00073o-Li for qemu-devel@nongnu.org; Mon, 19 Apr 2021 10:55:01 -0400 Received: by mail-wr1-x42b.google.com with SMTP id w4so30647654wrt.5 for ; Mon, 19 Apr 2021 07:54: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=7rjRZMpfOjz06kT3DXo4AnrGU+LQX663aqbqm3FCMKI=; b=IynC/fJ80YSxZXmXMrNzVTu6fdQxPn/f0tdQ0OPOfzimHJSum2ulZ1Jiiw+gs4k6pB hMGaFhM7l4gS71yGulc49QWcz+3GD7TgIjfPN9V5odIlveHKgl1b+ntkRfk14OOy2de3 HFUPKnQpu1chiMix6nU0qmq32cLx3gN3x0LPU+2XPFpT8tOi8zSkD1KbHd+NWLZwxlrn /Ot7n114HsmxsgtK4E7rHWM/hOZaJOCH89cnyhvssAFmwdMHIK+m5FzSBQv17ZBjmoyj f/mubiGtlCYBmraUmt7olJQctCLwkGICJrKDJ3dfHM2S8Czy6DiJUxPa8fBCaIw5IDbn 54XQ== 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=7rjRZMpfOjz06kT3DXo4AnrGU+LQX663aqbqm3FCMKI=; b=Xb7XYwmVRxsNGZ43lcTGto21Yq4z8WcvNzglLxeXFvxpvqxrmWOPJv61gdFyOKqlRm ut7LDwXgz2UhnPuh48UJM37WgwYe/0N4TawmE43zoexduR7k6ktc3vk71OGen5km+TJT TBffdqrwCvznHLp37ndAwNIgX0kq6M+lLTJzOZZiDhPNhIlEvFOBFmB/qo+4pGQp2G93 JB6bFRHWVdgYEYlv3CD5Y9jLkLLlF4VGAjCZs+qi9LGvYWEBzmUgX0/RVEdptnUx9wnh pCc7n8NgEbn4aQk4ufqfLwkjG1tLN/XF1vMGsUA6jpcxvApG+ySX8u1HGpx8SQPYFb36 s/gA== X-Gm-Message-State: AOAM532t34BRK0XIQTq7Zntt8kszYzfo8oDSGI/CM0QFct9mTKPL3msY uW2Lcz1QyPUZcLb66nk7BCVkCQ== X-Received: by 2002:a5d:65c4:: with SMTP id e4mr14898372wrw.287.1618844097021; Mon, 19 Apr 2021 07:54:57 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id o62sm2669742wme.5.2021.04.19.07.54.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:54:55 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id D73191FF9C; Mon, 19 Apr 2021 15:54:36 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 13/25] hw/tricore: Add testdevice for tests in tests/tcg/ Date: Mon, 19 Apr 2021 15:54:23 +0100 Message-Id: <20210419145435.14083-14-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210419145435.14083-1-alex.bennee@linaro.org> References: <20210419145435.14083-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42b.google.com 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=ham autolearn_force=no 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, Bastian Koppelmann , f4bug@amsat.org, stefanha@redhat.com, crosa@redhat.com, pbonzini@redhat.com, =?utf-8?q?Alex_Benn=C3=A9e?= , aurelien@aurel32.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Bastian Koppelmann this device is used to verify the correctness of regression tests by allowing guests to write their exit status to this device. This is then used by qemu to exit using the written status. Reviewed-by: Alex Bennée Signed-off-by: Bastian Koppelmann Signed-off-by: Alex Bennée Message-Id: <20210305170045.869437-4-kbastian@mail.uni-paderborn.de> --- include/hw/tricore/tricore_testdevice.h | 38 ++++++++++++ hw/tricore/tricore_testboard.c | 8 +++ hw/tricore/tricore_testdevice.c | 82 +++++++++++++++++++++++++ hw/tricore/meson.build | 1 + 4 files changed, 129 insertions(+) create mode 100644 include/hw/tricore/tricore_testdevice.h create mode 100644 hw/tricore/tricore_testdevice.c -- 2.20.1 diff --git a/include/hw/tricore/tricore_testdevice.h b/include/hw/tricore/tricore_testdevice.h new file mode 100644 index 0000000000..2c56c51bcb --- /dev/null +++ b/include/hw/tricore/tricore_testdevice.h @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2018-2021 Bastian Koppelmann Paderborn University + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + */ + + +#ifndef HW_TRICORE_TESTDEV_H +#define HW_TRICORE_TESTDEV_H + +#include "hw/sysbus.h" +#include "hw/hw.h" + +#define TYPE_TRICORE_TESTDEVICE "tricore_testdevice" +#define TRICORE_TESTDEVICE(obj) \ + OBJECT_CHECK(TriCoreTestDeviceState, (obj), TYPE_TRICORE_TESTDEVICE) + +typedef struct { + /* */ + SysBusDevice parent_obj; + + /* */ + MemoryRegion iomem; + +} TriCoreTestDeviceState; + +#endif diff --git a/hw/tricore/tricore_testboard.c b/hw/tricore/tricore_testboard.c index 12ea1490fd..9791986a3e 100644 --- a/hw/tricore/tricore_testboard.c +++ b/hw/tricore/tricore_testboard.c @@ -28,6 +28,7 @@ #include "exec/address-spaces.h" #include "elf.h" #include "hw/tricore/tricore.h" +#include "hw/tricore/tricore_testdevice.h" #include "qemu/error-report.h" @@ -57,6 +58,7 @@ static void tricore_testboard_init(MachineState *machine, int board_id) { TriCoreCPU *cpu; CPUTriCoreState *env; + TriCoreTestDeviceState *test_dev; MemoryRegion *sysmem = get_system_memory(); MemoryRegion *ext_cram = g_new(MemoryRegion, 1); @@ -88,6 +90,12 @@ static void tricore_testboard_init(MachineState *machine, int board_id) memory_region_add_subregion(sysmem, 0xf0050000, pcp_data); memory_region_add_subregion(sysmem, 0xf0060000, pcp_text); + test_dev = g_new(TriCoreTestDeviceState, 1); + object_initialize(test_dev, sizeof(TriCoreTestDeviceState), + TYPE_TRICORE_TESTDEVICE); + memory_region_add_subregion(sysmem, 0xf0000000, &test_dev->iomem); + + tricoretb_binfo.ram_size = machine->ram_size; tricoretb_binfo.kernel_filename = machine->kernel_filename; diff --git a/hw/tricore/tricore_testdevice.c b/hw/tricore/tricore_testdevice.c new file mode 100644 index 0000000000..a1563aa568 --- /dev/null +++ b/hw/tricore/tricore_testdevice.c @@ -0,0 +1,82 @@ +/* + * Copyright (c) 2018-2021 Bastian Koppelmann Paderborn University + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + */ + +#include "qemu/osdep.h" +#include "hw/sysbus.h" +#include "hw/qdev-properties.h" +#include "hw/tricore/tricore_testdevice.h" + +static void tricore_testdevice_write(void *opaque, hwaddr offset, + uint64_t value, unsigned size) +{ + exit(value); +} + +static uint64_t tricore_testdevice_read(void *opaque, hwaddr offset, + unsigned size) +{ + return 0xdeadbeef; +} + +static void tricore_testdevice_reset(DeviceState *dev) +{ +} + +static const MemoryRegionOps tricore_testdevice_ops = { + .read = tricore_testdevice_read, + .write = tricore_testdevice_write, + .valid = { + .min_access_size = 4, + .max_access_size = 4, + }, + .endianness = DEVICE_NATIVE_ENDIAN, +}; + +static void tricore_testdevice_init(Object *obj) +{ + TriCoreTestDeviceState *s = TRICORE_TESTDEVICE(obj); + /* map memory */ + memory_region_init_io(&s->iomem, OBJECT(s), &tricore_testdevice_ops, s, + "tricore_testdevice", 0x4); +} + +static Property tricore_testdevice_properties[] = { + DEFINE_PROP_END_OF_LIST() +}; + +static void tricore_testdevice_class_init(ObjectClass *klass, void *data) +{ + DeviceClass *dc = DEVICE_CLASS(klass); + + device_class_set_props(dc, tricore_testdevice_properties); + dc->reset = tricore_testdevice_reset; +} + +static const TypeInfo tricore_testdevice_info = { + .name = TYPE_TRICORE_TESTDEVICE, + .parent = TYPE_SYS_BUS_DEVICE, + .instance_size = sizeof(TriCoreTestDeviceState), + .instance_init = tricore_testdevice_init, + .class_init = tricore_testdevice_class_init, +}; + +static void tricore_testdevice_register_types(void) +{ + type_register_static(&tricore_testdevice_info); +} + +type_init(tricore_testdevice_register_types) diff --git a/hw/tricore/meson.build b/hw/tricore/meson.build index 77ff6fd137..47e36bb077 100644 --- a/hw/tricore/meson.build +++ b/hw/tricore/meson.build @@ -1,5 +1,6 @@ tricore_ss = ss.source_set() tricore_ss.add(when: 'CONFIG_TRICORE', if_true: files('tricore_testboard.c')) +tricore_ss.add(when: 'CONFIG_TRICORE', if_true: files('tricore_testdevice.c')) tricore_ss.add(when: 'CONFIG_TRIBOARD', if_true: files('triboard.c')) tricore_ss.add(when: 'CONFIG_TC27X_SOC', if_true: files('tc27x_soc.c')) From patchwork Mon Apr 19 14:54:24 2021 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: 424013 Delivered-To: patch@linaro.org Received: by 2002:a02:6a6f:0:0:0:0:0 with SMTP id m47csp2802304jaf; Mon, 19 Apr 2021 08:08:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxuZ388qDNqD+4Lc1WChs+XPRbWFWc7uW4wVOSc7JKjPJgQR/8dB2MNhvBcPNl/qE7WaCZV X-Received: by 2002:a05:6e02:1aaa:: with SMTP id l10mr18339416ilv.29.1618844888619; Mon, 19 Apr 2021 08:08:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618844888; cv=none; d=google.com; s=arc-20160816; b=wSbBwMe6lUWr0vplqNOYsQyRXp9KQOPUEfsiWK50cggTQdNexrzc31jPJC3y9ABKP3 M4Bhokpxx96chIqvj6AyIMieTxu1k8OeMnMkGyar4njFjnKXeIT9JcVqJREZHXnFBc24 mBMyBhAwdOO/xuu75U+K+ZlzgJPQL8WGIwbPdi+N+YzfgvCUCwxaSG8NrGoeeLM7eeb0 kXbhIPuY0YLSrsPsD1boI3RLaYKa+e+YmnKDKAb4JB9p9BGtaYZ9ccjslcoYNvr8bCDW uhww46j/KsYV93E3Y65gw+hh/yQApU9WdiHcAo+feNT3PL+krqZNBZQAdCfVu9BW3EVz w6jQ== 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=hiVgs9/+iJ3i0DlYql/VgFCWa4s85pzlKekXIccHrI4=; b=zyvSb8z8ChpgPvaOs80mfozKPwWjwHH0A0Hb3HC+sx9gTOnyc+bI7Wupo7rHP4u9eT 2jYEs3/XvX8TvYlTOVnwwbgsrfWwkx10k7Fq+XDzSjK2KK87i6IEgXEptC4Vq28BGsWq f4ixaA25VweLrSm/eqN11eDx+TGiO6rc7SwrjWzla5mf1xzFUIo40TqR7X+apoCAzD6q Hw28Qg3IuWdf5TO//rlsS3KmHaMxVftqJczxg4xIRMgsgoFuwEiaNXZCJ5nrRgb/Empk qT6d53wO/Qbs3kxALbjhRwsLpTiQZvhYhDi0U9PTLTuIAZBfeQ9N9XBIUMzQdtfPZfu8 16Cw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=BBbsJudp; 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 l9si16170651ils.131.2021.04.19.08.08.08 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 19 Apr 2021 08:08:08 -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=BBbsJudp; 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]:55402 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lYVVQ-00019W-2b for patch@linaro.org; Mon, 19 Apr 2021 11:08:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44708) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lYVIh-0003fW-Mz for qemu-devel@nongnu.org; Mon, 19 Apr 2021 10:54:59 -0400 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]:43888) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lYVIf-00072z-IE for qemu-devel@nongnu.org; Mon, 19 Apr 2021 10:54:59 -0400 Received: by mail-wr1-x433.google.com with SMTP id x7so34343624wrw.10 for ; Mon, 19 Apr 2021 07:54: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=hiVgs9/+iJ3i0DlYql/VgFCWa4s85pzlKekXIccHrI4=; b=BBbsJudpBjGS2geH6Muv8QJ+qBQT4hTv5TlDUZzAjkexUKwzbduVZZ5SrfjrgMX641 KsReGPdVI9dsUcbJTyy7PLYEiISSDgXGdi8I6mKVu+ybhP7+ixmMXIYt/oUdVgoVrmKD uU9k/yQeRU6WHpvQ7Qw/53UHdQHuy0RwbxKzJGyQ/6P88Khw6y8eqj+5tfEZFLPdcbWn V2x5vgm9HbO4Ia2PCEJhKcYM/Y9nxAKQ0pPforZizWNJnnK4VsYxEKMj5/gXrGiiJa21 TA1BdzVW4SlvA1zhgEbpNCkgMbAwfJNYHhZ8OmFSc0w0m48AtKqmZYOWhdzFn7RQ9eFM bzjw== 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=hiVgs9/+iJ3i0DlYql/VgFCWa4s85pzlKekXIccHrI4=; b=pSJBeTXhb5c4fa/MozQZiYG6wrwEqbeUdAJ/hKQ+gpd+oNpGsKeYHBxQUonrRXYrdU wCB5s5AsVCPX2KlrJJ97Fb/iVaKxLdRFKUlHRGvjNT6kovLXqK/NM4VMHYNF1VbYNd3l GFe8Uves3uloD/38z2hPwoNoHAfdRHpGgox1OGLhAhR1UBdvseexE6qr6DV2VUqBIorq wvriYSmfhZlP5oH/WOBcPmuEtaXU/OIvRt6YQ+ihdbN5uIn/8y3bv6MxwURHV9LNb9KE s3Ch/hj4zqzSiNE1osfhA3SbE4bGb0VN8y84KN5nRZPb4LkjojpktiblU/fVk7OBhxQU OH3Q== X-Gm-Message-State: AOAM532Ut10/V7HxB8NuQqzClZHq9n10rDSuRa9geTpopox6+LuH0lDo eeEnV70LyKK4jdEb449+zojLdQ== X-Received: by 2002:adf:f88f:: with SMTP id u15mr15075002wrp.368.1618844096138; Mon, 19 Apr 2021 07:54:56 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id g84sm16346637wmg.42.2021.04.19.07.54.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:54:55 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id F1BBA1FF9D; Mon, 19 Apr 2021 15:54:36 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 14/25] tests/tcg/tricore: Add build infrastructure Date: Mon, 19 Apr 2021 15:54:24 +0100 Message-Id: <20210419145435.14083-15-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210419145435.14083-1-alex.bennee@linaro.org> References: <20210419145435.14083-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::433; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x433.google.com 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=ham autolearn_force=no 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, Bastian Koppelmann , f4bug@amsat.org, stefanha@redhat.com, crosa@redhat.com, pbonzini@redhat.com, =?utf-8?q?Alex_Benn=C3=A9e?= , aurelien@aurel32.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Bastian Koppelmann this includes the Makefile and linker script to build all the tests. Reviewed-by: Alex Bennée Signed-off-by: Bastian Koppelmann Signed-off-by: Alex Bennée Message-Id: <20210305170045.869437-5-kbastian@mail.uni-paderborn.de> --- MAINTAINERS | 1 + tests/tcg/tricore/Makefile.softmmu-target | 15 ++++++ tests/tcg/tricore/link.ld | 60 +++++++++++++++++++++++ 3 files changed, 76 insertions(+) create mode 100644 tests/tcg/tricore/Makefile.softmmu-target create mode 100644 tests/tcg/tricore/link.ld -- 2.20.1 diff --git a/MAINTAINERS b/MAINTAINERS index 26c901527e..cf1119bd8e 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -378,6 +378,7 @@ S: Maintained F: target/tricore/ F: hw/tricore/ F: include/hw/tricore/ +F: tests/tcg/tricore/ Multiarch Linux User Tests M: Alex Bennée diff --git a/tests/tcg/tricore/Makefile.softmmu-target b/tests/tcg/tricore/Makefile.softmmu-target new file mode 100644 index 0000000000..d64a99b95f --- /dev/null +++ b/tests/tcg/tricore/Makefile.softmmu-target @@ -0,0 +1,15 @@ +TESTS_PATH = $(SRC_PATH)/tests/tcg/tricore + +LDFLAGS = -T$(TESTS_PATH)/link.ld +ASFLAGS = + +QEMU_OPTS += -M tricore_testboard -nographic -kernel + +%.pS: $(TESTS_PATH)/%.S + $(HOST_CC) -E -o $@ $< + +%.o: %.pS + $(AS) $(ASFLAGS) -o $@ $< + +%.tst: %.o + $(LD) $(LDFLAGS) $< -o $@ diff --git a/tests/tcg/tricore/link.ld b/tests/tcg/tricore/link.ld new file mode 100644 index 0000000000..364bcdc00a --- /dev/null +++ b/tests/tcg/tricore/link.ld @@ -0,0 +1,60 @@ +/* Default linker script, for normal executables */ +OUTPUT_FORMAT("elf32-tricore") +OUTPUT_ARCH(tricore) +ENTRY(_start) + +/* the internal ram description */ +MEMORY +{ + text_ram (rx!p): org = 0x80000000, len = 15K + data_ram (w!xp): org = 0xd0000000, len = 130K +} +/* + * Define the sizes of the user and system stacks. + */ +__USTACK_SIZE = DEFINED (__USTACK_SIZE) ? __USTACK_SIZE : 1K ; +/* + * Define the start address and the size of the context save area. + */ +__CSA_BEGIN = 0xd0000000 ; +__CSA_SIZE = 8k ; +__CSA_END = __CSA_BEGIN + __CSA_SIZE ; + +SECTIONS +{ + .text : + { + *(.text) + . = ALIGN(8); + } > text_ram + + .rodata : + { + *(.rodata) + *(.rodata1) + } > data_ram + + .data : + { + . = ALIGN(8) ; + *(.data) + *(.data.*) + . = ALIGN(8) ; + __USTACK = . + __USTACK_SIZE -768; + + } > data_ram + /* + * Allocate space for BSS sections. + */ + .bss : + { + BSS_BASE = . ; + *(.bss) + *(COMMON) + . = ALIGN(8) ; + } > data_ram + /* Make sure CSA, stack and heap addresses are properly aligned. */ + _. = ASSERT ((__CSA_BEGIN & 0x3f) == 0 , "illegal CSA start address") ; + _. = ASSERT ((__CSA_SIZE & 0x3f) == 0 , "illegal CSA size") ; + +} From patchwork Mon Apr 19 14:54:25 2021 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: 424006 Delivered-To: patch@linaro.org Received: by 2002:a02:6a6f:0:0:0:0:0 with SMTP id m47csp2795519jaf; Mon, 19 Apr 2021 08:01:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwP5lrimtBfn3S/e9qCdSWon8QD898DVxAn8PGSkptMw4dMO2/hp8u9G/PZQAs6l0DgxIut X-Received: by 2002:a02:6f5c:: with SMTP id b28mr7677972jae.108.1618844471306; Mon, 19 Apr 2021 08:01:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618844471; cv=none; d=google.com; s=arc-20160816; b=eydd5NWuIhYXyLkWvQ/r6h2nsHn0AiT2eXpliJjB0dJY4B3Po05quWdyqSJ6Qldmuh JOdWTyuZ1f+dq6Y7VQ41ZjKJZTdIqPW4XMSZplsfozOrQr6150x+inPE7scpkm5euiOC xQ/KESTrlN1xRqJ+fZAXnj5+yl5vEL+w1y0kDvrwzavRessApZe6OZY1VCNinRHIriFI sBiMOeR223T7c+Ym8HcOVmwlYsHnt7pSxGv6cnbVrazPUrY629vr5PmEA/s9AImx/Ep9 NLGiA44gtVlT6HXSZcjVgs8CiBNiU43qKA2AGjOvpS7IhMV2UNA2QiB4HBvPWk7xFqhs idUA== 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=AJ9m89LqMP6JqoZX9kb8/L/8kKBGmEH5iou5hRLkrKc=; b=G2zHVo6zT3HS9JAdicDmPLpWi4mUZSsDknq7OKQw7p7c/NY1wIKRUn6fgzUAjQtMLB SLyb1Y5OiKla3e4gCzVNY3GUHW/MQuXuup6y0kyY9IgsBmLdGJXTt4mUMUvH2EDv/EA7 Yop19LYSaCYZ9PjZRd+z5tMQxp9V6DOCGF/RkC9Vqgn5n+CbVSIkPjUIESVBjJw6F1Co 8Vqd3fm4sFpe8y3St012/wtcdx8his65xYMoxhfh/5jYpX0Nxhha6aCpaKKXqSt/KQYX /R2AkXAdAGkjpoDzP4igdA9wq3iI/ZQ5qn4jCglS6vMaaoUAU0Fn1/xmggkFT19darVI BT2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=rAGg1mbh; 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 i13si14692128ilm.161.2021.04.19.08.01.11 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 19 Apr 2021 08:01:11 -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=rAGg1mbh; 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]:37906 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lYVOg-0001Zi-N3 for patch@linaro.org; Mon, 19 Apr 2021 11:01:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44744) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lYVIj-0003kV-OA for qemu-devel@nongnu.org; Mon, 19 Apr 2021 10:55:01 -0400 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]:34751) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lYVIi-00074n-0I for qemu-devel@nongnu.org; Mon, 19 Apr 2021 10:55:01 -0400 Received: by mail-wr1-x436.google.com with SMTP id r7so22360371wrm.1 for ; Mon, 19 Apr 2021 07:54:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=AJ9m89LqMP6JqoZX9kb8/L/8kKBGmEH5iou5hRLkrKc=; b=rAGg1mbh51sNbTgVfi6Jlr15k/Kac9xyLwf6BdZJ2PjattS9BwXMNfKfsEqMe0BIeb rzwfxmlxfqnzffCsI1th7ATgyWn2IjSeWmKa2emz+rnxc0devOOFeVakVDYvPdTU1bSU saYLpxCtryCNKnG/yRJj9uGBOHm+U5dpMqhPrgllY6H2fn76dptBQPcYzwQB6Wc4scTH eSlginKbSzCyEDy0WXeyp333d3fI//NCdrceWCnmJotSRl4SOkISnI2kaLuC72guerIW E6bC5zybROpQP72ocNX1VDD8ZLoV3HeEi41mMXMTHtb7WRTWaTVNCxMqZWWFPxy57c27 PUpg== 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=AJ9m89LqMP6JqoZX9kb8/L/8kKBGmEH5iou5hRLkrKc=; b=ggVStm4nHRRjvCCHO1Km5J3QGErWuThAA824MdoLcXnsyF8MkPNAfbaxPehwJADNgA f5TmsdFDFBn0JOmvEBovPqRsMRBrkXfT4BUBOI9n9Afv9zEd0/ZRaA8xyMf5o0AtHPWr rwI7JfENqDeys2yd4wJFpyDlwB4SX4Mp0leikoE+hwt1oYqlBbf3O8Ige7glpCProbE8 6UYKrrWmkI0TrR3oXUrTBWvvPdf1NxhgsWa99ZEavHCEwdJ50eaKHOIfwgwtiFEfiI4k fEn4HYAOMv/xYpHDp/AxM/rJ2KKJDCLk5VVDD16UPAVu3D3XQFbVtAlOvWILMwDoMbbW C8HA== X-Gm-Message-State: AOAM532/gGG7z8/kKpkDbv4EveM95tMiLiq9s926fmPkHgL9FDRar6yU 1fTBcuMPO7OFJAyxyEA0urO74Q== X-Received: by 2002:adf:e985:: with SMTP id h5mr14931026wrm.155.1618844098692; Mon, 19 Apr 2021 07:54:58 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id a8sm25648612wrh.91.2021.04.19.07.54.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:54:55 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 11F8E1FF9E; Mon, 19 Apr 2021 15:54:37 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 15/25] configure: Emit HOST_CC to config-host.mak Date: Mon, 19 Apr 2021 15:54:25 +0100 Message-Id: <20210419145435.14083-16-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210419145435.14083-1-alex.bennee@linaro.org> References: <20210419145435.14083-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-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=ham autolearn_force=no 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, Bastian Koppelmann , f4bug@amsat.org, stefanha@redhat.com, crosa@redhat.com, pbonzini@redhat.com, =?utf-8?q?Alex_Benn=C3=A9e?= , aurelien@aurel32.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Bastian Koppelmann this is needed by the tricore-tcg-tests as tricore-gcc is not easily available. Thus we rely on the HOST_CC to do the preprocessing of the tricore assembly files. Signed-off-by: Bastian Koppelmann Signed-off-by: Alex Bennée Message-Id: <20210305170045.869437-6-kbastian@mail.uni-paderborn.de> --- configure | 1 + 1 file changed, 1 insertion(+) -- 2.20.1 diff --git a/configure b/configure index 4f374b4889..bb86c72479 100755 --- a/configure +++ b/configure @@ -6139,6 +6139,7 @@ echo "GENISOIMAGE=$genisoimage" >> $config_host_mak echo "MESON=$meson" >> $config_host_mak echo "NINJA=$ninja" >> $config_host_mak echo "CC=$cc" >> $config_host_mak +echo "HOST_CC=$host_cc" >> $config_host_mak if $iasl -h > /dev/null 2>&1; then echo "CONFIG_IASL=$iasl" >> $config_host_mak fi From patchwork Mon Apr 19 14:54:26 2021 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: 424015 Delivered-To: patch@linaro.org Received: by 2002:a02:6a6f:0:0:0:0:0 with SMTP id m47csp2803541jaf; Mon, 19 Apr 2021 08:09:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzks1lew7WgE2meWrRdksKEJ9pRlsGgtv9KhFHK3Rmd5xAYR/hiUI/qY+A/7SgIUvH9takA X-Received: by 2002:a05:6602:179e:: with SMTP id y30mr15171052iox.130.1618844972065; Mon, 19 Apr 2021 08:09:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618844972; cv=none; d=google.com; s=arc-20160816; b=h3py85ULbcjI2r8Y3fGTWrabmVLd3tLCmmug4nJDEku8rNssr7SYkGLRLydfIEyS8X /HtIM7PsYF1az5kAAJVpChVTO9BoK3hnm5Yt/0F40E/neNhW4B9ejDYsmeA85yWkF4pA q0Zn3EyjNewmI9fuIOqQYRSnRm7GNDBLOXIkOg7hCtI+Em0V/1URRu0+rf2Ivj7FOel9 YGYi3JnPHGckXVwQEVZueyt4sNQ1fUgeDzwrSrEDof9Qtv/0hjY+SREX8U8+tBBSpA4E 0l1y+lGfERC8jQlTzEpu1JIKveJxevXSXyJBr5kqHEzI+p00OzFilmjOUnmmlXkUPEk0 4U0Q== 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=5YDOtSlMUf/IP5eUAnm6kbogOUWUkh0yRXFFH4wtVfw=; b=orJphLZOGB6CPxjXfkrPsZSiVNI7P20AgsEjbmXBNao+s1br/2XX0+1YQcyBzETIdu 9bv+4rpdAqELDEPlyBtEmxRbTQ/ZBGKNO+oR4V19mYOfpFy76k+9tsgzyvS+5ZAh1Tbc 7QWY9ZSWt+EvSqMDXi2/OuCYeQKKwdCjX4dFRS63zY4Nu5e/NIERsSRd6I2oK/GGI7km Yi/mw9gbLIpSM0qFb+gelRnDKBZDyhwbRl6kLfmQhVMeGc8CPbddTzhOTSSBxMci60tX HuS+SRJ+S0E2nNe1T1rdhWuorUe5E9vO0Agtw+jEUrFmJCiJdp2nngd+YINEAza5bkq4 /0qQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=WS5Pisyn; 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 r3si13015340jai.64.2021.04.19.08.09.32 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 19 Apr 2021 08:09:32 -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=WS5Pisyn; 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]:34976 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lYVWk-0004se-Aj for patch@linaro.org; Mon, 19 Apr 2021 11:09:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46614) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lYVQU-0004QL-Q5 for qemu-devel@nongnu.org; Mon, 19 Apr 2021 11:03:02 -0400 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]:45020) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lYVQH-0002wX-JT for qemu-devel@nongnu.org; Mon, 19 Apr 2021 11:03:02 -0400 Received: by mail-wr1-x42d.google.com with SMTP id e7so25431924wrs.11 for ; Mon, 19 Apr 2021 08:02:49 -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=5YDOtSlMUf/IP5eUAnm6kbogOUWUkh0yRXFFH4wtVfw=; b=WS5PisynVBsgLwTc3mwjJ472VC82hjJWaIz7OTfZeT8CouccAnPhzb6JybRlbhltOC b/HbmKtJ0abPdKZg+G8Fh449b4/aYjKEB6skztAtjPyzsQKDBBgiCgwkZGgKJRZWx9Ed 1+K/IvdX+BQdsStXNFYvSAJrhn78pxaCC/+9HZuHqpqkfbJHLSjvtqxdfePhR8LA6Pai 2o4ea2tuyF5TL9K2UUd2oaW8pQEHod/wRFTQuuXv2xI2jjGO40ghBYHGSM/Pqn7xmzsK v7Ab1E/98LebgtKREZCsbf6pfWSoUhwH5WXM6cKsiuDjENFV0HyJwexoHNHoR87I4Iga V2JA== 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=5YDOtSlMUf/IP5eUAnm6kbogOUWUkh0yRXFFH4wtVfw=; b=oylJWixD9kOl1/69LihxmImz2OxRB8jXbKDggFfzq6oqHxJf5oiZa6SpKfsiOFFakY B93Bijm8YqREUx+40xOFsyUAFY+QLZUB1l3oCXy5iPSCPPYXwNbtSS623WYzd++Efoec Y+pPrRKhQ0xsygV3If577V+L3YVr729MDq8Vn0DOkP2nC6PDmshwG4YpII08IxrHws8V pxp1MEDExUo5FCS3na6DZruG0/RKORiZff/AQj1G7Flwik4DtjWcAbe1zrZPlSXFaK4w bjfYScQj5ITc/lsvfA7Gn7kzJ5DZsjqGgYil3LH2R0Fgk22JM8xyA/RqaSa3dcK00kqV iWSw== X-Gm-Message-State: AOAM530Yl2ApRn9aTRAj2L0VtP6Lmz5j5ufcnJKwrNlC0hh+Hm2NJCdl nzNIgdJAWcRJbiRLN4AowcAHVg== X-Received: by 2002:a5d:628e:: with SMTP id k14mr15074808wru.150.1618844568266; Mon, 19 Apr 2021 08:02:48 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id h14sm27161678wrq.45.2021.04.19.08.02.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 08:02:44 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 2F0241FF9F; Mon, 19 Apr 2021 15:54:37 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 16/25] tests/tcg/tricore: Add macros to create tests and first test 'abs' Date: Mon, 19 Apr 2021 15:54:26 +0100 Message-Id: <20210419145435.14083-17-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210419145435.14083-1-alex.bennee@linaro.org> References: <20210419145435.14083-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-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=ham autolearn_force=no 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, Bastian Koppelmann , f4bug@amsat.org, stefanha@redhat.com, crosa@redhat.com, pbonzini@redhat.com, =?utf-8?q?Alex_Benn=C3=A9e?= , aurelien@aurel32.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Bastian Koppelmann This kind of tests is inspired by the riscv-tests repository. This adds macros that makes it easy to create single instruction self containing tests. It is achieved by macros that create a test sequence for an instruction and check for a supplied correct value. If the value is correct the next instruction is tested. Otherwise we jump to fail handler that writes is test number as a status code back to qemu that then exits on that status code. If all tests pass we write back 0 as a status code and exit. Reviewed-by: Alex Bennée Signed-off-by: Bastian Koppelmann Message-Id: <20210305170045.869437-7-kbastian@mail.uni-paderborn.de> [AJB: add container_hosts] Signed-off-by: Alex Bennée --- tests/tcg/tricore/macros.h | 53 +++++++++++++++++++++++ tests/tcg/configure.sh | 6 +++ tests/tcg/tricore/Makefile.softmmu-target | 2 + tests/tcg/tricore/test_abs.S | 7 +++ 4 files changed, 68 insertions(+) create mode 100644 tests/tcg/tricore/macros.h create mode 100644 tests/tcg/tricore/test_abs.S -- 2.20.1 diff --git a/tests/tcg/tricore/macros.h b/tests/tcg/tricore/macros.h new file mode 100644 index 0000000000..76c133132a --- /dev/null +++ b/tests/tcg/tricore/macros.h @@ -0,0 +1,53 @@ +/* Helpers */ +#define LI(reg, val) \ + mov.u reg, lo:val; \ + movh DREG_TEMP_LI, up:val; \ + or reg, reg, DREG_TEMP_LI; \ + +/* Address definitions */ +#define TESTDEV_ADDR 0xf0000000 +/* Register definitions */ +#define DREG_RS1 %d0 +#define DREG_CALC_RESULT %d1 +#define DREG_TEMP_LI %d10 +#define DREG_TEMP %d11 +#define DREG_TEST_NUM %d14 +#define DREG_CORRECT_RESULT %d15 + +#define DREG_DEV_ADDR %a15 + +/* Test case wrappers */ +#define TEST_CASE(num, testreg, correct, code...) \ +test_ ## num: \ + code; \ + LI(DREG_CORRECT_RESULT, correct) \ + mov DREG_TEST_NUM, num; \ + jne testreg, DREG_CORRECT_RESULT, fail \ + +/* Actual test case type + * e.g inst %dX, %dY -> TEST_D_D + * inst %dX, %dY, %dZ -> TEST_D_DD + * inst %eX, %dY, %dZ -> TEST_E_DD + */ +#define TEST_D_D(insn, num, result, rs1) \ + TEST_CASE(num, DREG_CALC_RESULT, result, \ + LI(DREG_RS1, rs1); \ + insn DREG_CALC_RESULT, DREG_RS1; \ + ) + +/* Pass/Fail handling part */ +#define TEST_PASSFAIL \ + j pass; \ +fail: \ + LI(DREG_TEMP, TESTDEV_ADDR) \ + mov.a DREG_DEV_ADDR, DREG_TEMP; \ + st.w [DREG_DEV_ADDR], DREG_TEST_NUM;\ + debug; \ + j fail; \ +pass: \ + LI(DREG_TEMP, TESTDEV_ADDR) \ + mov.a DREG_DEV_ADDR, DREG_TEMP; \ + mov DREG_TEST_NUM, 0; \ + st.w [DREG_DEV_ADDR], DREG_TEST_NUM;\ + debug; \ + j pass; diff --git a/tests/tcg/configure.sh b/tests/tcg/configure.sh index 9f304b6c5a..c04d9683ef 100755 --- a/tests/tcg/configure.sh +++ b/tests/tcg/configure.sh @@ -179,6 +179,12 @@ for target in $target_list; do container_image=debian-sparc64-cross container_cross_cc=sparc64-linux-gnu-gcc ;; + tricore-softmmu) + container_hosts=x86_64 + container_image=debian-tricore-cross + container_cross_as=tricore-as + container_cross_ld=tricore-ld + ;; x86_64-*) container_hosts="aarch64 ppc64el x86_64" container_image=debian-amd64-cross diff --git a/tests/tcg/tricore/Makefile.softmmu-target b/tests/tcg/tricore/Makefile.softmmu-target index d64a99b95f..3b048e49fa 100644 --- a/tests/tcg/tricore/Makefile.softmmu-target +++ b/tests/tcg/tricore/Makefile.softmmu-target @@ -3,6 +3,8 @@ TESTS_PATH = $(SRC_PATH)/tests/tcg/tricore LDFLAGS = -T$(TESTS_PATH)/link.ld ASFLAGS = +TESTS += test_abs.tst + QEMU_OPTS += -M tricore_testboard -nographic -kernel %.pS: $(TESTS_PATH)/%.S diff --git a/tests/tcg/tricore/test_abs.S b/tests/tcg/tricore/test_abs.S new file mode 100644 index 0000000000..e42240159a --- /dev/null +++ b/tests/tcg/tricore/test_abs.S @@ -0,0 +1,7 @@ +#include "macros.h" +.text +.global _start +_start: + TEST_D_D(abs, 1, 0, 0) + + TEST_PASSFAIL From patchwork Mon Apr 19 14:54:27 2021 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: 424019 Delivered-To: patch@linaro.org Received: by 2002:a02:6a6f:0:0:0:0:0 with SMTP id m47csp2806312jaf; Mon, 19 Apr 2021 08:12:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzgu8rgQUC1Fw1ZNjM1lbCcKC4z7EPBanGTY5axXtQOC3ySizIfMCIBuhA0No9uRQfpjCbt X-Received: by 2002:a02:c908:: with SMTP id t8mr17227342jao.78.1618845151472; Mon, 19 Apr 2021 08:12:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618845151; cv=none; d=google.com; s=arc-20160816; b=nosTcg0sUoj8NCwDIw9hMrmlFG3RIzAbDRDmpqiTxzLLii/fw6HU36Se08XEpCVsK0 K0mC/wUiB3sXabY2Pi11cYmGC3jiUDWBQSww8Ed0qXOWcEvC5YBAafQhjXmrcOxGbb9r meAgIStVVrIVaiCRmntne6Mavl7hIy1vqSuns7tZB9sdAWYKOgkJKTfW7hgfvF03sPRY fxlI40lfQ0tJAxTo+Xh0zcqAH1+Ii9LEajhBc6eqUPOHcShJSYUVGtDua+YpwI1Y9/cu Y628Vs0q35wMDzV07XP62YV2RQI0/FSThR7cnERafHG1Bq1fNnMCTHNPdzgG+QTBuOGQ CFpA== 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=VIg7qw3G3Wf81cGSwkWP+w1Bj/vvGUaYloDj5g7DKuk=; b=oY/mVZEGUeJIz4gTJ6+WRIgXEyuqYj1IOVR9DCN8s96M7BnEqjTjv/YLRG047VGoPe zc2HkhMq8mAE/NPjcpN0VO/oPRn/ymiZSH/Fz9R+QTocZF2JDZvV8AgZQJMSHvJWvr5U aP4R8XKCDszDXXoJu5twG2sPDfmyXtVeiBffwCTQDOXAHjrS2ElUji7BRtgJ+zC7FhAu OgUweKZSKjZ7TJIkrFtuWuUlwQGsLfnP61l9zI4v9p7JlAdunXFvlQIGTVspVxl/SLuQ iJcq8njKWdgcbCdTYwshYHvf0G9wtJySXQbCb70ceBp6eJOcc/ZzXfUd/vlnwk3ZkZ4w gHhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=He7q4Lde; 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 k7si14883074ili.130.2021.04.19.08.12.31 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 19 Apr 2021 08:12:31 -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=He7q4Lde; 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]:44838 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lYVZe-0000Z3-T3 for patch@linaro.org; Mon, 19 Apr 2021 11:12:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46460) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lYVQ9-0004Bg-2F for qemu-devel@nongnu.org; Mon, 19 Apr 2021 11:02:41 -0400 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]:40893) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lYVQ7-0002qX-5J for qemu-devel@nongnu.org; Mon, 19 Apr 2021 11:02:40 -0400 Received: by mail-wr1-x42a.google.com with SMTP id e5so5741892wrg.7 for ; Mon, 19 Apr 2021 08:02:38 -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=VIg7qw3G3Wf81cGSwkWP+w1Bj/vvGUaYloDj5g7DKuk=; b=He7q4LdeC6t+6lmvBoubDAz9aPaShQlAQO2H385DxtsH4Drmv5SPt+fWPG5nONvgeF DMIpS+3OmJw9wi+eBJ9mdtRfgAdpQHhTq8yXUYAlT7Oi1hZ1WwDEKNbdzlLL4xZTLxmH i+JkbJFZ+eXfQTFY2yV424aLZz8Zv2G4GbCjK54mbjrwxIyYqgEMOGMHQC1m1i3gJA2j EgG3eUMSVn3n4bgTJyQhIo37xnVxCjy75h2LkkMzzFgH9+FVowHkZz1Sc7XJbgu0tJ8B V+mQWcUgV3Dwox9Q1SMdNm9u561jJCzUTIqFm60AvVJXNdvm8GTs9Q5LPRXvq8+blwyn mdWQ== 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=VIg7qw3G3Wf81cGSwkWP+w1Bj/vvGUaYloDj5g7DKuk=; b=b+xOMaqsc6btUbrpdqYPKgr+nFVFBASvk4/xioNqQGeoh2fvbs++fAp8Os3caxhSXe y5+dazcMSzQqH2Zx0ImZxsbdfRGRS16f0pynZfIAw2ToZSFzyKd2t8yMtIhFSIXIDGg5 7DdRH8aFzsslWsjbc1q92GBoBEtNFEO7cp7orFzhpTmtOJuCbzLKpFcWiFoDtraCg13D KL6lCoDxNR2JcFK/hK0ehV9kSnVWIH3nLeKfxvs1L7tYFzIl83uzTuOtgw24J5S6+JDc AHbUWwhEkVkdqW8wmYIHJhn72e1BxxSst9YH3VETSxnJPejDfafv2ufM4Drw5OaIwOIu d64Q== X-Gm-Message-State: AOAM5318rxmqqHf2ZZEJ2B/Sux0bEB+vAH1dwTRagCQX55RghQ4EWYH2 muv+Cx61f4sBx4vDbdA+LVe8IA== X-Received: by 2002:a5d:6607:: with SMTP id n7mr15551902wru.146.1618844557494; Mon, 19 Apr 2021 08:02:37 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id g13sm26830772wrr.9.2021.04.19.08.02.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 08:02:36 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 495E61FFA5; Mon, 19 Apr 2021 15:54:37 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 17/25] tests/tcg/tricore: Add bmerge test Date: Mon, 19 Apr 2021 15:54:27 +0100 Message-Id: <20210419145435.14083-18-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210419145435.14083-1-alex.bennee@linaro.org> References: <20210419145435.14083-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-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=ham autolearn_force=no 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, Bastian Koppelmann , f4bug@amsat.org, stefanha@redhat.com, crosa@redhat.com, pbonzini@redhat.com, =?utf-8?q?Alex_Benn=C3=A9e?= , aurelien@aurel32.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Bastian Koppelmann Tested-by: Alex Bennée Signed-off-by: Bastian Koppelmann Signed-off-by: Alex Bennée Message-Id: <20210305170045.869437-8-kbastian@mail.uni-paderborn.de> --- tests/tcg/tricore/macros.h | 24 +++++++++++++++++++++++ tests/tcg/tricore/Makefile.softmmu-target | 1 + tests/tcg/tricore/test_bmerge.S | 8 ++++++++ 3 files changed, 33 insertions(+) create mode 100644 tests/tcg/tricore/test_bmerge.S -- 2.20.1 diff --git a/tests/tcg/tricore/macros.h b/tests/tcg/tricore/macros.h index 76c133132a..52aa936c56 100644 --- a/tests/tcg/tricore/macros.h +++ b/tests/tcg/tricore/macros.h @@ -8,7 +8,10 @@ #define TESTDEV_ADDR 0xf0000000 /* Register definitions */ #define DREG_RS1 %d0 +#define DREG_RS2 %d1 #define DREG_CALC_RESULT %d1 +#define DREG_CALC_PSW %d2 +#define DREG_CORRECT_PSW %d3 #define DREG_TEMP_LI %d10 #define DREG_TEMP %d11 #define DREG_TEST_NUM %d14 @@ -24,6 +27,17 @@ test_ ## num: \ mov DREG_TEST_NUM, num; \ jne testreg, DREG_CORRECT_RESULT, fail \ +#define TEST_CASE_PSW(num, testreg, correct, correct_psw, code...) \ +test_ ## num: \ + code; \ + LI(DREG_CORRECT_RESULT, correct) \ + mov DREG_TEST_NUM, num; \ + jne testreg, DREG_CORRECT_RESULT, fail; \ + mfcr DREG_CALC_PSW, $psw; \ + LI(DREG_CORRECT_PSW, correct_psw) \ + mov DREG_TEST_NUM, num; \ + jne DREG_CALC_PSW, DREG_CORRECT_PSW, fail; + /* Actual test case type * e.g inst %dX, %dY -> TEST_D_D * inst %dX, %dY, %dZ -> TEST_D_DD @@ -35,6 +49,16 @@ test_ ## num: \ insn DREG_CALC_RESULT, DREG_RS1; \ ) +#define TEST_D_DD_PSW(insn, num, result, psw, rs1, rs2) \ + TEST_CASE_PSW(num, DREG_CALC_RESULT, result, psw, \ + LI(DREG_RS1, rs1); \ + LI(DREG_RS2, rs2); \ + rstv; \ + insn DREG_CALC_RESULT, DREG_RS1, DREG_RS2; \ + ) + + + /* Pass/Fail handling part */ #define TEST_PASSFAIL \ j pass; \ diff --git a/tests/tcg/tricore/Makefile.softmmu-target b/tests/tcg/tricore/Makefile.softmmu-target index 3b048e49fa..de6a2cc88e 100644 --- a/tests/tcg/tricore/Makefile.softmmu-target +++ b/tests/tcg/tricore/Makefile.softmmu-target @@ -4,6 +4,7 @@ LDFLAGS = -T$(TESTS_PATH)/link.ld ASFLAGS = TESTS += test_abs.tst +TESTS += test_bmerge.tst QEMU_OPTS += -M tricore_testboard -nographic -kernel diff --git a/tests/tcg/tricore/test_bmerge.S b/tests/tcg/tricore/test_bmerge.S new file mode 100644 index 0000000000..8a0fa6d3f6 --- /dev/null +++ b/tests/tcg/tricore/test_bmerge.S @@ -0,0 +1,8 @@ +#include "macros.h" +.text +.global _start +_start: + TEST_D_DD_PSW(bmerge, 1, 0x555557f7, 0x00000b80, 0x0000001d, 0x0000ffff) + + TEST_PASSFAIL + From patchwork Mon Apr 19 14:54:28 2021 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: 424016 Delivered-To: patch@linaro.org Received: by 2002:a02:6a6f:0:0:0:0:0 with SMTP id m47csp2804794jaf; Mon, 19 Apr 2021 08:10:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxH/Q3HUq9qsK2sbwJYKTPPlTCGqcDrUx037dmszBGR6w9bp8pM9OsAWQG0sLa7Z3k85EVd X-Received: by 2002:a05:6602:1c9:: with SMTP id w9mr9322768iot.8.1618845056018; Mon, 19 Apr 2021 08:10:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618845056; cv=none; d=google.com; s=arc-20160816; b=LTThtQ/4Leg/yW0wgjX6PswL3CQUlSRnWh0ERK7MiE0CFG9SDdt1QIGVBOkIMxqmiD D4vBeoP2kl2SV4JKeR1Ivxg9PulK+82wFjZoGVzc5GafWz9MG7KqheaxQ6lLR5eZ7g6C JRzzeesyp6YltUH4F0BV9JOCuLzNP3iSCb5veprDiJy0Dhu+VPB761RHyfuvBLWeABIt JAv7S2LkJZtOYLLzwk0XSRDlmrPSmXSvxlWbND/ofu4I73pSFVU7eT8/U6UQ70dNJwaf 0p67pqmSYFSitdgOgLimeXHRkmfrbgkMFnhbIxfDN7aZhZ3lPw6IFuYboQIOCVUqH1yQ Z3Iw== 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=GHKNBBiZA4Z2Blb5bvuoo5BRzsS+50ZHmKEEPviANKA=; b=oZ7u57Yko2CR6OTohgIBZ51bvhLR7YYEgZ8h7FakHntDiQ0KZ4UNZD/wsuP6iLlVdm cUAQ9O4s5otpcqEKwo3vCWqppbxzf2Bp4yh+v02nnHQIhnYl6gfq0g1XIwRVm99ZCjja 2MrWCA246FLgiVgizuKHdR7P+tyDq14wqXZ3j58SrVko3HdJRe4wcQeGDC1eDU6XmUzj /F0BTfd8KrIsVXroJymCZ4DMtZE8JcoUjgYHYTr7JCShRPOD8kESPQDVfYxYvqzrIe5t k0hnivAxsjdWb2xCR7wq+GTmzJL3PJ/dygo8b86APuWOWKYadWvGWGOqzxHSz3xFYEKO NlzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=izUhUH+2; 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 w13si8552861ioj.33.2021.04.19.08.10.55 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 19 Apr 2021 08:10:56 -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=izUhUH+2; 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]:35990 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lYVY7-0005LI-Aw for patch@linaro.org; Mon, 19 Apr 2021 11:10:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46462) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lYVQ9-0004D7-Nx for qemu-devel@nongnu.org; Mon, 19 Apr 2021 11:02:45 -0400 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]:36469) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lYVQ7-0002rR-OU for qemu-devel@nongnu.org; Mon, 19 Apr 2021 11:02:41 -0400 Received: by mail-wm1-x334.google.com with SMTP id o9-20020a1c41090000b029012c8dac9d47so11383235wma.1 for ; Mon, 19 Apr 2021 08:02:39 -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=GHKNBBiZA4Z2Blb5bvuoo5BRzsS+50ZHmKEEPviANKA=; b=izUhUH+2X5HWYJjoEp+c8xoWOpSGhmJS0MorHwuGzeSc3OJIdzjFe/E8Fh105DZWsh sijLxnO+1pGgPOlJqstWsRk9rp2Ms/dReIb8UYlgTwCSVy9ebZQc98VhN0VgXYAVCbgA M4a1VrShQpn+vq7krUxZMJHQYb+cpkHGLRc0yNicU9ybU/ihKxvt3CqCGjae2K/zhwuJ +Ld/FcrJFDM+UViqyYvBzrsaTeOwOmPpwKllQy4FC7mzMpL/2uHKBvhNXLMfpNjBIC3T +Hjdftu57Itr+5+p4WgFWzIZCKOPsO5zdS/oRb4CMFrthay+hmLN0pS3f5fVGUh+3AmR oiFA== 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=GHKNBBiZA4Z2Blb5bvuoo5BRzsS+50ZHmKEEPviANKA=; b=WOsyST141hxX8XDGSLSPtGMZfVeIutmi/+JJVghJePrHHvaqEqxbL9KuXcL3cVhWyt WtAFEw9VnVwx9eyjMUgqWBMYtBd0vVtDdDj6bseoRZNGT1xp/rMsoujVd5czqaqiR2v3 QVlQNCTD0RJbk3KzuUXetjtjhmy/afKSczhFOPj4adZtdP24y1yadgR+e5DlKJmMiS89 SezyDwkdGE/7yeKg9Rh5DujTFyP2EnNhsVw4Up37LP8eoAlg8FlO/G2VoALhmsCZlPaX CKMjnAff2r3Y2cZjzP8P4PhqzVZSHQ3CGuIfe5uPkEYGcG+sY7MdHTFRP9HNjj9i8Mi+ TIdA== X-Gm-Message-State: AOAM532P6nPJz9nK/F1AzHoxP0BUNjZTP7y/LN2cAlYx5Zw7E12xlR58 x6BLVqQdaI4RGXmRR+Lm9Uiltg== X-Received: by 2002:a05:600c:4f15:: with SMTP id l21mr4355745wmq.34.1618844558391; Mon, 19 Apr 2021 08:02:38 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id o17sm3809497wrg.80.2021.04.19.08.02.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 08:02:36 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 61A441FF7E; Mon, 19 Apr 2021 15:54:37 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 18/25] tests/tcg/tricore: Add clz test Date: Mon, 19 Apr 2021 15:54:28 +0100 Message-Id: <20210419145435.14083-19-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210419145435.14083-1-alex.bennee@linaro.org> References: <20210419145435.14083-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x334.google.com 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=ham autolearn_force=no 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, Bastian Koppelmann , f4bug@amsat.org, stefanha@redhat.com, crosa@redhat.com, pbonzini@redhat.com, =?utf-8?q?Alex_Benn=C3=A9e?= , aurelien@aurel32.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Bastian Koppelmann Tested-by: Alex Bennée Signed-off-by: Bastian Koppelmann Signed-off-by: Alex Bennée Message-Id: <20210305170045.869437-9-kbastian@mail.uni-paderborn.de> --- tests/tcg/tricore/Makefile.softmmu-target | 1 + tests/tcg/tricore/Makefile.softmmu-target.orig | 18 ++++++++++++++++++ tests/tcg/tricore/test_clz.S | 9 +++++++++ 3 files changed, 28 insertions(+) create mode 100644 tests/tcg/tricore/Makefile.softmmu-target.orig create mode 100644 tests/tcg/tricore/test_clz.S -- 2.20.1 diff --git a/tests/tcg/tricore/Makefile.softmmu-target b/tests/tcg/tricore/Makefile.softmmu-target index de6a2cc88e..a9b81545e2 100644 --- a/tests/tcg/tricore/Makefile.softmmu-target +++ b/tests/tcg/tricore/Makefile.softmmu-target @@ -5,6 +5,7 @@ ASFLAGS = TESTS += test_abs.tst TESTS += test_bmerge.tst +TESTS += test_clz.tst QEMU_OPTS += -M tricore_testboard -nographic -kernel diff --git a/tests/tcg/tricore/Makefile.softmmu-target.orig b/tests/tcg/tricore/Makefile.softmmu-target.orig new file mode 100644 index 0000000000..de6a2cc88e --- /dev/null +++ b/tests/tcg/tricore/Makefile.softmmu-target.orig @@ -0,0 +1,18 @@ +TESTS_PATH = $(SRC_PATH)/tests/tcg/tricore + +LDFLAGS = -T$(TESTS_PATH)/link.ld +ASFLAGS = + +TESTS += test_abs.tst +TESTS += test_bmerge.tst + +QEMU_OPTS += -M tricore_testboard -nographic -kernel + +%.pS: $(TESTS_PATH)/%.S + $(HOST_CC) -E -o $@ $< + +%.o: %.pS + $(AS) $(ASFLAGS) -o $@ $< + +%.tst: %.o + $(LD) $(LDFLAGS) $< -o $@ diff --git a/tests/tcg/tricore/test_clz.S b/tests/tcg/tricore/test_clz.S new file mode 100644 index 0000000000..e03835f123 --- /dev/null +++ b/tests/tcg/tricore/test_clz.S @@ -0,0 +1,9 @@ +#include "macros.h" +.text +.global _start +_start: + TEST_D_D(cls.h, 1, 0x0, 0x6db17976) + TEST_D_D(cls.h, 2, 0x000f000f, 0x0) + + TEST_PASSFAIL + From patchwork Mon Apr 19 14:54:29 2021 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: 424018 Delivered-To: patch@linaro.org Received: by 2002:a02:6a6f:0:0:0:0:0 with SMTP id m47csp2806204jaf; Mon, 19 Apr 2021 08:12:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwrUlpIKL9WsRLnzOShNKu5Z1uXRVho4COJQAEy9t3JfuJtd6DCeNr22Z/lU0dts41agUbR X-Received: by 2002:a92:c7a2:: with SMTP id f2mr18796145ilk.190.1618845146660; Mon, 19 Apr 2021 08:12:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618845146; cv=none; d=google.com; s=arc-20160816; b=jFR0WZ+GCeKZW6KTClr6SnPtRjr2EnNAgwrknx/Wie7lzWDrl0cXyfkE4yvhOIu7kD ySl0cM/ylfqd8A8qQvdaVq2xbvUWRSmhTNBpbw1kaXJKAJSZwffjX8mYk/PveO6t1VDr JcflsPnPMszO6KPCNNqVtezCdJQCryRanz0grCpQHgn5T4X3FAcGtGNYSPSDBKuTgDSY WslYCxWQ7LoPBLy/O4wkC8gXkwU4uIISTqyxWQmOCyNzXbRKoq3IPzpl6XEzB9Fo379s c0U6Y4X6DvcWRyfH/f/Riz15IMClszjYWwLWpk6Xb9lSaSzz5RotSyZAL/JkG8wOVAQZ MZmA== 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=msEx9ljlWhDf1/vW/dw/1Ljno8pnteuQokqwLzYCJNA=; b=ijQSPDpXUT9KTvb23ayiwLSHyhJDGDjIq9qAIjlV13j8kJTLIbv3YJi/SH6oDqdRQ1 CekfCWWOkCA3tobSHm6M2s6SGaf0aqkNzdZxsl4Vg1f1dSq+MF9tInOmdSiws6rM95OV zdbxHgDPKOtQh1GF+o8mNPqedErSE+lwNa0FANl2A7DqshkMOnctEzx1oGg+KMJjefdm Cu3Flo7WNuNq/Bm+qVr2fJjn684Xf6lRdm9A6vLFuHDegDcI4ulDGteTJ2LaYWH/ChiZ OWLy/XqjMdj8RljTn1LPkoROSwuzfDLBQgb3Ori77gz+8Q/bCrVkVR8RwsDFYoWx6iBY VS5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=IpLd9meR; 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 j2si3424032ioj.71.2021.04.19.08.12.26 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 19 Apr 2021 08:12:26 -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=IpLd9meR; 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]:44418 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lYVZa-0000Of-33 for patch@linaro.org; Mon, 19 Apr 2021 11:12:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46574) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lYVQL-0004Kb-Sf for qemu-devel@nongnu.org; Mon, 19 Apr 2021 11:02:54 -0400 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]:40894) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lYVQG-0002vB-06 for qemu-devel@nongnu.org; Mon, 19 Apr 2021 11:02:53 -0400 Received: by mail-wr1-x429.google.com with SMTP id e5so5742790wrg.7 for ; Mon, 19 Apr 2021 08:02:47 -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=msEx9ljlWhDf1/vW/dw/1Ljno8pnteuQokqwLzYCJNA=; b=IpLd9meRf9w6v1P5LtqUJs9g/+u9/g55yG3QeivpTfD38R8eetqZCxmgtVbzKUgG2C ITAUvZiX2il3VJQ+3JJjIMaGiPyvGAwtSPnVRzyU5k+sjK/mFcYZlPx/0LU43yE8bzs5 lAkQz8nSkksn+ZAlDezNQYdWlojEGYO/N1LqR8C8q3FAEi9tHafi+i5URahj/blR1Oe8 pAQqMxX82MRvNSCbjtuAdvfarr4JGaJqoW/++nE8v2SZoB0uHXUyszJAzDbwf5YOXohR KUHXlcUMeq0z7Dr790JXhc0fAubH4pLHYNweA4Qk353fJowq02Nsn1WbDKihvW0JxKxB cNdg== 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=msEx9ljlWhDf1/vW/dw/1Ljno8pnteuQokqwLzYCJNA=; b=uQMUqnriKm1cs1KVz5gcWH6+Vyb4wjIwhxuKelZ+Z/Gu/8X3eUYm4PhPpBnZjC42dZ TEIRe+YuPbtLyx6phXWU3GLFqRk8U9w7omyuzj+/pgMw1Y8KPfZmht9cU6zumJy62do0 VJ3MMeMhAskRW5NlY64rvOYCW4sSDeTDkEw5TUCGjzrvU44Ofk6ULcops9y7pj5DGf4f NZvxgAdsrjFeh2djfh7f+NPIevWWVY/QkeJNvyjWI5WSon2mOqlRqVgmOyW++V+Zfv1O 2unuJSC/HCnUbZTSctNZgfMMMGp2ewTCQ/MvpI8cJUHjXemPGBS2emVZnvXPJ3EDxp3B djsw== X-Gm-Message-State: AOAM533HMVsbD7Z3qiDcnHTCHfTkuqo4CeGlSSifNUdm/MKM5sZDUa3C odGk2U1IuFbNlAZGLmoK2DbOOw== X-Received: by 2002:adf:9d88:: with SMTP id p8mr6827005wre.138.1618844566516; Mon, 19 Apr 2021 08:02:46 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id 24sm22309029wmk.18.2021.04.19.08.02.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 08:02:44 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 7D6ED1FFA6; Mon, 19 Apr 2021 15:54:37 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 19/25] tests/tcg/tricore: Add dvstep test Date: Mon, 19 Apr 2021 15:54:29 +0100 Message-Id: <20210419145435.14083-20-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210419145435.14083-1-alex.bennee@linaro.org> References: <20210419145435.14083-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::429; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x429.google.com 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=ham autolearn_force=no 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, Bastian Koppelmann , f4bug@amsat.org, stefanha@redhat.com, crosa@redhat.com, pbonzini@redhat.com, =?utf-8?q?Alex_Benn=C3=A9e?= , aurelien@aurel32.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Bastian Koppelmann Tested-by: Alex Bennée Signed-off-by: Bastian Koppelmann Signed-off-by: Alex Bennée Message-Id: <20210305170045.869437-10-kbastian@mail.uni-paderborn.de> --- tests/tcg/tricore/macros.h | 29 ++++++++++++++++++- tests/tcg/tricore/Makefile.softmmu-target | 1 + .../tcg/tricore/Makefile.softmmu-target.orig | 1 + tests/tcg/tricore/test_dvstep.S | 15 ++++++++++ 4 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 tests/tcg/tricore/test_dvstep.S -- 2.20.1 diff --git a/tests/tcg/tricore/macros.h b/tests/tcg/tricore/macros.h index 52aa936c56..59b4b9a352 100644 --- a/tests/tcg/tricore/macros.h +++ b/tests/tcg/tricore/macros.h @@ -19,6 +19,18 @@ #define DREG_DEV_ADDR %a15 +#define EREG_RS1 %e6 +#define EREG_RS1_LO %d6 +#define EREG_RS1_HI %d7 +#define EREG_RS2 %e8 +#define EREG_RS2_LO %d8 +#define EREG_RS2_HI %d9 +#define EREG_CALC_RESULT %e8 +#define EREG_CALC_RESULT_HI %d9 +#define EREG_CALC_RESULT_LO %d8 +#define EREG_CORRECT_RESULT_LO %d0 +#define EREG_CORRECT_RESULT_HI %d1 + /* Test case wrappers */ #define TEST_CASE(num, testreg, correct, code...) \ test_ ## num: \ @@ -27,6 +39,15 @@ test_ ## num: \ mov DREG_TEST_NUM, num; \ jne testreg, DREG_CORRECT_RESULT, fail \ +#define TEST_CASE_E(num, correct_lo, correct_hi, code...) \ +test_ ## num: \ + code; \ + mov DREG_TEST_NUM, num; \ + LI(EREG_CORRECT_RESULT_LO, correct_lo) \ + jne EREG_CALC_RESULT_LO, EREG_CORRECT_RESULT_LO, fail; \ + LI(EREG_CORRECT_RESULT_HI, correct_hi) \ + jne EREG_CALC_RESULT_HI, EREG_CORRECT_RESULT_HI, fail; + #define TEST_CASE_PSW(num, testreg, correct, correct_psw, code...) \ test_ ## num: \ code; \ @@ -57,7 +78,13 @@ test_ ## num: \ insn DREG_CALC_RESULT, DREG_RS1, DREG_RS2; \ ) - +#define TEST_E_ED(insn, num, res_hi, res_lo, rs1_hi, rs1_lo, rs2) \ + TEST_CASE_E(num, res_lo, res_hi, \ + LI(EREG_RS1_LO, rs1_lo); \ + LI(EREG_RS1_HI, rs1_hi); \ + LI(DREG_RS2, rs2); \ + insn EREG_CALC_RESULT, EREG_RS1, DREG_RS2; \ + ) /* Pass/Fail handling part */ #define TEST_PASSFAIL \ diff --git a/tests/tcg/tricore/Makefile.softmmu-target b/tests/tcg/tricore/Makefile.softmmu-target index a9b81545e2..799b51191e 100644 --- a/tests/tcg/tricore/Makefile.softmmu-target +++ b/tests/tcg/tricore/Makefile.softmmu-target @@ -6,6 +6,7 @@ ASFLAGS = TESTS += test_abs.tst TESTS += test_bmerge.tst TESTS += test_clz.tst +TESTS += test_dvstep.tst QEMU_OPTS += -M tricore_testboard -nographic -kernel diff --git a/tests/tcg/tricore/Makefile.softmmu-target.orig b/tests/tcg/tricore/Makefile.softmmu-target.orig index de6a2cc88e..a9b81545e2 100644 --- a/tests/tcg/tricore/Makefile.softmmu-target.orig +++ b/tests/tcg/tricore/Makefile.softmmu-target.orig @@ -5,6 +5,7 @@ ASFLAGS = TESTS += test_abs.tst TESTS += test_bmerge.tst +TESTS += test_clz.tst QEMU_OPTS += -M tricore_testboard -nographic -kernel diff --git a/tests/tcg/tricore/test_dvstep.S b/tests/tcg/tricore/test_dvstep.S new file mode 100644 index 0000000000..858dbc62dd --- /dev/null +++ b/tests/tcg/tricore/test_dvstep.S @@ -0,0 +1,15 @@ +#include "macros.h" +.text +.global _start +_start: + # Result RS1 RS2 + TEST_E_ED(dvstep, 1, 0x000001ff, 0xfffe5cff, 0x00000001, 0xfffffe5c, 0x0) + TEST_E_ED(dvstep, 2, 0x00000000, 0x000000ff, 0x00000000, 0x00000000, 0x0) + TEST_E_ED(dvstep, 3, 0x0000f000, 0x000000fd, 0x010000f0, 0x00000000, 0x0) + TEST_E_ED(dvstep, 4, 0xfffff000, 0x00000000, 0x7ffffff0, 0x00000000, 0x0) + TEST_E_ED(dvstep.u, 5, 0xffffff00, 0x100008ff, 0xffffffff, 0x00100008, 0x0) + TEST_E_ED(dvstep.u, 6, 0x00000100, 0x00000000, 0x08000001, 0x00000000, \ + 0xffffff2d) + + TEST_PASSFAIL + From patchwork Mon Apr 19 14:54:30 2021 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: 424014 Delivered-To: patch@linaro.org Received: by 2002:a02:6a6f:0:0:0:0:0 with SMTP id m47csp2802735jaf; Mon, 19 Apr 2021 08:08:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxViXEfS8p8GwqC/H13rC38Hcs9UxUWS6qD3vnXsJWNSkw5bQKvVOkewxKLTbyN1uoox08K X-Received: by 2002:a92:d48c:: with SMTP id p12mr18815642ilg.136.1618844916850; Mon, 19 Apr 2021 08:08:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618844916; cv=none; d=google.com; s=arc-20160816; b=uugYMLiANhk67U8r5cTt8ZIUXm43WvN+v7aqUtPs+ay+6/EImwXIoL/5F6VBDXFzOR y5cMVlWpepiBWkrOtcp6z9FTqtBZpTmDcdoaw1t4iLOdpyAYaAZbvt9suJnluA1eHyqv wGwqD8yWYUEMkY3baIzbFD4nnP62b+mxCDa2MmYbVBISYbcDY4vjuWoG8aEqtHFmbUZq uD1HP2gjWD6jHuzuqwsQ0hdMFj5dF+Fkx3KIj57rWcwDl5Xe1ME/GJZtQRbuc40l9hCb 6A54TE6R98itOE/rz6Ds/G2Jqs+erXwc8PXi4lNY7GgY5UOcKLNKS74QmeO+NkhSVQ+S TimA== 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=np1gaZVZhTNvKxm8FNo3UyxZzlTNbaBL/YyqUBHfOqM=; b=M+zxLNwcmnp645JTcWLDr9P7lwt7gbhLAUQVDieArKnDzJGGysdi0vVGXommjkNpDm Rufk1kHpdALQavdjn7MXFxmnjfE1A/dpQ69Gso/1x9KcQ++ZOoy3qLYWnojtf+zon4/4 ZJQ0n6KsaMHbmigurTBsoYfmDbyS7UjsJtZ/Pghw9cVedZtF5DcnJ4o48QtkVtCDt/OL yOVZVqvqJ/R35QKsutpXM9ebwe6e7/mA7NXa1l2BE1wXIYA9aX6YCoo7dwZy/G1vaRA6 aoRQ+hAOydyQsjgTZoexnTJBmqGY4eo8K3vjAAZk8OGJXC8BGwb/OChI/3XmDrhhYVfK lhbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=SxQkKmej; 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 e19si16496409iob.40.2021.04.19.08.08.36 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 19 Apr 2021 08:08:36 -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=SxQkKmej; 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]:60326 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lYVVs-0003fS-AI for patch@linaro.org; Mon, 19 Apr 2021 11:08:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46584) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lYVQR-0004N5-P5 for qemu-devel@nongnu.org; Mon, 19 Apr 2021 11:03:00 -0400 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]:40670) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lYVQA-0002sm-Mp for qemu-devel@nongnu.org; Mon, 19 Apr 2021 11:02:59 -0400 Received: by mail-wm1-x331.google.com with SMTP id y124-20020a1c32820000b029010c93864955so20764863wmy.5 for ; Mon, 19 Apr 2021 08:02:42 -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=np1gaZVZhTNvKxm8FNo3UyxZzlTNbaBL/YyqUBHfOqM=; b=SxQkKmejjrh82xAAnnveYZbNZp2etX6wmRTgjfujuuYpKU6bM7RJewQlYnvrQbuoIu x+t0f3JnATfhUjc5eBev8A1CcC8QGhI9A3wezovENS90ZgFMCv42IJQjeFZ5j01zo3zu xqE2YZbIbf3gdAcsgQq4UV1+F+mEkuP3apPWigWerFbJtLnSfHs2G0oLh2t/iiWlnlY0 TdmRXMr0WBQ5y1DpTgsVt2zb4ych0LLUFvhiWJgLTAAt6y5eydB2DZPtRnoRFiTvmH47 XR8ULJmfBcUNgn9KTlcsQ89hFXmGCespSsL14oHdGgPjE20cc/r15ovsUEbwb+8KZFW2 sDew== 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=np1gaZVZhTNvKxm8FNo3UyxZzlTNbaBL/YyqUBHfOqM=; b=MKt0GXtY2+Rb9SGnqTumggWvmYkB8pmtIYmDu16sLbu75ESax3MT0cehJjZ9q3hsjs voi4LCR8GqUTTtMHYDLZPlEraVW43Axi5OGfRjrRCD49ePNH3C7nM4mNnujF5lBwjywd usxfAT4l4kv7jbSlZT99gdstoYd+n6LU3xMHdkD891Nl3u7CjZr/7GMUUIISrbGhV2Ca +3rKmphvPxWwb8nucBA6FHtQ1wOPPMDSKB7yFb+kOnLgOmMOpkiW5/yqa+8KYu9NU2Z0 ks1d1Nkj4GHBxn93PLsX96jjiv7eutsLGoUkgtZHoJdT9ae3S0ayiojVnm+Oo2yDqne1 TMKQ== X-Gm-Message-State: AOAM533VLQ/QAD2vAodaLfzDJCnCHlOSeNAAvKjkFMSbWpYPdvf07IJR KANt6au0X9Ya6kCflNivAImraw== X-Received: by 2002:a05:600c:4f54:: with SMTP id m20mr21632058wmq.58.1618844561317; Mon, 19 Apr 2021 08:02:41 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id i4sm24076195wrx.56.2021.04.19.08.02.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 08:02:36 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 9573C1FFA9; Mon, 19 Apr 2021 15:54:37 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 20/25] tests/tcg/tricore: Add fadd test Date: Mon, 19 Apr 2021 15:54:30 +0100 Message-Id: <20210419145435.14083-21-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210419145435.14083-1-alex.bennee@linaro.org> References: <20210419145435.14083-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-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=ham autolearn_force=no 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, Bastian Koppelmann , f4bug@amsat.org, stefanha@redhat.com, crosa@redhat.com, pbonzini@redhat.com, =?utf-8?q?Alex_Benn=C3=A9e?= , aurelien@aurel32.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Bastian Koppelmann Tested-by: Alex Bennée Signed-off-by: Bastian Koppelmann Signed-off-by: Alex Bennée Message-Id: <20210305170045.869437-11-kbastian@mail.uni-paderborn.de> --- tests/tcg/tricore/Makefile.softmmu-target | 1 + tests/tcg/tricore/Makefile.softmmu-target.orig | 1 + tests/tcg/tricore/test_fadd.S | 16 ++++++++++++++++ 3 files changed, 18 insertions(+) create mode 100644 tests/tcg/tricore/test_fadd.S -- 2.20.1 diff --git a/tests/tcg/tricore/Makefile.softmmu-target b/tests/tcg/tricore/Makefile.softmmu-target index 799b51191e..e7adb16af9 100644 --- a/tests/tcg/tricore/Makefile.softmmu-target +++ b/tests/tcg/tricore/Makefile.softmmu-target @@ -7,6 +7,7 @@ TESTS += test_abs.tst TESTS += test_bmerge.tst TESTS += test_clz.tst TESTS += test_dvstep.tst +TESTS += test_fadd.tst QEMU_OPTS += -M tricore_testboard -nographic -kernel diff --git a/tests/tcg/tricore/Makefile.softmmu-target.orig b/tests/tcg/tricore/Makefile.softmmu-target.orig index a9b81545e2..799b51191e 100644 --- a/tests/tcg/tricore/Makefile.softmmu-target.orig +++ b/tests/tcg/tricore/Makefile.softmmu-target.orig @@ -6,6 +6,7 @@ ASFLAGS = TESTS += test_abs.tst TESTS += test_bmerge.tst TESTS += test_clz.tst +TESTS += test_dvstep.tst QEMU_OPTS += -M tricore_testboard -nographic -kernel diff --git a/tests/tcg/tricore/test_fadd.S b/tests/tcg/tricore/test_fadd.S new file mode 100644 index 0000000000..1a65054803 --- /dev/null +++ b/tests/tcg/tricore/test_fadd.S @@ -0,0 +1,16 @@ +#include "macros.h" +.text +.global _start +_start: + TEST_D_DD_PSW(add.f, 1, 0x7fc00000, 0x00000b80, 0xffffff85, 0x00001234) + TEST_D_DD_PSW(add.f, 2, 0xf9c00000, 0x00000b80, 0xf9400000, 0xf9400000) + TEST_D_DD_PSW(add.f, 3, 0x8bb858ca, 0x00000b80, 0x8b3858ca, 0x8b3858ca) + TEST_D_DD_PSW(add.f, 4, 0x00000000, 0x00000b80, 0x000000ff, 0x00000000) + TEST_D_DD_PSW(add.f, 5, 0x7fc00000, 0x00000b80, 0xfffffe52, 0x0a4cf70c) + TEST_D_DD_PSW(add.f, 6, 0x9e6d5076, 0x84000b80, 0x9ded50ec, 0x9ded4fff) + TEST_D_DD_PSW(add.f, 7, 0x00000000, 0x04000b80, 0x0000e8bd, 0x00000000) + TEST_D_DD_PSW(add.f, 8, 0x7fc00000, 0xc4000b80, 0xffad546e, 0xffad546e) + TEST_D_DD_PSW(add.f, 9, 0x7fc00000, 0x04000b80, 0xfffe0000, 0x08130000) + + TEST_PASSFAIL + From patchwork Mon Apr 19 14:54:31 2021 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: 424011 Delivered-To: patch@linaro.org Received: by 2002:a02:6a6f:0:0:0:0:0 with SMTP id m47csp2800868jaf; Mon, 19 Apr 2021 08:06:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwq2nkixLUOBpyIPckLNaJndE9C/Ox8Tt0UpUrc1OM35zHCg2h1xHS5lBvQSSjZAxNEUtAR X-Received: by 2002:a05:6e02:4c4:: with SMTP id f4mr18115946ils.272.1618844793010; Mon, 19 Apr 2021 08:06:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618844793; cv=none; d=google.com; s=arc-20160816; b=vqNEdABOjO0JwrJ6YgRs2rysRQBfS6YtbhsEU7SFp2RddtVBadCPRZqxvOxVkzcR9x LsFdcwg/Ruk/+W72susI7GdMtqQLTtcVz/VBI87oFk4mfWg6gFbUp1BYWN3OOBpLjCbO gHnhc8dmoax9xMYKYIywe3LjLkzGTLalyNfcbG4t82caNN/huICCqrRXNTXkfOqQDTF2 tgiklIT4DtEtg+5y4x+rNtNkcwOB7jMhajx8iPyse10ueiRt8qsbWq6GtwtaPahl3el2 Q5bnUNKXUFNukIJqQqqRNG02cd4rzFMlWu/vypo4lKWgFBlDgenbwHpx1S14apAqimlX Po/Q== 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=6z30FN3XkBuTD2knxnhrmW33PNORrJPZruve7DI1Z20=; b=kIH2MpnD+jf+CLIAr2ABx32FXVZMV+kz8IK2d4uW/2LLKCKH29OzT2WHVme5rD/Vwy T7BDk7ug5VOaGeApRSm2cNXi7uxd09QqO0MO0sZ7ZJFsgBJuWD6x5jbwa43OKu3SzJrt 3tA+KRe8ki7Y5yowlRFqvhd9WVXJmKj0mG3Onr5AENBOMJkBvyx42sfsSzq9zIGE/dXx ZVVPSLWPeX2P5Eb5r8YBf4TZyM9olkMMNNL96xwkBDijbYdkaWXzqhm3U/XH5KQOBQwz xZZ9NGy1MRbsy6zBkFyrLfaYFQHdJkKLvxUGdl/ywKLyZjVSLehesbwbpFiCIsF8OGYH o17g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Zv5ZkP5X; 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 h19si16891601ila.70.2021.04.19.08.06.32 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 19 Apr 2021 08:06: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=Zv5ZkP5X; 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]:54514 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lYVTr-0000lp-65 for patch@linaro.org; Mon, 19 Apr 2021 11:06:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46488) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lYVQE-0004EL-3B for qemu-devel@nongnu.org; Mon, 19 Apr 2021 11:02:46 -0400 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]:33581) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lYVQ9-0002s3-Kc for qemu-devel@nongnu.org; Mon, 19 Apr 2021 11:02:45 -0400 Received: by mail-wr1-x431.google.com with SMTP id g9so18377120wrx.0 for ; Mon, 19 Apr 2021 08:02:41 -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=6z30FN3XkBuTD2knxnhrmW33PNORrJPZruve7DI1Z20=; b=Zv5ZkP5XiocJYqdv8YxM0JI4mxL906PPDBgnMJNkMjajFzy/MXizykwzpbHUxCos3O EAeSUiADPZEsRpnxX9KAk7+RnWgbv5I4OEEuHkJAlPIsgnwoo51XC+ZieM1+hIFbiln/ /Aw0nRNlVsfrX1ZVuvlAVCxipRLKZQzC9xz0Z/MMkgWnfs33bZ1Edj2++p/hV7o8XKTt 46rF3zAu20Zk/7PN3t6jAkboVkn8bFE/tbWJ8cXTMgl8EKLJkCH7zRDpawADsTMbjUlo U35cstWXuParKqFkGF6qocEIlDdidq5U1nag3zV0lBCgsupoGQ87hISwk3i58plJ/ewa r4kg== 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=6z30FN3XkBuTD2knxnhrmW33PNORrJPZruve7DI1Z20=; b=HMnc8R5ccF33L1ZlVjEl3+rFQmlhAX+XrmyiaOPEUhBFPZePeR3BmZFsz8aFO2VQZt bzTVXtP8UYrUICsoqNICeGlVv3xty0sWDNqn0HKEK96SGAHhhwbW78o9iqftpQdvfcSq jM9BmwgT1zzI8myimX3UtP3xHSX0NJ3A5umxDnjEfauX/dj9DlHdU6BXn9ayjm6Yu4b4 xMV+C2KeAnRl56D6FM4Vm5KG3mgZhNY7pjfOgXd1viYJDx4hAc7HQ3elEFg58+VhR1RW iYZYklWdGDGxYo5WXVZM9COKewImgp0k8aOMXXkpOBj0Jfpuy58YZcJeuIIWIsn4Xocm C1Sg== X-Gm-Message-State: AOAM532up6DIOK9eMKNBZi1U+6XKEsmRcW33tk/1AprZ2qdzd0VF4f7C VVPptKK1YaNMlfIYEZB5y7sfSQ== X-Received: by 2002:a05:6000:1204:: with SMTP id e4mr14896716wrx.424.1618844560341; Mon, 19 Apr 2021 08:02:40 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id q5sm23831364wrv.17.2021.04.19.08.02.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 08:02:36 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id ADE8E1FFAA; Mon, 19 Apr 2021 15:54:37 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 21/25] tests/tcg/tricore: Add fmul test Date: Mon, 19 Apr 2021 15:54:31 +0100 Message-Id: <20210419145435.14083-22-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210419145435.14083-1-alex.bennee@linaro.org> References: <20210419145435.14083-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::431; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x431.google.com 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=ham autolearn_force=no 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, Bastian Koppelmann , f4bug@amsat.org, stefanha@redhat.com, crosa@redhat.com, pbonzini@redhat.com, =?utf-8?q?Alex_Benn=C3=A9e?= , aurelien@aurel32.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Bastian Koppelmann Tested-by: Alex Bennée Signed-off-by: Bastian Koppelmann Signed-off-by: Alex Bennée Message-Id: <20210305170045.869437-12-kbastian@mail.uni-paderborn.de> --- tests/tcg/tricore/Makefile.softmmu-target | 1 + tests/tcg/tricore/Makefile.softmmu-target.orig | 1 + tests/tcg/tricore/test_fmul.S | 8 ++++++++ 3 files changed, 10 insertions(+) create mode 100644 tests/tcg/tricore/test_fmul.S -- 2.20.1 diff --git a/tests/tcg/tricore/Makefile.softmmu-target b/tests/tcg/tricore/Makefile.softmmu-target index e7adb16af9..34da1f37de 100644 --- a/tests/tcg/tricore/Makefile.softmmu-target +++ b/tests/tcg/tricore/Makefile.softmmu-target @@ -8,6 +8,7 @@ TESTS += test_bmerge.tst TESTS += test_clz.tst TESTS += test_dvstep.tst TESTS += test_fadd.tst +TESTS += test_fmul.tst QEMU_OPTS += -M tricore_testboard -nographic -kernel diff --git a/tests/tcg/tricore/Makefile.softmmu-target.orig b/tests/tcg/tricore/Makefile.softmmu-target.orig index 799b51191e..e7adb16af9 100644 --- a/tests/tcg/tricore/Makefile.softmmu-target.orig +++ b/tests/tcg/tricore/Makefile.softmmu-target.orig @@ -7,6 +7,7 @@ TESTS += test_abs.tst TESTS += test_bmerge.tst TESTS += test_clz.tst TESTS += test_dvstep.tst +TESTS += test_fadd.tst QEMU_OPTS += -M tricore_testboard -nographic -kernel diff --git a/tests/tcg/tricore/test_fmul.S b/tests/tcg/tricore/test_fmul.S new file mode 100644 index 0000000000..fb1f634b2d --- /dev/null +++ b/tests/tcg/tricore/test_fmul.S @@ -0,0 +1,8 @@ +#include "macros.h" +.text +.global _start +_start: + TEST_D_DD_PSW(mul.f, 1, 0x974f4f0a, 0x84000b80, 0x1a0b1980, 0xbcbec42d) + + TEST_PASSFAIL + From patchwork Mon Apr 19 14:54:32 2021 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: 424020 Delivered-To: patch@linaro.org Received: by 2002:a02:6a6f:0:0:0:0:0 with SMTP id m47csp2806767jaf; Mon, 19 Apr 2021 08:12:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJybHyLrPeqWqmawkF7wQ1f4mfyY8aNcMlsi6ZJtzhnlT0EKCDmCsIGJXdzYDhWwUISN0J9A X-Received: by 2002:a92:cc02:: with SMTP id s2mr17468840ilp.101.1618845179780; Mon, 19 Apr 2021 08:12:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618845179; cv=none; d=google.com; s=arc-20160816; b=k3op88WS8p/8Awuz5lGSKbEYtLuNZmPBnAQSVZ6DkRJU8atBBKJ9ODBCKU3FgU0gqa ShY0EZWQwTPeLGD0IZ1QZBIjf8TjUo41npVix1kh9bIxZjqeOtKuYAflkLOOVC2pkNjL JAnAFJy/frJ9T9QoONpfid3SinO0KXDwzbipeKxrwwmkWZt5yPnAIqJxmqCgIO6yLSTM HCztgdJ5wkimvRyprzd0DBYh1f4ZLOIT95T3q7qxbya4K5ndCM+dTCmUuCb+wz9SwMMF 6QhzFMVdGrM3uZELV9pt0N7+fozBPVdvTOJhjwH2G33UlXOxNHFlLMbm3Y8DKI/INVSE 0tLA== 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=F6jz8RXeBoyzIpBP7F/m0Op/VYGrWLRUn+isRjGAQV8=; b=LRWcq3RJetyMUIq7FwAMBV2x5jo2JXqtBoMuMiLmNNQPJZMaUpsHNxQDHXTfSnR3dH iHosjcossc076yaxCr8UTINXLxXWEWtOwL9VfcOLQX1fHe77huMkRhXQQsLFLDwX3QAB tEQiYBusKehTxQY//ksfSNEQgvw+qWnXiFF0T2FCfw7GtXfkqf0YQ0D2DapdjUweCqmL dg3NrYhQgewrya4tJFC2Xr4fFWMqTjjrgkWdL7NVV2ySuH34skoTq8FwOnDuSD7Sy4bu xHEfpskfFV7A6UX8OI7G7LFvN06ZDg6Oo7lNyfftY5TccnnW3Kk3e2qJZ7DwXteeIOPg xFYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=SPFlB0VO; 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 p8si15578795jas.105.2021.04.19.08.12.59 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 19 Apr 2021 08:12:59 -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=SPFlB0VO; 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]:43576 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lYVa7-0008Uy-9B for patch@linaro.org; Mon, 19 Apr 2021 11:12:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46626) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lYVQV-0004SB-Ms for qemu-devel@nongnu.org; Mon, 19 Apr 2021 11:03:03 -0400 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]:34320) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lYVQF-0002uW-LZ for qemu-devel@nongnu.org; Mon, 19 Apr 2021 11:03:03 -0400 Received: by mail-wr1-x42b.google.com with SMTP id r7so22389780wrm.1 for ; Mon, 19 Apr 2021 08:02:46 -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=F6jz8RXeBoyzIpBP7F/m0Op/VYGrWLRUn+isRjGAQV8=; b=SPFlB0VOD0xAeyuVs6YV8ndOKjrb+w43ekiXuVT7e8FAwxvRTDE/4okTJMfDItW39F SSQXsS7GsPTUylNiRkLHEq3oif+RqR/3k7XIHw/4NXtP7XySRjAiKGEIOGonZxgVnETJ zgrutOiYdaWk6t7eOlODai5+wcdZDIPu8lgsPv7h7SbFDFHi7QEUdpVjHbdtGzreVkFJ h2RXQ/tSuVUfUid9q0yVkVD/mhT1fV5DRlrn5by+23ZVmLtvq1A2nilWrxu3U+99ggPy tGqSDL039HNRpFXcbdElwnOMDNGu7oKBonD4n4JdcuRi+jJGK3cqvs6zGMvlq1z5Exdp leGw== 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=F6jz8RXeBoyzIpBP7F/m0Op/VYGrWLRUn+isRjGAQV8=; b=DKwjKSUqVflj577wvXHCguopl7XhdsZEivQ6cr+aYJdAPXNdONBgteXAzMYqiGBkfC lpNSTEWaEXUUL2Z19aosP7hLt+H0osgSFMNgYdI2r8cRcEk/AcFGBmxIAxRPuvCLIiSV +DxYyDWv+u/+4n39TgM2QMry3orA7C8FBZY2k/S2OAo2+rowFlY+CCA6YFoD4PaPOu4x m4uJvHO8KOBf4x//1nlhdD5YvPzja1KV5lBN4Z5BLL05JAxNJ2Y9ZXpSOGEux/bt10zL aqE3GW2ItPTU1TutqS8qeFyFI0Wq0l+h1JLJj8YWr4UF3b5OK1RC2RFfexmZ4bYv5Gdh ttvQ== X-Gm-Message-State: AOAM5339cv5nOP3bBWMyLatPXUskUrcvjxnSGch/aGbBcgg0ZObtsic1 8H7Im3k1UN52ti0GMWZkMVhPpg== X-Received: by 2002:a5d:640e:: with SMTP id z14mr15098158wru.258.1618844565612; Mon, 19 Apr 2021 08:02:45 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id n2sm23161727wmb.32.2021.04.19.08.02.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 08:02:44 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id CA7B11FFAB; Mon, 19 Apr 2021 15:54:37 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 22/25] tests/tcg/tricore: Add ftoi test Date: Mon, 19 Apr 2021 15:54:32 +0100 Message-Id: <20210419145435.14083-23-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210419145435.14083-1-alex.bennee@linaro.org> References: <20210419145435.14083-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42b.google.com 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=ham autolearn_force=no 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, Bastian Koppelmann , f4bug@amsat.org, stefanha@redhat.com, crosa@redhat.com, pbonzini@redhat.com, =?utf-8?q?Alex_Benn=C3=A9e?= , aurelien@aurel32.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Bastian Koppelmann Tested-by: Alex Bennée Signed-off-by: Bastian Koppelmann Signed-off-by: Alex Bennée Message-Id: <20210305170045.869437-13-kbastian@mail.uni-paderborn.de> --- tests/tcg/tricore/macros.h | 7 +++++++ tests/tcg/tricore/Makefile.softmmu-target | 1 + tests/tcg/tricore/Makefile.softmmu-target.orig | 1 + tests/tcg/tricore/test_ftoi.S | 10 ++++++++++ 4 files changed, 19 insertions(+) create mode 100644 tests/tcg/tricore/test_ftoi.S -- 2.20.1 diff --git a/tests/tcg/tricore/macros.h b/tests/tcg/tricore/macros.h index 59b4b9a352..e6a41cd1a2 100644 --- a/tests/tcg/tricore/macros.h +++ b/tests/tcg/tricore/macros.h @@ -70,6 +70,13 @@ test_ ## num: \ insn DREG_CALC_RESULT, DREG_RS1; \ ) +#define TEST_D_D_PSW(insn, num, result, psw, rs1) \ + TEST_CASE_PSW(num, DREG_CALC_RESULT, result, psw, \ + LI(DREG_RS1, rs1); \ + rstv; \ + insn DREG_CORRECT_RESULT, DREG_RS1; \ + ) + #define TEST_D_DD_PSW(insn, num, result, psw, rs1, rs2) \ TEST_CASE_PSW(num, DREG_CALC_RESULT, result, psw, \ LI(DREG_RS1, rs1); \ diff --git a/tests/tcg/tricore/Makefile.softmmu-target b/tests/tcg/tricore/Makefile.softmmu-target index 34da1f37de..fcc7b6c1c9 100644 --- a/tests/tcg/tricore/Makefile.softmmu-target +++ b/tests/tcg/tricore/Makefile.softmmu-target @@ -9,6 +9,7 @@ TESTS += test_clz.tst TESTS += test_dvstep.tst TESTS += test_fadd.tst TESTS += test_fmul.tst +TESTS += test_ftoi.tst QEMU_OPTS += -M tricore_testboard -nographic -kernel diff --git a/tests/tcg/tricore/Makefile.softmmu-target.orig b/tests/tcg/tricore/Makefile.softmmu-target.orig index e7adb16af9..34da1f37de 100644 --- a/tests/tcg/tricore/Makefile.softmmu-target.orig +++ b/tests/tcg/tricore/Makefile.softmmu-target.orig @@ -8,6 +8,7 @@ TESTS += test_bmerge.tst TESTS += test_clz.tst TESTS += test_dvstep.tst TESTS += test_fadd.tst +TESTS += test_fmul.tst QEMU_OPTS += -M tricore_testboard -nographic -kernel diff --git a/tests/tcg/tricore/test_ftoi.S b/tests/tcg/tricore/test_ftoi.S new file mode 100644 index 0000000000..fb4af6b5aa --- /dev/null +++ b/tests/tcg/tricore/test_ftoi.S @@ -0,0 +1,10 @@ +#include "macros.h" +.text +.global _start +_start: + TEST_D_D_PSW(ftoi, 1, 0x0, 0x84000b80, 0x05f6e605) + TEST_D_D_PSW(ftoi, 2, 0x0, 0x04000b80, 0x00012200) + TEST_D_D_PSW(ftoi, 3, 0x0, 0xc4000b80, 0xffffffff) + + TEST_PASSFAIL + From patchwork Mon Apr 19 14:54:33 2021 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: 424021 Delivered-To: patch@linaro.org Received: by 2002:a02:6a6f:0:0:0:0:0 with SMTP id m47csp2809738jaf; Mon, 19 Apr 2021 08:16:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwsRn3KL0dPLeD7To/zRYjLW+j6oIRGsBh8M/qB3vorbA5NVgARMvI4Njp/g2GOifHZPVoV X-Received: by 2002:a05:6638:1123:: with SMTP id f3mr15091244jar.35.1618845372692; Mon, 19 Apr 2021 08:16:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618845372; cv=none; d=google.com; s=arc-20160816; b=UkEV3yOTvHdOiQJvAd5jzUAyx2zYVV2pSHWl17gGsdbLL6uD81dJuSbKc5/xZFJUrM VPxs5G1v9pFUCjVIMTVdDMufikTAQfjfPW7wIEVOz3dMOMuwEnBEHyzb+IRnNC3ggijR H0bllNilfUsjy/8Qf7GbP32TNJ6+qCNtUhwpxXP3yEKwlbn9rJv8lKAFM/U8Z4M+EZz8 O44/+PGkb2BPskWDxFbKtDoqoIJUz0l7Qvnb3x698OUTMAvLC8t55eiO54U2tDsLWBIL ZXS5a942r2jzAW+V7Zn01UnSGLqQqho26+7v8SnCxkdLeKOh8/BXORchJr5v8wsHGFkq 3MIw== 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=qkm0frynKQe9r+NHKksNpm04E14AIA46y5AxXZW2aqc=; b=HdpK8u7xak0d5DhjjB+GV4+MapC6g/6JuA+scLWZKkattlDBKA564EF2zVHliw89fj yX9xd3SzVKmo1u6a2uMgcC4w/lpqCzKObQ5DZPZ1guGdoILn3oH/jQGbDp9EQY4wWwlc S4xnBJgnzBjfqn488q4j5AXdCaY43Fj0WNwuGAxI1dFS/r3qh0w04QzFpWyZysja3Q5x VSbSfOtTjtvBYdl0Yt911IIy6SzQH/pSXAYOznqr8hg5Q7p1GoM2OfVA3quH9lOTdvBf zj86/2uBDNjtUvbHiXSgK/705OsqLqJpJpw6LjSxpyfDaIemeSFe7nGJB8iTUJpbJt6H 4rSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=QbYi5lur; 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 m16si15906598iln.75.2021.04.19.08.16.12 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 19 Apr 2021 08:16: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=QbYi5lur; 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]:53078 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lYVdE-000418-3J for patch@linaro.org; Mon, 19 Apr 2021 11:16:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46606) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lYVQU-0004Ov-72 for qemu-devel@nongnu.org; Mon, 19 Apr 2021 11:03:02 -0400 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]:40666) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lYVQL-0002wt-Iy for qemu-devel@nongnu.org; Mon, 19 Apr 2021 11:03:01 -0400 Received: by mail-wm1-x32c.google.com with SMTP id y124-20020a1c32820000b029010c93864955so20765375wmy.5 for ; Mon, 19 Apr 2021 08:02:51 -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=qkm0frynKQe9r+NHKksNpm04E14AIA46y5AxXZW2aqc=; b=QbYi5lur+cSSWUUDHSFxgIG8olGb9lDjsj71i9Em20JF07wf203Rd0kn6+xmPJaSnH CtC1vkHipGmu/+zP59ScRkyX5R8R9drctIngN8MP4G2YHlrZYyxupuVI7OfuzPbaYTbQ WPwATO0T1zpSqft78O81mvavKbS6OVNw5zB7gcvpXpDTI479TKw/LgrvX5W4RbIwplbh sxMSIFSx103IZnmkY/TvrDaUuidC8cjaPzK7vRj9nhgKs5vMj3p4HlyjXwWCPd+hONVT mAniopM1mZyvlmbww3ahQTsIBSCA2gVcBnJRS4g+unsFRgvh1ysadj8tucCvye3qHkLg mb6Q== 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=qkm0frynKQe9r+NHKksNpm04E14AIA46y5AxXZW2aqc=; b=mM+yJ558KpZUHrAaPsecvEZ0UsEKuUbJHA1yQ3w32eJQAjLUfUOp+fD4joU0Gy+6Oa EOnAPMdUskiEAX/Xvx8RIgKPtP8rNH3m6U92mCzJfHhiv3P/stzzdTPzQ5JheV47BXsy JC8zntWotk6bNEfE+0YmjBIJN+UVLdA/fuT2myXuV6V15flBps9tHJl/Qy24W/e35rT6 DeSkM3MdmC1X91E7bOG4jCucKxqFuSO633OqNu2+hsA/Sc8MHEG3Xv0m/UHvCoRcZxFh SnGP6nt1klmWw1CMf59wcCpOFOBMQXEBMKbYdsaOH8wulDl0lMTvspAWF7rOQblDPAun TGdA== X-Gm-Message-State: AOAM533AUTIx8x0Hc5yU0rbq7DtFsQVPKZ7E8klhB8XdKR7zj2D7aZTo SxK+Mcp1cI+FJr1m4DBXcIVWfg== X-Received: by 2002:a1c:6646:: with SMTP id a67mr22246067wmc.86.1618844570530; Mon, 19 Apr 2021 08:02:50 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id o18sm19468965wmp.26.2021.04.19.08.02.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 08:02:44 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id E4C5D1FFAC; Mon, 19 Apr 2021 15:54:37 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 23/25] tests/tcg/tricore: Add madd test Date: Mon, 19 Apr 2021 15:54:33 +0100 Message-Id: <20210419145435.14083-24-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210419145435.14083-1-alex.bennee@linaro.org> References: <20210419145435.14083-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32c.google.com 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=ham autolearn_force=no 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, Bastian Koppelmann , f4bug@amsat.org, stefanha@redhat.com, crosa@redhat.com, pbonzini@redhat.com, =?utf-8?q?Alex_Benn=C3=A9e?= , aurelien@aurel32.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Bastian Koppelmann Tested-by: Alex Bennée Signed-off-by: Bastian Koppelmann Signed-off-by: Alex Bennée Message-Id: <20210305170045.869437-14-kbastian@mail.uni-paderborn.de> --- tests/tcg/tricore/macros.h | 18 ++++++++++++++++++ tests/tcg/tricore/Makefile.softmmu-target | 1 + tests/tcg/tricore/Makefile.softmmu-target.orig | 1 + tests/tcg/tricore/test_madd.S | 11 +++++++++++ 4 files changed, 31 insertions(+) create mode 100644 tests/tcg/tricore/test_madd.S -- 2.20.1 diff --git a/tests/tcg/tricore/macros.h b/tests/tcg/tricore/macros.h index e6a41cd1a2..0d76fc403a 100644 --- a/tests/tcg/tricore/macros.h +++ b/tests/tcg/tricore/macros.h @@ -9,6 +9,7 @@ /* Register definitions */ #define DREG_RS1 %d0 #define DREG_RS2 %d1 +#define DREG_RS3 %d4 #define DREG_CALC_RESULT %d1 #define DREG_CALC_PSW %d2 #define DREG_CORRECT_PSW %d3 @@ -85,6 +86,23 @@ test_ ## num: \ insn DREG_CALC_RESULT, DREG_RS1, DREG_RS2; \ ) +#define TEST_D_DDD_PSW(insn, num, result, psw, rs1, rs2, rs3) \ + TEST_CASE_PSW(num, DREG_CALC_RESULT, result, psw, \ + LI(DREG_RS1, rs1); \ + LI(DREG_RS2, rs2); \ + LI(DREG_RS3, rs3); \ + rstv; \ + insn DREG_CALC_RESULT, DREG_RS1, DREG_RS2, DREG_RS3; \ + ) + +#define TEST_D_DDI_PSW(insn, num, result, psw, rs1, rs2, imm) \ + TEST_CASE_PSW(num, DREG_CALC_RESULT, result, psw, \ + LI(DREG_RS1, rs1); \ + LI(DREG_RS2, rs2); \ + rstv; \ + insn DREG_CALC_RESULT, DREG_RS1, DREG_RS2, imm; \ + ) + #define TEST_E_ED(insn, num, res_hi, res_lo, rs1_hi, rs1_lo, rs2) \ TEST_CASE_E(num, res_lo, res_hi, \ LI(EREG_RS1_LO, rs1_lo); \ diff --git a/tests/tcg/tricore/Makefile.softmmu-target b/tests/tcg/tricore/Makefile.softmmu-target index fcc7b6c1c9..8de005523e 100644 --- a/tests/tcg/tricore/Makefile.softmmu-target +++ b/tests/tcg/tricore/Makefile.softmmu-target @@ -10,6 +10,7 @@ TESTS += test_dvstep.tst TESTS += test_fadd.tst TESTS += test_fmul.tst TESTS += test_ftoi.tst +TESTS += test_madd.tst QEMU_OPTS += -M tricore_testboard -nographic -kernel diff --git a/tests/tcg/tricore/Makefile.softmmu-target.orig b/tests/tcg/tricore/Makefile.softmmu-target.orig index 34da1f37de..fcc7b6c1c9 100644 --- a/tests/tcg/tricore/Makefile.softmmu-target.orig +++ b/tests/tcg/tricore/Makefile.softmmu-target.orig @@ -9,6 +9,7 @@ TESTS += test_clz.tst TESTS += test_dvstep.tst TESTS += test_fadd.tst TESTS += test_fmul.tst +TESTS += test_ftoi.tst QEMU_OPTS += -M tricore_testboard -nographic -kernel diff --git a/tests/tcg/tricore/test_madd.S b/tests/tcg/tricore/test_madd.S new file mode 100644 index 0000000000..5d839772bb --- /dev/null +++ b/tests/tcg/tricore/test_madd.S @@ -0,0 +1,11 @@ +#include "macros.h" +.text +.global _start +_start: + TEST_D_DDI_PSW(madd, 1, 0x0000fffd, 0x60000b80, 0x0000ffff, 0x7fffffff,2) + TEST_D_DDI_PSW(madd, 2, 0xffff7fff, 0x60000b80, 0xffff8001, 0x7fffffff,2) + TEST_D_DDD_PSW(madds.u, 3, 0xffffffff, 0x60000b80, 0x00000000, 0x80000000, \ + 0x80000000) + + TEST_PASSFAIL + From patchwork Mon Apr 19 14:54:34 2021 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: 424010 Delivered-To: patch@linaro.org Received: by 2002:a02:6a6f:0:0:0:0:0 with SMTP id m47csp2800287jaf; Mon, 19 Apr 2021 08:05:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwIx406UO29rnYeXoLEgTpp3FKGoEIsfPylVdNL8dTOAREVKROkmDXIuAr11+nQarsV+4l5 X-Received: by 2002:a05:6e02:1d9e:: with SMTP id h30mr17602266ila.214.1618844756589; Mon, 19 Apr 2021 08:05:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618844756; cv=none; d=google.com; s=arc-20160816; b=qTXZ/Q/ag5834IS5c13amL0kY3cJQwZ0bmxHzeXP5ThmyRFOJ657DonNiNgObgT3cW 1IzTZAP8onI8LmhtXwNq+VzGA8YH4n+nHRAK7mlcDCgka4cmUb7GgCJowGiEV3M3CEwJ rzKnjP06GfAj9gcC33tqNK24+4OqB4v+KpGpnjyA1Gpi0kjEOd+pq9f9Zubq0uN+g/qC 5MvRCsyULVNsRzol6cdicK5XjlxgZN9SkIMJoWXKgMMNBEjFqZ/PQgy2QKeGx1IeBDKI ff0mOUum3yP7htwqNUnTQXU9EiYccIr3WKaeX5OxDNRRzjKjRjKO4J+bO0+/9ZYwg8hH R6SQ== 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=yq6sLawdnNUtIztNCbXZW8HT4K2dCStLDrZocc29Kks=; b=OcHFZKMuvXnRNzRnXTvG5IvQ6YodlqXWvWMU0xyPXId+cDCICCLw4jmINj4RNgq9mm 3doVL29kncfGY3OvVAiC2oozyPmACH5FQaeY6BnMxAbCIQ9+5iacHklxK4FD6ayTscN/ 7t8al9eSuT+OIJErO5iK7nEm6XE+1C7GQZ9insPeMY6KiDSji9TaMKYyXbGDtiWVA6jV D7m1g5SaC4qWf2x7K+i46OKIffx6nuaCRMaQTTjSICYgy1Pyu5sIVwwHF2axhWzrKAdM YC8Kzlb1Xki2Q165kXM73pVDNGkLwQtw4P4fOWVI9+SkxL3u1Hi9C/C7M7q2i2C2wAAv MHUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=ioKvt+Tx; 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 n1si16164442ili.3.2021.04.19.08.05.56 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 19 Apr 2021 08:05:56 -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=ioKvt+Tx; 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]:51706 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lYVTI-0007pW-0Y for patch@linaro.org; Mon, 19 Apr 2021 11:05:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46522) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lYVQH-0004I7-RY for qemu-devel@nongnu.org; Mon, 19 Apr 2021 11:02:51 -0400 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]:42641) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lYVQD-0002u9-NJ for qemu-devel@nongnu.org; Mon, 19 Apr 2021 11:02:49 -0400 Received: by mail-wm1-x330.google.com with SMTP id y5-20020a05600c3645b0290132b13aaa3bso6512268wmq.1 for ; Mon, 19 Apr 2021 08:02:43 -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=yq6sLawdnNUtIztNCbXZW8HT4K2dCStLDrZocc29Kks=; b=ioKvt+TxTTKG8QrI3kwdJBGYuOPmqYodiCjDux8t5gZjGq5qNaL0BcctKZk48Mk/XH nubHvKmopE0+UPuIcTFoN+IOU6hHuutx8lUDLKu3u7yAZDe/BVAXhqY0Y6Tnd3qAVBLA QGkFwnXj+hD7TtIpoqRJlLFmq492ZkDc2R8BH+fNIRxPZh4YQsXV+ek1Qe3FgDIL9ac+ MBwiQ+5NcAltgZQiSIbsj82l7pmBnuWvFplV0i4fnqlzHTl9qUKmjXZxX9sEA4aC7Qom UVBOGzN1m0DAlVPWdUkZO65MGjud0elxonLfXWjHnxK4gFr2PxXTZOc2oqtwvj6i5WmQ VhNw== 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=yq6sLawdnNUtIztNCbXZW8HT4K2dCStLDrZocc29Kks=; b=IWNpW9hdHMoSA5IPIMOIHZrLKw61WNtzYanYwsV4IEc3fk1HK7Mb9KmUnRsHBotB0+ zyAm+viAOg/26kxk74bqKdMQyoyCGpzcVMlQVyIpnugU0kq8yeKbOiyVzKbPs0O0ROrg DYc3wX5BT/FBU2Ngq/21joJ4rPNY2CRhPFIhyR3GXcFatjCUDUkSz4GZc1UOfOilgro2 9XN7sOI/V9xInnGwe0D67nkRwVPMatpXdzjoJKxhPxkOlRh/B1PkRTXaaroJxh/gsw9y DVZ73NRtJq57NaH1ULGEZLVpa3tvvF655JPeRXYqkuGmcxRCYr6b/A+hQZ2OvGJrQf21 Bisg== X-Gm-Message-State: AOAM532TMYBj79NCekPMowadIKW/yN+ak6BUDZk8oHJX1ojI9BsJr562 VX/vM1w+5O9VplEiNgcNMb1i3A== X-Received: by 2002:a1c:7f4a:: with SMTP id a71mr22121931wmd.1.1618844563043; Mon, 19 Apr 2021 08:02:43 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id c16sm23137678wrt.83.2021.04.19.08.02.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 08:02:36 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 0A9561FF87; Mon, 19 Apr 2021 15:54:38 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 24/25] tests/tcg/tricore: Add msub test Date: Mon, 19 Apr 2021 15:54:34 +0100 Message-Id: <20210419145435.14083-25-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210419145435.14083-1-alex.bennee@linaro.org> References: <20210419145435.14083-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::330; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x330.google.com 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=ham autolearn_force=no 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, Bastian Koppelmann , f4bug@amsat.org, stefanha@redhat.com, crosa@redhat.com, pbonzini@redhat.com, =?utf-8?q?Alex_Benn=C3=A9e?= , aurelien@aurel32.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Bastian Koppelmann Tested-by: Alex Bennée Signed-off-by: Bastian Koppelmann Signed-off-by: Alex Bennée Message-Id: <20210305170045.869437-15-kbastian@mail.uni-paderborn.de> --- tests/tcg/tricore/Makefile.softmmu-target | 1 + tests/tcg/tricore/Makefile.softmmu-target.orig | 1 + tests/tcg/tricore/test_msub.S | 9 +++++++++ 3 files changed, 11 insertions(+) create mode 100644 tests/tcg/tricore/test_msub.S -- 2.20.1 diff --git a/tests/tcg/tricore/Makefile.softmmu-target b/tests/tcg/tricore/Makefile.softmmu-target index 8de005523e..0fe6a86482 100644 --- a/tests/tcg/tricore/Makefile.softmmu-target +++ b/tests/tcg/tricore/Makefile.softmmu-target @@ -11,6 +11,7 @@ TESTS += test_fadd.tst TESTS += test_fmul.tst TESTS += test_ftoi.tst TESTS += test_madd.tst +TESTS += test_msub.tst QEMU_OPTS += -M tricore_testboard -nographic -kernel diff --git a/tests/tcg/tricore/Makefile.softmmu-target.orig b/tests/tcg/tricore/Makefile.softmmu-target.orig index fcc7b6c1c9..8de005523e 100644 --- a/tests/tcg/tricore/Makefile.softmmu-target.orig +++ b/tests/tcg/tricore/Makefile.softmmu-target.orig @@ -10,6 +10,7 @@ TESTS += test_dvstep.tst TESTS += test_fadd.tst TESTS += test_fmul.tst TESTS += test_ftoi.tst +TESTS += test_madd.tst QEMU_OPTS += -M tricore_testboard -nographic -kernel diff --git a/tests/tcg/tricore/test_msub.S b/tests/tcg/tricore/test_msub.S new file mode 100644 index 0000000000..6dee87d99c --- /dev/null +++ b/tests/tcg/tricore/test_msub.S @@ -0,0 +1,9 @@ +#include "macros.h" +.text +.global _start +_start: + TEST_D_DDI_PSW(msub, 1, 0xd2fbe5e0, 0x00000b80,0x64003300, 0xff5420d4, -216) + TEST_D_DDI_PSW(msub, 2, 0xfffffc10, 0x00000b80,0xfffffe68, 0xfffffffd, -200) + TEST_D_DDD_PSW(msubs.u, 3, 0x0, 0x60000b80, 0x1, 0xffffffff, 0xffffffdb) + TEST_PASSFAIL + From patchwork Mon Apr 19 14:54:35 2021 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: 424017 Delivered-To: patch@linaro.org Received: by 2002:a02:6a6f:0:0:0:0:0 with SMTP id m47csp2805139jaf; Mon, 19 Apr 2021 08:11:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx6XdoU08O0r9zU6FlqPAhmldYAUhrsKGs3hQTrg904wgFixCNpo7Jx6iFG1uqUgD93vq8i X-Received: by 2002:a5e:930d:: with SMTP id k13mr14899425iom.61.1618845079245; Mon, 19 Apr 2021 08:11:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618845079; cv=none; d=google.com; s=arc-20160816; b=f0Nnd18p56eVcwb4DFGJC8Ut0CersPc3zOScocBhIV+NGwXvP9dNwBZb1r2sUaSXnb t3mmWXB3ldbOsLtyllo3W10xzMtdA4ckpYWj4wK/v5nr2ixijYZg9SyDoTy3SGpNQiwZ tCMFz8oE1WDVYT83uKGIHWqf0qhSUfhEyiRNR3DTwJHDOBXLcZJ/xzItxts3CtjLwITt VsB5jR268mv+tVYf74XE33U9rjueCzzQarkrhwSISVygKSjoX13Vi1x18PbfnEuKNkuE WBHPHI4112OIXY2UFQF7XlTaryAvhJtsDb3SGXKKvuNQpzArGrqlzG1XEcyt6jeu+i+q iPNw== 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=H5BMN5fje87edw52vYTP9DrRZyXVlghgLd7qxl9nbbg=; b=lC/Jqk7HkM3hNT5TrP/gstjS+NlQdq3yE5FjxYDW/S/kDCGVdsRL1tCi43FjgYLBq3 zo89FYh12RArSSq1UcaAQyKIF3z1Cu6ztEX2zLiW8QRN1Nd13HNav16GOcfJfMySGFxl Q7GRqzk0VCSOHsDcwRlq1jG8rCkrR9xuwDszoxqCNkn5/+L3zH26lnPqab903xt/cQL4 TPniTGFc7rRHQM/+h4sBF1rH+MG4wTAcy30iILvWWs9XeM6NIX+rWS+Zy3LXKpbMaVKp hSbgBx6G0VbNNuMdRdiTz0mKquH2aj9vo3Z/24FSTp/od0agok+YcEn8RFJitmZI4oY4 LVZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=gU4dBrQC; 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 l24si4800201ioh.105.2021.04.19.08.11.19 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 19 Apr 2021 08:11:19 -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=gU4dBrQC; 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]:40610 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lYVYU-0007Iv-Mb for patch@linaro.org; Mon, 19 Apr 2021 11:11:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46602) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lYVQT-0004OM-Rw for qemu-devel@nongnu.org; Mon, 19 Apr 2021 11:03:01 -0400 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]:38830) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lYVQJ-0002wa-GJ for qemu-devel@nongnu.org; Mon, 19 Apr 2021 11:03:01 -0400 Received: by mail-wr1-x435.google.com with SMTP id w4so30677170wrt.5 for ; Mon, 19 Apr 2021 08:02:49 -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=H5BMN5fje87edw52vYTP9DrRZyXVlghgLd7qxl9nbbg=; b=gU4dBrQCkodtcYW+SFpg22MMZLmWM5rKyS1vr7iJuuwLIvKeBYvrWVHQr6OLojeboT t+RtDp/tlVSsRx13cK8aUeFrpHUCdMijqfOUcSjDxkRHNtQQfUk2gtYcOqoiAL9Pgzni QitBwmiW5dZSxYI2wrnMMCaULUIuVNaGhFeyY41qypSjzWvgAYNlXMr1HC7jtGYZXR/d iUKIJ6+0qxvvPlxhr06FJU1kwbV55JgKeUKBNukDZPz/l58DFGPEsNeA1DtHguHNpCOL cPywRKkqAeFYXR6gCcJ/f2qbXTg4Q4bcSJn0l/hJ4lIIsu2/Cgsv367gEYYMsS8DcrDn c5wg== 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=H5BMN5fje87edw52vYTP9DrRZyXVlghgLd7qxl9nbbg=; b=EQYdJiKj9kac0aTSynTFojMPM1GDYkQ8JJb3eZfidC0W4QVSczfkpDjDu8XdMs9P+z yTuIMRCG+GwZW9BL7bizSfRRCVYU6QQ7Mmn8BJXrXSS0p7hXdwR5NZya7eScB4uagNV6 Kbl2qyoj8jwbFJ2NE9sitOnQ9zFZ3Z9Tso+8td273v0/FL0+kYU1OY0erawk/4AUrdU9 p6zqHOoOZnaiTA8ort7lf3DbklilolM0YL3xh9ueVvjgtgHSrzGzkx8cDlIVQIwFudyQ YJXWKVykndrychZRWMxdDhdyM3K2lolS7AnJmEvi08c96yJrR/R1lkHLUZPVGCRZZtw2 SueA== X-Gm-Message-State: AOAM531DQ4fPRX6Bx07t9+/1pRh7Bv6h3Sd/VfrAP8PB3tN9wan60Eka hEITstFtnySEzZvD+yYcOZv4IQ== X-Received: by 2002:adf:cd8c:: with SMTP id q12mr14995678wrj.328.1618844568880; Mon, 19 Apr 2021 08:02:48 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id o125sm20692488wmo.24.2021.04.19.08.02.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 08:02:44 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 25DAD1FFAE; Mon, 19 Apr 2021 15:54:38 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 25/25] tests/tcg/tricore: Add muls test Date: Mon, 19 Apr 2021 15:54:35 +0100 Message-Id: <20210419145435.14083-26-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210419145435.14083-1-alex.bennee@linaro.org> References: <20210419145435.14083-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::435; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x435.google.com 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=ham autolearn_force=no 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, Bastian Koppelmann , f4bug@amsat.org, stefanha@redhat.com, crosa@redhat.com, pbonzini@redhat.com, =?utf-8?q?Alex_Benn=C3=A9e?= , aurelien@aurel32.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Bastian Koppelmann Tested-by: Alex Bennée Signed-off-by: Bastian Koppelmann Signed-off-by: Alex Bennée Message-Id: <20210305170045.869437-16-kbastian@mail.uni-paderborn.de> --- tests/tcg/tricore/Makefile.softmmu-target | 1 + tests/tcg/tricore/Makefile.softmmu-target.orig | 1 + tests/tcg/tricore/test_muls.S | 9 +++++++++ 3 files changed, 11 insertions(+) create mode 100644 tests/tcg/tricore/test_muls.S -- 2.20.1 diff --git a/tests/tcg/tricore/Makefile.softmmu-target b/tests/tcg/tricore/Makefile.softmmu-target index 0fe6a86482..5007c60ce8 100644 --- a/tests/tcg/tricore/Makefile.softmmu-target +++ b/tests/tcg/tricore/Makefile.softmmu-target @@ -12,6 +12,7 @@ TESTS += test_fmul.tst TESTS += test_ftoi.tst TESTS += test_madd.tst TESTS += test_msub.tst +TESTS += test_muls.tst QEMU_OPTS += -M tricore_testboard -nographic -kernel diff --git a/tests/tcg/tricore/Makefile.softmmu-target.orig b/tests/tcg/tricore/Makefile.softmmu-target.orig index 8de005523e..0fe6a86482 100644 --- a/tests/tcg/tricore/Makefile.softmmu-target.orig +++ b/tests/tcg/tricore/Makefile.softmmu-target.orig @@ -11,6 +11,7 @@ TESTS += test_fadd.tst TESTS += test_fmul.tst TESTS += test_ftoi.tst TESTS += test_madd.tst +TESTS += test_msub.tst QEMU_OPTS += -M tricore_testboard -nographic -kernel diff --git a/tests/tcg/tricore/test_muls.S b/tests/tcg/tricore/test_muls.S new file mode 100644 index 0000000000..ca517556bc --- /dev/null +++ b/tests/tcg/tricore/test_muls.S @@ -0,0 +1,9 @@ +#include "macros.h" +.text +.global _start +_start: + TEST_D_DD_PSW(muls.u, 1, 0xffffffff, 0x78000b80, 0x80000001, 0xffffffff) + TEST_D_DD_PSW(muls.u, 2, 0xffffffff, 0x60000b80, 0xfffffffe, 0xffffffff) + + TEST_PASSFAIL +