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: 1467954 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=qg5j9pPo; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FP8xs3w9Lz9vFF for ; Tue, 20 Apr 2021 00:55:29 +1000 (AEST) Received: from localhost ([::1]:49050 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lYVJ8-0002za-SI for incoming@patchwork.ozlabs.org; Mon, 19 Apr 2021 10:55:27 -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-Google-Smtp-Source: ABdhPJx+6wr4ze4OHgLKHdR21xOi/HgNALDa24qliHssL0BKtfx/oYO7NvPoGkhgwcIQ05er+6YcFQ== 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_?= =?utf-8?q?Benn=C3=A9e?= , aurelien@aurel32.net Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.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(+) 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: 1467955 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=ZH4KduCB; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FP8xt5lcLz9tkF for ; Tue, 20 Apr 2021 00:55:30 +1000 (AEST) Received: from localhost ([::1]:49118 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lYVJA-00031e-Rv for incoming@patchwork.ozlabs.org; Mon, 19 Apr 2021 10:55:28 -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-Google-Smtp-Source: ABdhPJyWiS/BpXIG8FnLbsAACFbP0o4/rRZWui65sHPVRjeyGKQB+5cj+Z9hn4Pk4ZVyZNOJtzJLLA== 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+incoming=patchwork.ozlabs.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 Reviewed-by: Willian Rampazzo --- tests/docker/docker.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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: 1467956 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=Hy8rdEtJ; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FP8y55zzWz9tkF for ; Tue, 20 Apr 2021 00:55:41 +1000 (AEST) Received: from localhost ([::1]:49282 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lYVJL-00035l-S0 for incoming@patchwork.ozlabs.org; Mon, 19 Apr 2021 10:55:39 -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-Google-Smtp-Source: ABdhPJwOPv4ieRJgQRoUvzUIUDsMVYGduZ3GRDVHJBlvZ+pZMaunCza+iXc8HstwXttCrSUk8mM4ig== 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" We're going to extend the abilities of the command shortly. Signed-off-by: Alex Bennée Reviewed-by: Willian Rampazzo --- v2 - fix indention issue --- tests/docker/Makefile.include | 2 +- tests/docker/docker.py | 56 ++++++++++++++++++----------------- 2 files changed, 30 insertions(+), 28 deletions(-) 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: 1467960 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=GwRCwpNr; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FP9162mzTz9tkF for ; Tue, 20 Apr 2021 00:58:18 +1000 (AEST) Received: from localhost ([::1]:57960 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lYVLs-0006jH-A2 for incoming@patchwork.ozlabs.org; Mon, 19 Apr 2021 10:58:16 -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-Google-Smtp-Source: ABdhPJym8ubzHi3pXo60tXca+HSIbulUopXb/G/nOz4MCnj46wx1gOCP/WpYxn/TwqtDPIWz5VR6Lg== 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+incoming=patchwork.ozlabs.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 Reviewed-by: Willian Rampazzo --- tests/docker/docker.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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: 1467957 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=g1+DkCbm; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FP9131zCsz9vFF for ; Tue, 20 Apr 2021 00:58:14 +1000 (AEST) Received: from localhost ([::1]:57584 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lYVLo-0006aS-Q1 for incoming@patchwork.ozlabs.org; Mon, 19 Apr 2021 10:58:12 -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-Google-Smtp-Source: ABdhPJwJWYo6noWwwBfYU4ZbO3yxXM4GkTYgjuJquKWnaecpO/QWpb4slVxiM7j09V442Z+m3G7lOQ== 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+incoming=patchwork.ozlabs.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 Reviewed-by: Willian Rampazzo --- tests/docker/docker.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) 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: 1467966 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=NBubwI5r; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FP9833XSNz9vFB for ; Tue, 20 Apr 2021 01:04:18 +1000 (AEST) Received: from localhost ([::1]:46546 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lYVRg-0005VB-Dg for incoming@patchwork.ozlabs.org; Mon, 19 Apr 2021 11:04:16 -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-Google-Smtp-Source: ABdhPJwT+DTnO+3RDvI3QVpMYP3FwQp42WWKCGFGIkBBxFHoZxa9PaiPAvcVP6v6JSz2mkAapvW/ZQ== 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+incoming=patchwork.ozlabs.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 Reviewed-by: Willian Rampazzo Tested-by: Philippe Mathieu-Daudé --- 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 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: 1467959 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=CEWgJ2Jy; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FP9135dG1z9tkF for ; Tue, 20 Apr 2021 00:58:15 +1000 (AEST) Received: from localhost ([::1]:57582 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lYVLp-0006aP-Eg for incoming@patchwork.ozlabs.org; Mon, 19 Apr 2021 10:58:13 -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-Google-Smtp-Source: ABdhPJzYg9g0qH4xZt52YoSdxkokzx7kINkpjTLyztMrwuO1RTtS9meCfjxs6UWl1kMaSFIdZnQm/A== 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+incoming=patchwork.ozlabs.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> Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé --- tests/tcg/configure.sh | 4 ++++ 1 file changed, 4 insertions(+) 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: 1467958 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=R7KuBGii; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FP9131wVtz9vFB for ; Tue, 20 Apr 2021 00:58:14 +1000 (AEST) Received: from localhost ([::1]:57482 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lYVLn-0006Xz-Rv for incoming@patchwork.ozlabs.org; Mon, 19 Apr 2021 10:58:11 -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-Google-Smtp-Source: ABdhPJyxtCniDEU04d3gU68aogxemhsuSVQRPEK/Mxa4NctaBirEuQeWuBFvKjSoETPKd1LKhk7oag== 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+incoming=patchwork.ozlabs.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> Reviewed-by: Willian Rampazzo Tested-by: Philippe Mathieu-Daudé --- .gitlab-ci.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) 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: 1467965 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=tSIgzlJq; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FP98320rLz9vDV for ; Tue, 20 Apr 2021 01:04:18 +1000 (AEST) Received: from localhost ([::1]:46514 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lYVRg-0005UF-0U for incoming@patchwork.ozlabs.org; Mon, 19 Apr 2021 11:04:16 -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-Google-Smtp-Source: ABdhPJwW/9VLqRDiLh/GdI8JVt59ACnWfBEf/fdRpc1mCQTJRLXrxriRiEKU5/wkdmuODWJpdOsvMg== 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+incoming=patchwork.ozlabs.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(-) 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: 1467962 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=zTpkU3y2; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FP93s2W8kz9vFK for ; Tue, 20 Apr 2021 01:00:41 +1000 (AEST) Received: from localhost ([::1]:37840 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lYVOA-0001YP-1f for incoming@patchwork.ozlabs.org; Mon, 19 Apr 2021 11:00:38 -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-Google-Smtp-Source: ABdhPJzUpmbN0BROpNKYJG1hV5UgvrzkCxNf0FHKQt0UZVmtRP44WLLIJnirhAOOtZK2dxovGh04Dw== 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=C3=A9e?= , aurelien@aurel32.net Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.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> Reviewed-by: Willian Rampazzo Reviewed-by: Philippe Mathieu-Daudé --- tests/docker/dockerfiles/alpine.docker | 1 + tests/docker/dockerfiles/centos8.docker | 1 + tests/docker/dockerfiles/fedora.docker | 1 + 3 files changed, 3 insertions(+) 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: 1467963 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=YUZww236; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FP93s1ZY2z9vFF for ; Tue, 20 Apr 2021 01:00:40 +1000 (AEST) Received: from localhost ([::1]:37948 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lYVO8-0001ae-5W for incoming@patchwork.ozlabs.org; Mon, 19 Apr 2021 11:00:38 -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-Google-Smtp-Source: ABdhPJzoiOR6QO8/4AOlZEzxr+Of8Vu2QRstzFsPouBgF6H92bO54nV7ybusSriJEY9fjP2ysChCxw== 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_?= =?utf-8?q?Benn=C3=A9e?= , aurelien@aurel32.net Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.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 Reviewed-by: Philippe Mathieu-Daudé --- tests/tcg/Makefile.qemu | 15 +++++++++++++++ tests/tcg/configure.sh | 17 ++++++++++++++++- 2 files changed, 31 insertions(+), 1 deletion(-) 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: 1467964 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=GFN1+Rn2; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FP94B06dPz9vDV for ; Tue, 20 Apr 2021 01:00:58 +1000 (AEST) Received: from localhost ([::1]:38320 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lYVOR-0001kW-Vw for incoming@patchwork.ozlabs.org; Mon, 19 Apr 2021 11:00:56 -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-Google-Smtp-Source: ABdhPJxu5ieH9wMljB0q4uOzAxCzIxMVCmsBi3qcZLZgN++XgkzcBXyNLESWP2nQUe43AXo+6HzXdg== 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_?= =?utf-8?q?Benn=C3=A9e?= , aurelien@aurel32.net Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.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(-) 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: 1467970 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=IynC/fJ8; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FP9Cq1fddz9vFB for ; Tue, 20 Apr 2021 01:07:35 +1000 (AEST) Received: from localhost ([::1]:55362 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lYVUr-00018M-7d for incoming@patchwork.ozlabs.org; Mon, 19 Apr 2021 11:07:33 -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-Google-Smtp-Source: ABdhPJxkm4c+Qpz6GixVuuarSttRhNsijoHcMiZh4feJZ9EOlxRqw/ibGW0o+RPL+7nuu1TOv7Nahg== 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_?= =?utf-8?q?Benn=C3=A9e?= , aurelien@aurel32.net Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.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 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: 1467969 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=BBbsJudp; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FP9Cq308Yz9vFF for ; Tue, 20 Apr 2021 01:07:35 +1000 (AEST) Received: from localhost ([::1]:55402 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lYVUr-00019W-Do for incoming@patchwork.ozlabs.org; Mon, 19 Apr 2021 11:07:33 -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-Google-Smtp-Source: ABdhPJxeyRkj5yJaEJtpW92vFT5Ras8EtYmSYa4V2c4CU8gD0fVJi6c1RtsHB2SK91KG1VMQHk8+Ag== 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_?= =?utf-8?q?Benn=C3=A9e?= , aurelien@aurel32.net Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.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 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: 1467961 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=rAGg1mbh; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FP93s2YVxz9vFL for ; Tue, 20 Apr 2021 01:00:40 +1000 (AEST) Received: from localhost ([::1]:37906 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lYVOA-0001Zi-1W for incoming@patchwork.ozlabs.org; Mon, 19 Apr 2021 11:00:38 -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-Google-Smtp-Source: ABdhPJzdCI6sdAadj29X663VhGXgNJbXK7E6DJvYG5Oto+MajwbfE48yxPmxrKIYtZ6bj6YZOjCV7g== 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_?= =?utf-8?q?Benn=C3=A9e?= , aurelien@aurel32.net Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.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(+) 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: 1467972 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=WS5Pisyn; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FP9GJ5XQGz9vFB for ; Tue, 20 Apr 2021 01:09:44 +1000 (AEST) Received: from localhost ([::1]:34976 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lYVWw-0004se-ND for incoming@patchwork.ozlabs.org; Mon, 19 Apr 2021 11:09:42 -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-Google-Smtp-Source: ABdhPJwRRcV9PE9zbQlYNTkkwhs5he0v6h8BdsbNvh6bJlCE8ddQg0o/dPv2W16KZt5pKoYBK1tpUw== 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_?= =?utf-8?q?Benn=C3=A9e?= , aurelien@aurel32.net Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.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 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: 1467978 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=He7q4Lde; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FP9L510SJz9vFB for ; Tue, 20 Apr 2021 01:13:01 +1000 (AEST) Received: from localhost ([::1]:44838 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lYVa7-0000Z3-3V for incoming@patchwork.ozlabs.org; Mon, 19 Apr 2021 11:12:59 -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-Google-Smtp-Source: ABdhPJyHvvY8tUPAOmFlxNl6MG/874Oz1OdSciWyVu0F2gAlnB7ls3O2JbudeoFURsDqYtOL/RAgNg== 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_?= =?utf-8?q?Benn=C3=A9e?= , aurelien@aurel32.net Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.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 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: 1467973 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=izUhUH+2; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FP9H03LkCz9vFB for ; Tue, 20 Apr 2021 01:10:20 +1000 (AEST) Received: from localhost ([::1]:35990 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lYVXW-0005LI-HF for incoming@patchwork.ozlabs.org; Mon, 19 Apr 2021 11:10:18 -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-Google-Smtp-Source: ABdhPJyrEGdPjb0kBe+iImVUUo14QwQen6UhA4s997SvB8QhOSO/Nd5mV6Cjl/A1i0BPspvFxX4A0Q== 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_?= =?utf-8?q?Benn=C3=A9e?= , aurelien@aurel32.net Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.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 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: 1467977 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=IpLd9meR; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FP9Kz6SK4z9vFB for ; Tue, 20 Apr 2021 01:12:55 +1000 (AEST) Received: from localhost ([::1]:44418 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lYVa1-0000Of-Ta for incoming@patchwork.ozlabs.org; Mon, 19 Apr 2021 11:12:53 -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-Google-Smtp-Source: ABdhPJzcOQRLFGstVtbtdEYUjHGOz2uz7mAOnTtsi6BmA15ruy8dxG5WaFyIfdc5FWB6efdgF/QYwA== 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_?= =?utf-8?q?Benn=C3=A9e?= , aurelien@aurel32.net Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.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 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: 1467971 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=SxQkKmej; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FP9FM03DJz9vFB for ; Tue, 20 Apr 2021 01:08:54 +1000 (AEST) Received: from localhost ([::1]:60326 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lYVW8-0003fS-Vd for incoming@patchwork.ozlabs.org; Mon, 19 Apr 2021 11:08:53 -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-Google-Smtp-Source: ABdhPJxLpJh8e9dfL2LoIN6D4GGkMqQJnFa7+8RS+yDwHpLTBbqTNOEAOaGDedF91Sfw/SFMJgtuLA== 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_?= =?utf-8?q?Benn=C3=A9e?= , aurelien@aurel32.net Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.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 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: 1467968 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=Zv5ZkP5X; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FP9Cf6D3Wz9vFB for ; Tue, 20 Apr 2021 01:07:26 +1000 (AEST) Received: from localhost ([::1]:54514 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lYVUi-0000lp-Jj for incoming@patchwork.ozlabs.org; Mon, 19 Apr 2021 11:07:24 -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-Google-Smtp-Source: ABdhPJyZuMmBfxX7/L+kogTOEkZ8UpedyahmbWjhxDQ3jciTGupTfmtqgLbv+z9fwWBxCMVdrbXAXA== 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_?= =?utf-8?q?Benn=C3=A9e?= , aurelien@aurel32.net Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.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 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: 1467976 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=SPFlB0VO; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FP9KX6kjwz9vFF for ; Tue, 20 Apr 2021 01:12:32 +1000 (AEST) Received: from localhost ([::1]:43576 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lYVZe-0008Uy-U8 for incoming@patchwork.ozlabs.org; Mon, 19 Apr 2021 11:12:30 -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-Google-Smtp-Source: ABdhPJzUAne4evCRi9h3rCiq/Jn896RfYtK4Y1R1c+j1QOP50Mq4xt2bS39b6gAM5EYj7S8FWu3XEw== 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_?= =?utf-8?q?Benn=C3=A9e?= , aurelien@aurel32.net Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.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 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: 1467980 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=QbYi5lur; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FP9PB5WwJz9vFF for ; Tue, 20 Apr 2021 01:15:42 +1000 (AEST) Received: from localhost ([::1]:53078 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lYVci-000418-Oj for incoming@patchwork.ozlabs.org; Mon, 19 Apr 2021 11:15:40 -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-Google-Smtp-Source: ABdhPJyC55ZpUwzE9rwFEuTfcHhB+hOU7SYSWsEqc7OzK7UcIyH6qVfmNmZmwzV1qbSi6TeKg9L7mg== 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_?= =?utf-8?q?Benn=C3=A9e?= , aurelien@aurel32.net Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.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 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: 1467967 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=ioKvt+Tx; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FP9BG4CXmz9vFB for ; Tue, 20 Apr 2021 01:06:13 +1000 (AEST) Received: from localhost ([::1]:51706 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lYVTX-0007pW-0B for incoming@patchwork.ozlabs.org; Mon, 19 Apr 2021 11:06:11 -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-Google-Smtp-Source: ABdhPJzdFVyV648lYxdRgeu+socrhqK6vdtouUKuGEBHWj3GmtR1rWmDmVLnJImlSBzaBApGQBT2VQ== 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_?= =?utf-8?q?Benn=C3=A9e?= , aurelien@aurel32.net Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.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 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: 1467975 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=gU4dBrQC; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FP9JP2Y8sz9vFB for ; Tue, 20 Apr 2021 01:11:33 +1000 (AEST) Received: from localhost ([::1]:40610 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lYVYh-0007Iv-C3 for incoming@patchwork.ozlabs.org; Mon, 19 Apr 2021 11:11:31 -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-Google-Smtp-Source: ABdhPJwKO5ct+j+EugkEfW+ejnz9H08RwqU/OYuKi8CEfGMQulYfPLX8Sq+quDrqkSHLI6c/U3AzUw== 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_?= =?utf-8?q?Benn=C3=A9e?= , aurelien@aurel32.net Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.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 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 +