From nobody Sat May 18 23:44:09 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1621268091; cv=none; d=zohomail.com; s=zohoarc; b=fq69t3NnJ9PuT2e/7MSzS86OPx7gptIqkoy/CFKZP6XoVbSdPwYeGxE1ge70OWxUOafmOlTv4H5eJPAfGQxrZtCqJd1mmTULqrym5t0PkO3a9pp3tnPLhTmA9mxB/fyFXeOWptm08BtByFJJb7Gk16DRPau+zMmLl+GNW+sQhW8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621268091; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=xSw+oi8MLoOzgRk09Ky3eK57lKOiggJ0N972/xwvHIQ=; b=dYRj1JwtQbd9tbLXLvJXETra8Bbhkv0j1woqKxQinEPh67hAgiC1cqRfxspkUF2NLQfmZ2RoN99NuHRSKa5n6/y3Rxus6cICAKv+xdXBcTC9N53Tr3S1cWABqXmcX3UP5bKh0HhSybmvl882wz+8k61IIuzPXpZtI6jA7asGH6s= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1621268091814835.773912121283; Mon, 17 May 2021 09:14:51 -0700 (PDT) Received: from localhost ([::1]:45194 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1liftJ-000880-LY for importer@patchew.org; Mon, 17 May 2021 12:14:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56438) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lifp8-0007GC-HN for qemu-devel@nongnu.org; Mon, 17 May 2021 12:10:30 -0400 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]:43774) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lifp5-0005q1-1N for qemu-devel@nongnu.org; Mon, 17 May 2021 12:10:30 -0400 Received: by mail-wm1-x32f.google.com with SMTP id b19-20020a05600c06d3b029014258a636e8so3929981wmn.2 for ; Mon, 17 May 2021 09:10:26 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id o11sm3613813wrq.93.2021.05.17.09.10.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 May 2021 09:10:23 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 1DB201FF87; Mon, 17 May 2021 17:10:23 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=xSw+oi8MLoOzgRk09Ky3eK57lKOiggJ0N972/xwvHIQ=; b=JN1KAQLaTNP151E9NIl4mWhbWmcj2ADi2gvAX9S/8hwKRM21YmgfMZ80G0oj/ky9X9 gfMKy/Ltewne+pZbftRWIEEVnsbQ25ahAbPLhitsp2i62WkVLkinVtkR5WVwaQkUga4s DVVVem52/MQgckqrXogbpvAYbZERwkOZbOEndm9tZaCMsTy/fRWjjm3kMe9zZfUCV53E SHEPRW1ZCkNWN2efbx+KwLgmuNhLRNsb+dTk/SrgEzH6WCAeWtj8z40Inaj140qR2qdP K1DGByfAYTSZNmmR4DFB9ZnBBfQnlbIlbcvp5Hk3ahgqyEp6+zoBrz/4KBtyyk3KebvN GhbQ== 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=xSw+oi8MLoOzgRk09Ky3eK57lKOiggJ0N972/xwvHIQ=; b=Jm5AWkekvY+SLXKUwZlK4DV1PCyR/ocobEP4aPPRkApfyBVWhOplAOz2LxrQCIFNUm hNGrNmXKjVyWW9h47kyIvgDiQy9OEmmTjVFRvC/jPgjBb8uCM4Qh3i6puqrYg+g3+AQq y5hRX2EurXEwUEF+jurCQ4yeiV3kRmjXD2UtKusD/4GcZ6ri4AAElOMwXE8OEtjGGlpc C7mdZu3U8Qns1YgyoWktOeSeM4ath4FQ1vNDcXirvaJt46voKZDzckPzFeE005DRkXIK OsyNo1JFGTGlxeX+L12hlLuVpXnUl7DiCwqZo1RFJY9yjSKWu2fFmDMl868WputKtcZa eXSQ== X-Gm-Message-State: AOAM531YJhH8ntqcUJnJdBhlRdfrqOkfahob1LJzJJOUPYcE9pUQpCTE 7inBiSFfQpnSDnb4p2nPCAGIXw== X-Google-Smtp-Source: ABdhPJzxzlBmyozwi5uezuF0Pb8haN3IxZornQMrkZWrNSWfaYbwdagX3ojOxt0h1dKW06c3eDAhyQ== X-Received: by 2002:a7b:c091:: with SMTP id r17mr647836wmh.85.1621267825395; Mon, 17 May 2021 09:10:25 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 01/29] tests/docker: fix copying of executable in "update" Date: Mon, 17 May 2021 17:09:54 +0100 Message-Id: <20210517161022.13984-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210517161022.13984-1-alex.bennee@linaro.org> References: <20210517161022.13984-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32f; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32f.google.com X-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: Thomas Huth , qemu-devel@nongnu.org, Wainer dos Santos Moschetta , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Willian Rampazzo , =?UTF-8?q?Alex=20Benn=C3=A9e?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) We have the same symlink chasing problem when doing an "update" operation. Fix that. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Willian Rampazzo Inspired-by: 5e33f7fead ("tests/docker: better handle symlinked libs") Message-Id: <20210512102051.12134-3-alex.bennee@linaro.org> 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 =3D _get_so_libs(args.executable) if libs: for l in libs: - tmp_tar.add(os.path.realpath(l), arcname=3Dl) + so_path =3D os.path.dirname(l) + name =3D os.path.basename(l) + real_l =3D os.path.realpath(l) + try: + tmp_tar.add(real_l, arcname=3D"%s/%s" % (so_path, name= )) + except FileNotFoundError: + print("Couldn't add %s/%s to archive" % (so_path, name= )) + pass =20 # Create a Docker buildfile df =3D StringIO() --=20 2.20.1 From nobody Sat May 18 23:44:09 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1621268064; cv=none; d=zohomail.com; s=zohoarc; b=Q7AFtsLznopSqxzabespIBQCnmj9Xtskeebr6IX5lP7fBh/vgwBU95NtGeuVTed+Fe+tqFijane6riX1EQBsI/Muwz9cc4vUCsSRmQyPgHnk/FbJDNkKfHmZDiceXZXnd59DcPgkc1v3ilhMo+tXlQMDRdtE2mZurCRhas7a2qo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621268064; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=2w+lSoGUeb8mcgLQ+RwoP+3nXJnqsEfRl/hSUtUI2kg=; b=mrP8ZXkhJSgD2DN7hrf+b3EV+n6He5i5BngkjQjKBCIkUTCCOtB3Hb1fBi6cnResSXK5LM5n+F62KQyfiE30GCKYGIqv01Wk3wlzb6miYNKbu764MPgQmw/HwVOX8Fh5ZxE2O14mJJqjxD/5nGZrv7qqD5OP6M3gjK2ogGeS9Ho= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1621268064593329.86862418911016; Mon, 17 May 2021 09:14:24 -0700 (PDT) Received: from localhost ([::1]:42348 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lifss-0006DG-Jh for importer@patchew.org; Mon, 17 May 2021 12:14:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56450) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lifp9-0007HU-1Z for qemu-devel@nongnu.org; Mon, 17 May 2021 12:10:31 -0400 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]:45882) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lifp6-0005tp-QD for qemu-devel@nongnu.org; Mon, 17 May 2021 12:10:30 -0400 Received: by mail-wm1-x329.google.com with SMTP id s5-20020a7bc0c50000b0290147d0c21c51so3920615wmh.4 for ; Mon, 17 May 2021 09:10:28 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id r11sm12029418wrp.46.2021.05.17.09.10.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 May 2021 09:10:23 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 36DCA1FF8C; Mon, 17 May 2021 17:10:23 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=2w+lSoGUeb8mcgLQ+RwoP+3nXJnqsEfRl/hSUtUI2kg=; b=UC7KpDFhJ78bOWVkqXOpjsLrb2eJ8qr83DdSdBiu5Z/HWxWMDv1L2OFExJYZ0/Lu6Q cKwSX7DybMXspWqhMDqESzUh8ok6u5HCywYMcvPELXH22U3kjMELAAzMh8/zmlL2sfIT iDgLgRuyOLHG6mL7abgwHpSTZ+O+72rD5ejpCP/HRSPC85rSws0pCIkco7pRFyWIXPak v5GiPMHN9maoBmxLqXTHjZCUETa1uoPudvK2KPIiHh58Fm04G2KB44wayVKdTsMWw8fZ R4xW2CXC2T/gNt3UCmDdB1tm8O17hktw1rOOoawbh1haMzbuDPoUPb7xEA2mJHu6rQxy 9Qtw== 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=2w+lSoGUeb8mcgLQ+RwoP+3nXJnqsEfRl/hSUtUI2kg=; b=OpWpZ1C+JXOcYo61/f6ZnRZ4BM3g7O5gfT2UoFlnTKhTSZWx4jAZ6LegXFCJbx2Czr mVNVGSd81giLUYDyW963ycpf3x/SC3uyyBLV5l8ktTBBWA4h8+YVIoYuLr8Bp2mCDlju s55vF+62GuLFdcM7NNNG2NM+SUSYNqvS/Dyo1BFdNE1yq1rBU140EGDL30NEjLLaffw1 KA/o+08H+vlijX0A2T5UoyDq54wR+i5P7+w/DQ4ikf6Ml2AXqwjKPh9PJyha+7FMvsN+ Kf2Ylg76DqUscS8ktd2tCTT1YyaYjD7T/WAH84y+YrNGODTe5ACtRR/mFdx7UHhinDq5 H+Vg== X-Gm-Message-State: AOAM530Q1E48YX3ouraBdW6/aAxvnAoIzVQ9QqDWo1FNHpYnku8g1UnH lEe0nXR8cVLX/pnNE+7ULw33Ww== X-Google-Smtp-Source: ABdhPJzcyjF1u4RjzfqIMoV/S8r/N8hO6rCAQTsxrb2i2urWaeVLS8F9DLgV4iP60pd5Wjd81QlHJw== X-Received: by 2002:a1c:e156:: with SMTP id y83mr608422wmg.89.1621267827471; Mon, 17 May 2021 09:10:27 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 02/29] tests/docker: make executable an optional argument to "update" Date: Mon, 17 May 2021 17:09:55 +0100 Message-Id: <20210517161022.13984-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210517161022.13984-1-alex.bennee@linaro.org> References: <20210517161022.13984-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::329; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x329.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: Thomas Huth , qemu-devel@nongnu.org, Wainer dos Santos Moschetta , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Willian Rampazzo , =?UTF-8?q?Alex=20Benn=C3=A9e?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) We're going to extend the abilities of the command shortly. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Willian Rampazzo Message-Id: <20210512102051.12134-4-alex.bennee@linaro.org> 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=3D"Image Tag") - parser.add_argument("executable", + parser.add_argument("--executable", help=3D"Executable to copy") =20 def run(self, args, argv): @@ -532,35 +532,37 @@ def run(self, args, argv): tmp =3D tempfile.NamedTemporaryFile(suffix=3D"dckr.tar.gz") tmp_tar =3D TarFile(fileobj=3Dtmp, mode=3D'w') =20 - # 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 =3D _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=3Dff) - - # Add any associated libraries - libs =3D _get_so_libs(args.executable) - if libs: - for l in libs: - so_path =3D os.path.dirname(l) - name =3D os.path.basename(l) - real_l =3D os.path.realpath(l) - try: - tmp_tar.add(real_l, arcname=3D"%s/%s" % (so_path, name= )) - except FileNotFoundError: - print("Couldn't add %s/%s to archive" % (so_path, name= )) - pass - # Create a Docker buildfile df =3D 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 =3D _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=3Dff) + + # Add any associated libraries + libs =3D _get_so_libs(args.executable) + if libs: + for l in libs: + so_path =3D os.path.dirname(l) + name =3D os.path.basename(l) + real_l =3D os.path.realpath(l) + try: + tmp_tar.add(real_l, arcname=3D"%s/%s" % (so_path, = name)) + except FileNotFoundError: + print("Couldn't add %s/%s to archive" % (so_path, = name)) + pass + + df.write(u"ADD . /\n") =20 df_bytes =3D BytesIO(bytes(df.getvalue(), "UTF-8")) =20 --=20 2.20.1 From nobody Sat May 18 23:44:09 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1621268267; cv=none; d=zohomail.com; s=zohoarc; b=UMFP6/2JmKHs/PA8lm8HBf0ZBbF/YAa9+lOJ2aDE5VVJ+GBNrpcZ2E6PVGizefjhZPH2vlnoExyUkQr4eKXdjho82ITbotu8Y7HHWo5J3sgLQs8DXhhC0aSpBnAipY5Nm0HhCXP4l2W1Ya7GFzwdlnYhC/yQHSqzlMdB/1Hd9Es= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621268267; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=4anbRy9FviqkY8a40nrkWVmNlHFbOTFzQrhdJnRiGmo=; b=mhOYZ+VHkRoxdsp9OfiEaFnl/CqTmEP6T2Mhp35G8jBSHW5qoLlLT9eulxGz9nkemKR/dOGIqeAgSr4Ws8TSdh5kZMqobwHPP7HTtjKP2kK/3D9X6S3kzinPA227UJgNGzRlWXKozWdburTcUh4hAAZJkiTbfyguJ+5+f8/RhJs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 16212682669938.920866236072698; Mon, 17 May 2021 09:17:46 -0700 (PDT) Received: from localhost ([::1]:51616 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lifw9-0004Df-3c for importer@patchew.org; Mon, 17 May 2021 12:17:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56476) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lifpA-0007KZ-7k for qemu-devel@nongnu.org; Mon, 17 May 2021 12:10:32 -0400 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]:45777) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lifp7-0005ue-If for qemu-devel@nongnu.org; Mon, 17 May 2021 12:10:31 -0400 Received: by mail-wr1-x432.google.com with SMTP id h4so6982479wrt.12 for ; Mon, 17 May 2021 09:10:29 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id h14sm488057wmb.1.2021.05.17.09.10.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 May 2021 09:10:27 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 4EDC61FF8F; Mon, 17 May 2021 17:10:23 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=4anbRy9FviqkY8a40nrkWVmNlHFbOTFzQrhdJnRiGmo=; b=L2Hj3uu7QaFy58CFLBAx+cwEsGdP7c2BHHyypLdfGb/iRj4x9NLRLvu9htIwosKqwi nn9amdVgnS1W1aqCCG7NUT7iahvX0i5Ac350GCwienQ3nNfCGPu8Xwlm0MdnrB8E/Kq8 BBhBhC7Eccygdxg/Eb3uym64g0ONh8yZA9mveuV84jOyhkdPdNQTat2KyhyrbH6e3uLE 7TFu/C+xprKPitYo5HxwR7PP+l2PASGupkIEJdR4cN9bDYsBWkkffSfFrX2nKaiA+l7h zfW/JXybJIreC6e4hNpaHLUet5tJB+ROVMrnX+CamFGJNl9vUcHL4l55Ud0UyCh3z8J9 iwjQ== 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=4anbRy9FviqkY8a40nrkWVmNlHFbOTFzQrhdJnRiGmo=; b=ntSCTgUCIpOlSFKmjgX7G19CsUINtJ5cjlthuYzHRK3VK5/e5k/hf7R1E6N40KmQwj 5z2Gy/u0AJTV3vImTg7eKRd1Mj3unduYoybVDO4yM/uUxPW2O18X/RyseoVEsSVFcEdN OOq62rM63/ym5Uu9hKrlJ4eG+hUj6iESklZkm5M3TYEYo601VUDir83kC4+Y+JeQb9Rz KQypD56CxiGucs4nqRXTFtxfTXTPePcdcJRucYkr7DqMCI4FIYIsTWlrLUWjcA+Xa+C0 73Nq49Bp8fXih017jja7jwehnX99KnsmEav4E004hM44bVatKdX2i4hx4OgjQLm3PwJN cTFQ== X-Gm-Message-State: AOAM533ujf2wjC9vDIiFTlID/ZMsWZ0iFSoTcv69QaiSS35ykQ3oVs3E wsxcaVz0/6lz9hauR+AU6v+z2A== X-Google-Smtp-Source: ABdhPJwoBpsGxRWYkC+l8DIMVcCHE+8yMaLRnnH5thyFOPAEHhJvE8rLCDZk0DGKWgiKlvhMU4Ii/w== X-Received: by 2002:a05:6000:551:: with SMTP id b17mr540007wrf.32.1621267828193; Mon, 17 May 2021 09:10:28 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 03/29] tests/docker: allow "update" to add the current user Date: Mon, 17 May 2021 17:09:56 +0100 Message-Id: <20210517161022.13984-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210517161022.13984-1-alex.bennee@linaro.org> References: <20210517161022.13984-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::432; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x432.google.com X-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: Thomas Huth , qemu-devel@nongnu.org, Wainer dos Santos Moschetta , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Willian Rampazzo , =?UTF-8?q?Alex=20Benn=C3=A9e?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) 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=C3=A9e Reviewed-by: Willian Rampazzo Message-Id: <20210512102051.12134-5-alex.bennee@linaro.org> 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): =20 =20 class UpdateCommand(SubCommand): - """ Update a docker image with new executables. Args: """ + """ Update a docker image. Args: """ name =3D "update" =20 def args(self, parser): @@ -525,6 +525,9 @@ def args(self, parser): help=3D"Image Tag") parser.add_argument("--executable", help=3D"Executable to copy") + parser.add_argument("--add-current-user", "-u", dest=3D"user", + action=3D"store_true", + help=3D"Add the current user to image's passwd= ") =20 def run(self, args, argv): # Create a temporary tarball with our whole build context and @@ -564,6 +567,13 @@ def run(self, args, argv): =20 df.write(u"ADD . /\n") =20 + if args.user: + uid =3D os.getuid() + uname =3D 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 =3D BytesIO(bytes(df.getvalue(), "UTF-8")) =20 df_tar =3D TarInfo(name=3D"Dockerfile") --=20 2.20.1 From nobody Sat May 18 23:44:09 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1621268381; cv=none; d=zohomail.com; s=zohoarc; b=KAWIcSil0lThk05jIL8hlhpxnmZAtvbtaSBsueVm90nNkv7KfgHBJmfXAIXZ5QJDdKe/IfoRBY/2qHHKa3vZ9YNIRPVa4ZVKtYjYrTXO5nbS7Kf7EhdAs920Vg4CwGfdZSqgfsAadjBL7cinDq0B41gJ8bGJhX1cxs3S87b1PK8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621268381; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=uUMKiPKMAS7O1QKMD26oNu3/VNnJ7Kibrl6YvpCZrWU=; b=DGdjscsNPbaPNWWEN1Gt+/qvHNWi0X4gqNrx/qfVxQCO/PRysEs+eGeCGcuiffrjlyHSH9+RRlmWMBGJTa3aubClxWeeknW9OdCQAa/KMJU0jRRyt4YT8c7R0IQxN6jeJSVagCiFm0fzji21iczUPasy7Z+rOL1SskWNP6rW7T8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1621268381586642.543051665871; Mon, 17 May 2021 09:19:41 -0700 (PDT) Received: from localhost ([::1]:58132 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lifxz-0000KL-Q0 for importer@patchew.org; Mon, 17 May 2021 12:19:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56508) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lifpB-0007NQ-NY for qemu-devel@nongnu.org; Mon, 17 May 2021 12:10:34 -0400 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]:45770) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lifp9-0005yE-If for qemu-devel@nongnu.org; Mon, 17 May 2021 12:10:33 -0400 Received: by mail-wr1-x42a.google.com with SMTP id h4so6982606wrt.12 for ; Mon, 17 May 2021 09:10:31 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id f7sm14896092wmq.30.2021.05.17.09.10.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 May 2021 09:10:27 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 65E1C1FF90; Mon, 17 May 2021 17:10:23 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=uUMKiPKMAS7O1QKMD26oNu3/VNnJ7Kibrl6YvpCZrWU=; b=JAx6hmmRmYi4Gg34VzXPFAKHVTHLMKGhQaB8C7EbsSTOrVqrwXzBe1zQsCT8gyIhH4 boWYo020crllYJPBfyIFejhnjUCgVRxukKE/AiRba+yam+VaQLwhrEb8bFxlGtmDLtrR RbgNRrgfZcc8uDHoLAxzdq910O5kwYqMaUcMSwtpYVPdC7prW4cIRAiKy6YoTroxjRDI 3WB6Vaw0LcRpdU1qzr+6Ag/xLx5rcssnYGVna94W32rFTVcblSqO58ExaQjrlXILpIqe jU1eZILtcPBY1MRaRiCD+pefm2TuJjeGN5V4xL9ZPSCCjeVDppyCmeFkPcq0zaSeCdbv veJg== 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=uUMKiPKMAS7O1QKMD26oNu3/VNnJ7Kibrl6YvpCZrWU=; b=CSlmSzPiInSh9XzPR2xh3Z7z7Q6NqyHZFWydIMpQwIbd+ToDWmYxxUI3MPYXto5Rz0 xLOAaFyGxLleknVvB38Fz4cSmh09aP6WxwfsJmoKFEGlEwhKEvVd2xTNjCL6ur1tZsLm O4GieY6FOJPbjzE4n+ke+4Hb5c/KVMPc75qno3VTa+pPBOEdFpuhYqBIyE6vIwJnrKTD FX11kcJDa3yYG8iofUcfr5wx2vc8KqUvjqYq9qsQYXDgoRqFyQW9lqH6Oi1922jO5c06 Katu60eOF0muZ5Apa3vJAvLw7luF/cSsjiaD/0z3v4RgMs921zcG5NGpECH5fbt4zQrw viVA== X-Gm-Message-State: AOAM5306WEO1HafE/8ASzmyGs20sjriuUiYPf0HEZoYrSzOg81XJYk6l 7gDJFgDNxlkUmv1sTLnm/mPFVw== X-Google-Smtp-Source: ABdhPJwHO3l6JkDuZqbXABrWyLRxfeFDW5zp+W0DUBSM6JGF6RZyRy3UsI8TejXr29jxLg6usr0lVA== X-Received: by 2002:a5d:64e5:: with SMTP id g5mr557215wri.30.1621267830225; Mon, 17 May 2021 09:10:30 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 04/29] tests/docker: add "fetch" sub-command Date: Mon, 17 May 2021 17:09:57 +0100 Message-Id: <20210517161022.13984-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210517161022.13984-1-alex.bennee@linaro.org> References: <20210517161022.13984-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42a; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42a.google.com X-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: Thomas Huth , qemu-devel@nongnu.org, Wainer dos Santos Moschetta , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Willian Rampazzo , =?UTF-8?q?Alex=20Benn=C3=A9e?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) This simply wraps up fetching a build from the registry and tagging it as the local build. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Willian Rampazzo Message-Id: <20210512102051.12134-6-alex.bennee@linaro.org> 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): =20 return 0 =20 +class FetchCommand(SubCommand): + """ Fetch a docker image from the registry. Args: """ + name =3D "fetch" + + def args(self, parser): + parser.add_argument("tag", + help=3D"Local tag for image") + parser.add_argument("registry", + help=3D"Docker registry") + + def run(self, args, argv): + dkr =3D Docker() + dkr.command(cmd=3D"pull", quiet=3Dargs.quiet, + argv=3D["%s/%s" % (args.registry, args.tag)]) + dkr.command(cmd=3D"tag", quiet=3Dargs.quiet, + argv=3D["%s/%s" % (args.registry, args.tag), args.tag]) + =20 class UpdateCommand(SubCommand): """ Update a docker image. Args: """ --=20 2.20.1 From nobody Sat May 18 23:44:09 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1621268196; cv=none; d=zohomail.com; s=zohoarc; b=del8PZq4lmTBI2X1I9xeWtSX9dnKq3fsXNZZmEcRt7xYYDtrl0hFPG6ujs6wsFCZ9xxeUftTIvA1c4rulYurhunoYsGwYVLtv0kPiQnKvdhdZNKnM1pgOCLvvai2EUsQaQok78mWPqZHDO+rwBFqdwDFwslxeQ7SXND15KlgtRs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621268196; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=8rfnchD5SVmgU5vx+Rd3nLxyXpMSnbLzOfkJSsDmY2E=; b=TJ+4lwDsuyUd9GuXLc3a2BVvwD/lRPeaK4tLLgUq+CbSVAQARqLccnmeO4RvSrWe6ZzvF33+7Jxct3AmzkNlEx5zT0VBRSrBLocEKaH2kx+KkoQ9FiIZPchyUj7Kp6Sp5+PB265GfCqcZpjR1qiQ8x5Y8vKIo2TpRD1LKdAxUTQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1621268196444117.75864692902132; Mon, 17 May 2021 09:16:36 -0700 (PDT) Received: from localhost ([::1]:48618 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lifv0-00027x-38 for importer@patchew.org; Mon, 17 May 2021 12:16:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56646) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lifpU-0007Ua-8s for qemu-devel@nongnu.org; Mon, 17 May 2021 12:10:55 -0400 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]:37883) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lifpD-00061w-FT for qemu-devel@nongnu.org; Mon, 17 May 2021 12:10:47 -0400 Received: by mail-wr1-x42f.google.com with SMTP id q5so7020357wrs.4 for ; Mon, 17 May 2021 09:10:34 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id i11sm18318413wrq.26.2021.05.17.09.10.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 May 2021 09:10:27 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 846021FF91; Mon, 17 May 2021 17:10:23 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=8rfnchD5SVmgU5vx+Rd3nLxyXpMSnbLzOfkJSsDmY2E=; b=ZgjcyiX5iozkT1sQY69udHEGh4oY5tzQ1eNgXiBeTvP0IOr06jvzh7mKW4RAmgufyd EzU7sECOIFisv+WcWLSgtsd6Tmp+Wdb+Kcpm63li9cOTMHMOmjjr/qRPDsVf88ytEqJV fevEVh7vp736a0kpchNoLSTxD3MDnS6bRTE/sioKzmad7uPkhOxU46Adaecy6jluiby7 dZ7Vo/TpQtNgtKd7KS/xbs3pV3S72itrVhGa3iNcLF/D5/mZ1toqIUwzN4BhVkVg0Rcp W/yg59A/7KiWJj+07BqWZEuHgGdbUmOMNG3tk3vhbAwLzNZaPRgOiC22VE35mgqZIsyv /MVw== 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=8rfnchD5SVmgU5vx+Rd3nLxyXpMSnbLzOfkJSsDmY2E=; b=Z79i+Bw+5odiosufVAx/QzvnCcj31bfp22VN1Y4DhgcRCRzA6ghm/eIKf0Di9t+s3R 3aH5bSPY9ibevYo6cw7qXLTYpXAZjWs01K/UAl7oH51xyCUiH5OPH5lCfWOsnDistyi+ kXo7uJhwSrHves4IAQ+ByeiPt2EHt+QpqvfPRNwMtwPY/5zgSTF2N09sH1ARLY0RsrAp Buh1c2G6oq6DLex0B4nyiSvLli/UdW8m6eejgqWMglj2/0CzempvCsA1+XCkiXlIJivk OxGaik80N2MPF1KkaNp+3jQXOPe1gLWNS11PnRpvOQcWhkMkSQKhia4K6w5xSYqqnFKu lsRQ== X-Gm-Message-State: AOAM533I7zUaP40xEcL1dhumABFMs/0x8QEDydJpNdw3JIcQSH2zKOeP vsYJYY0ZiSu3JwyQCjyV6yH2jA== X-Google-Smtp-Source: ABdhPJxyL223HTtDrLpNzSRMqAPKebELmV1DRVJBM//nORMSwhks0qt8cFtsRU09ByXdA58+EICmZQ== X-Received: by 2002:a5d:46c5:: with SMTP id g5mr515406wrs.33.1621267833877; Mon, 17 May 2021 09:10:33 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 05/29] docker: Add Hexagon image Date: Mon, 17 May 2021 17:09:58 +0100 Message-Id: <20210517161022.13984-6-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210517161022.13984-1-alex.bennee@linaro.org> References: <20210517161022.13984-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42f.google.com X-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: Alessandro Di Federico , Brian Cain , Thomas Huth , qemu-devel@nongnu.org, Wainer dos Santos Moschetta , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Willian Rampazzo , =?UTF-8?q?Alex=20Benn=C3=A9e?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) 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=3D1 NOCACHE=3D1 J=3D30 docker tag qemu/debian-hexagon-cross registry.gitlab.com/qemu-project/qem= u/qemu/debian-hexagon-cross docker push registry.gitlab.com/qemu-project/qemu/qemu/debian-hexagon-cro= ss 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=C3=A9e Tested-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Willian Rampazzo Cc: Alessandro Di Federico Cc: Philippe Mathieu-Daud=C3=A9 Cc: Brian Cain Message-Id: <20210512102051.12134-7-alex.bennee@linaro.org> diff --git a/MAINTAINERS b/MAINTAINERS index 78561a223f..7572859317 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 =20 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 =20 +# +# 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-cros= s.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/d= ocker/dockerfiles/debian-hexagon-cross.docker new file mode 100644 index 0000000000..d5dc299dc1 --- /dev/null +++ b/tests/docker/dockerfiles/debian-hexagon-cross.docker @@ -0,0 +1,45 @@ +# +# 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=3Dnoninteractive apt install -yy eatmydata && \ + DEBIAN_FRONTEND=3Dnoninteractive 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/bfcd21876adc3498= 065e4da92799f613e730d475.tar.gz +ENV MUSL_URL https://github.com/quic/musl/archive/aff74b395fbf59cd7e93b369= 1905aa1af6c0778c.tar.gz +ENV LINUX_URL https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.6.18.ta= r.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/sourc= es.list +# Install QEMU build deps for use in CI +RUN apt update && \ + DEBIAN_FRONTEND=3Dnoninteractive apt install -yy eatmydata && \ + DEBIAN_FRONTEND=3Dnoninteractive eatmydata apt install -yy git ninja-b= uild && \ + DEBIAN_FRONTEND=3Dnoninteractive eatmydata \ + apt build-dep -yy --arch-only qemu +COPY --from=3D0 /usr/local /usr/local +ENV PATH $PATH:/usr/local/bin/ diff --git a/tests/docker/dockerfiles/debian-hexagon-cross.docker.d/build-t= oolchain.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-toolchai= n.sh @@ -0,0 +1,141 @@ +#!/bin/bash + +set -e + +BASE=3D$(readlink -f ${PWD}) + +TOOLCHAIN_INSTALL=3D$(readlink -f "$TOOLCHAIN_INSTALL") +ROOTFS=3D$(readlink -f "$ROOTFS") + +TOOLCHAIN_BIN=3D${TOOLCHAIN_INSTALL}/bin +HEX_SYSROOT=3D${TOOLCHAIN_INSTALL}/hexagon-unknown-linux-musl +HEX_TOOLS_TARGET_BASE=3D${HEX_SYSROOT}/usr + +function cdp() { + DIR=3D"$1" + mkdir -p "$DIR" + cd "$DIR" +} + +function fetch() { + DIR=3D"$1" + URL=3D"$2" + TEMP=3D"$(readlink -f "$PWD/tmp.tar.gz")" + wget --quiet "$URL" -O "$TEMP" + cdp "$DIR" + tar xaf "$TEMP" --strip-components=3D1 + rm "$TEMP" + cd - +} + +build_llvm_clang() { + fetch "$BASE/llvm-project" "$LLVM_URL" + cdp "$BASE/build-llvm" + + cmake -G Ninja \ + -DCMAKE_BUILD_TYPE=3DRelease \ + -DCMAKE_INSTALL_PREFIX=3D${TOOLCHAIN_INSTALL} \ + -DLLVM_ENABLE_LLD=3DON \ + -DLLVM_TARGETS_TO_BUILD=3D"Hexagon" \ + -DLLVM_ENABLE_PROJECTS=3D"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=3D${HEX_SYSROOT} +EOF +} + +build_clang_rt() { + cdp "$BASE/build-clang_rt" + cmake -G Ninja \ + -DCMAKE_BUILD_TYPE=3DRelease \ + -DLLVM_CONFIG_PATH=3D"$BASE/build-llvm/bin/llvm-config" \ + -DCMAKE_ASM_FLAGS=3D"-G0 -mlong-calls -fno-pic --target=3Dhexagon-unkn= own-linux-musl " \ + -DCMAKE_SYSTEM_NAME=3DLinux \ + -DCMAKE_C_COMPILER=3D"${TOOLCHAIN_BIN}/hexagon-unknown-linux-musl-clan= g" \ + -DCMAKE_ASM_COMPILER=3D"${TOOLCHAIN_BIN}/hexagon-unknown-linux-musl-cl= ang" \ + -DCMAKE_INSTALL_PREFIX=3D${HEX_TOOLS_TARGET_BASE} \ + -DCMAKE_CROSSCOMPILING=3DON \ + -DCMAKE_C_COMPILER_FORCED=3DON \ + -DCMAKE_CXX_COMPILER_FORCED=3DON \ + -DCOMPILER_RT_BUILD_BUILTINS=3DON \ + -DCOMPILER_RT_BUILTINS_ENABLE_PIC=3DOFF \ + -DCMAKE_SIZEOF_VOID_P=3D4 \ + -DCOMPILER_RT_OS_DIR=3D \ + -DCAN_TARGET_hexagon=3D1 \ + -DCAN_TARGET_x86_64=3D0 \ + -DCOMPILER_RT_SUPPORTED_ARCH=3Dhexagon \ + -DLLVM_ENABLE_PROJECTS=3D"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=3D${TOOLCHAIN_BIN}/hexagon-unknown-linux-musl-clang \ + CROSS_COMPILE=3Dhexagon-unknown-linux-musl \ + LIBCC=3D${HEX_TOOLS_TARGET_BASE}/lib/libclang_rt.builtins-hexagon.a \ + CROSS_CFLAGS=3D"-G0 -O0 -mv65 -fno-builtin -fno-rounding-math --target= =3Dhexagon-unknown-linux-musl" \ + ./configure --target=3Dhexagon --prefix=3D${HEX_TOOLS_TARGET_BASE} + PATH=3D${TOOLCHAIN_BIN}:$PATH make CROSS_COMPILE=3D 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=3D../build-linux ARCH=3Dhexagon \ + KBUILD_CFLAGS_KERNEL=3D"-mlong-calls" \ + CC=3D${TOOLCHAIN_BIN}/hexagon-unknown-linux-musl-clang \ + LD=3D${TOOLCHAIN_BIN}/ld.lld \ + KBUILD_VERBOSE=3D1 comet_defconfig + make mrproper + + cd "$BASE/build-linux" + make \ + ARCH=3Dhexagon \ + CC=3D${TOOLCHAIN_BIN}/clang \ + INSTALL_HDR_PATH=3D${HEX_TOOLS_TARGET_BASE} \ + V=3D1 \ + headers_install +} + +build_musl() { + cd "$BASE/musl" + make clean + CROSS_COMPILE=3Dhexagon-unknown-linux-musl- \ + AR=3Dllvm-ar \ + RANLIB=3Dllvm-ranlib \ + STRIP=3Dllvm-strip \ + CC=3Dclang \ + LIBCC=3D${HEX_TOOLS_TARGET_BASE}/lib/libclang_rt.builtins-hexagon.a \ + CFLAGS=3D"-G0 -O0 -mv65 -fno-builtin -fno-rounding-math --target=3Dhex= agon-unknown-linux-musl" \ + ./configure --target=3Dhexagon --prefix=3D${HEX_TOOLS_TARGET_BASE} + PATH=3D${TOOLCHAIN_BIN}/:$PATH make CROSS_COMPILE=3D 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 --=20 2.20.1 From nobody Sat May 18 23:44:09 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1621268351; cv=none; d=zohomail.com; s=zohoarc; b=IHZd9+xXIRfOmdZkm9ZWwUNiZJPvgIAeCva7X/xU9VvpmcI8EWSlmAx16oERmldymD9aJN60Na6hsDZUyOGQ913HLFrQDuVQg5BPJPqF1dcNsDZOemtudsNpVUKhVJubCif4IvWvLKU9y+Qs7V9W6zkhliWzDOFTqa3qnO+p7hU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621268351; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=8WpVHuD4UB9TOqFcf5IX/GBrauc6iTp1wyZlgKWXCkQ=; b=A5fLB3Maa3e+5jMSQKcj7/KBfSLpR2kDbnM3XAHRrj4QrIkhd9k2dtYjSdkGM/DEp9p8/0uhq1RjkM+wUyKuPTw2kF129/kIXBsEgtSX/HL7UrLJJfgXFiEh7/f/QfauemfLZi2JF14IWqE0MctutiUCwtdOVjcve68Vtes/s34= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1621268351006133.72582073365368; Mon, 17 May 2021 09:19:11 -0700 (PDT) Received: from localhost ([::1]:55810 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lifxV-00078k-26 for importer@patchew.org; Mon, 17 May 2021 12:19:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56678) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lifpa-0007Xc-9G for qemu-devel@nongnu.org; Mon, 17 May 2021 12:10:58 -0400 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]:43865) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lifpH-000636-CB for qemu-devel@nongnu.org; Mon, 17 May 2021 12:10:57 -0400 Received: by mail-wr1-x42c.google.com with SMTP id p7so3279533wru.10 for ; Mon, 17 May 2021 09:10:37 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id e10sm18282107wrw.20.2021.05.17.09.10.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 May 2021 09:10:27 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 9BA7E1FF92; Mon, 17 May 2021 17:10:23 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=8WpVHuD4UB9TOqFcf5IX/GBrauc6iTp1wyZlgKWXCkQ=; b=KYVwM8F97qIUIsPqi26bfep7FzlixrOAqigZZzY8fmb08udEXvRt2TDsTLBQxsjGz4 U08p1SXjGj9LjwiCOMl1XOqyQzhZXZ+Nd5rvvrNyPiCuCgduSvlJh6z+AJtqmZKdyEPe 1IL/z+h1lL8rWcaO6zEm7GuLg0GHu3A4AJsMxYswRn+GeJjecIiARlKPs9bRL2SUjp6p V7PS7ayzSajsq2cLTbfSai0J1t16QMGmletVCGhN9HsQr8eRsmLOUDMhrIyrN+9BU2gy fI3pA/BaM+RmTaaEJoK7uYTnl3/8v2RU2tHzGKveMjZKWT8VeJ9RQO5QkiFj0fezqfch krpA== 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=8WpVHuD4UB9TOqFcf5IX/GBrauc6iTp1wyZlgKWXCkQ=; b=l24SAf4cDVgPYKZYqSQ+p+rW+Zm6id029mgBu1s+S4h6Xy7R1mNULIDLmZ4Cdr7IE8 Adii5lJFefzOSIZJRC4tyS4ETjJKPnJ88uwC7V5hgFIrBUzp+qHfbxkWClJA13ZD/N+k 2Yi6neQkGugNgDtqYWFFXzGy+c+j2Ia1tAgvbiK7CCNWzPGhCMAoYJzAMjkRT/bYT/hI hNe2CCtjcmfHa4oSjkW/xxfmJdKm/7y+15Sy3mYtaHd5rSZH2Kl2h+AEQRQf63VHfFTF /2TC3L8zF8WgVur4iiGsqdkIk7v/4QjYvXkBfdScHSIWH36TdiTrQZicJpRxpmkQYPGT /QTg== X-Gm-Message-State: AOAM532VsQ6lJkUo+sdLTiJheW+Da//hQgw+P50ud1V39+UFth/IZTA6 gmUTA+LIQ89D+ux60/zlLbR7ReYe8+vjjw== X-Google-Smtp-Source: ABdhPJxPV587pbNOjbteeGN/oj6lUks+o3D35+N3j6bo7P/WSluFUO/raK8dqMSzgWbhnR0RFz48Xw== X-Received: by 2002:a5d:4ed1:: with SMTP id s17mr537097wrv.204.1621267836666; Mon, 17 May 2021 09:10:36 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 06/29] tests/tcg: Use Hexagon Docker image Date: Mon, 17 May 2021 17:09:59 +0100 Message-Id: <20210517161022.13984-7-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210517161022.13984-1-alex.bennee@linaro.org> References: <20210517161022.13984-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::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=unavailable 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: Alessandro Di Federico , =?UTF-8?q?Alex=20Benn=C3=A9e?= , qemu-devel@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Alessandro Di Federico [PMD: Split from 'Add Hexagon Docker image' patch] [AJB: add container_hosts] Signed-off-by: Alessandro Di Federico Signed-off-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Alex Benn=C3=A9e Tested-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20210228222314.304787-5-f4bug@amsat.org> Message-Id: <20210512102051.12134-8-alex.bennee@linaro.org> diff --git a/tests/tcg/configure.sh b/tests/tcg/configure.sh index 8f20ce065d..cf6062a15f 100755 --- a/tests/tcg/configure.sh +++ b/tests/tcg/configure.sh @@ -128,6 +128,11 @@ for target in $target_list; do container_image=3Dfedora-cris-cross container_cross_cc=3Dcris-linux-gnu-gcc ;; + hexagon-*) + container_hosts=3Dx86_64 + container_image=3Ddebian-hexagon-cross + container_cross_cc=3Dhexagon-unknown-linux-musl-clang + ;; hppa-*) container_hosts=3Dx86_64 container_image=3Ddebian-hppa-cross --=20 2.20.1 From nobody Sat May 18 23:44:09 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1621268640; cv=none; d=zohomail.com; s=zohoarc; b=Ez05O5bin/LmVeNUgSeSmbC9dphuWA0aNsfvs5+R/yXswmK1EXWUNr89Vgg0aPl5c2oO+o9OdZZpDvXpPud4trdv79GZMCPnqbTwz7jKW/OvzFKmKpPR8U1GfHXSPTy/7CWfP0g/1dMTPuVpld4LgE9LN8sIGpbHe8FlxU5A+9s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621268640; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=PiPNYXgOmLbPMws4gHtVxogCzpWnu6jZf/k608Pm9yg=; b=DLAyDheeh5fG6szGaqI6bFT5GRJbrgpnmWEUxp1t5ZuDoWpY7XG6Ed1eaGJFJhUr+Wnc2xeOZ68S5uJouDBB5fWjds7GAlxAcKA7dY6pFTA3cvKnsSYhosVv1e7G7gL1mCGOrPUHu0GynJ/0X8T2v070dA73jBZOhgPBFgUHvCM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1621268640518865.193424398115; Mon, 17 May 2021 09:24:00 -0700 (PDT) Received: from localhost ([::1]:38056 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lig2A-0006R2-MW for importer@patchew.org; Mon, 17 May 2021 12:23:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56648) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lifpU-0007Ub-9l for qemu-devel@nongnu.org; Mon, 17 May 2021 12:10:55 -0400 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]:37887) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lifpH-00062X-0x for qemu-devel@nongnu.org; Mon, 17 May 2021 12:10:50 -0400 Received: by mail-wr1-x433.google.com with SMTP id q5so7020393wrs.4 for ; Mon, 17 May 2021 09:10:35 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id p2sm12663099wrj.10.2021.05.17.09.10.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 May 2021 09:10:27 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id B71B41FF93; Mon, 17 May 2021 17:10:23 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=PiPNYXgOmLbPMws4gHtVxogCzpWnu6jZf/k608Pm9yg=; b=rH8l4uM3jPu+mjPwHekJj52AaRJKOljROrAOSa6hSQm2iwYU8EFlw1EEkPlGm6gqv6 H7sSaGLpZ4bxbE744R0ftCyoT9snvcL818SzLk8yGalMdZCikSakh/4vpvp6sh0XYNTk 3+B3CgH+4HkXkSevBGRRq/Ff2H5cD3M+0egNXj9rN+LjY37WJbf5ozCFSLVGwm/mKSg5 iUj3H1182vBRlVnFCuN6LmU2XGNHSSo8Rr9UEiV4RgYlGt6MX2XtFH0eBCJXJ0lei3yG nE25m8vmMg+1vikb7JtybvFf13HFuZUpBBeDy83vRQOsS1s/8QnO7iL28aaPh7OuS1pQ x8zw== 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=PiPNYXgOmLbPMws4gHtVxogCzpWnu6jZf/k608Pm9yg=; b=BoBfKwHxMkbaKM1aPhPknkmVcxDF/vFPg37sGX3cwA6EuWeLVerWFHTCYrnD26r0+d fwczwCVCdyvgkhxIxNIu/dXg2rZNju8lF9RYxm41I1uT9QdG9cpIsiet4mWB0sAOO6Sk 2UzVHBLemUxBIiEAyNs4BmYajU48astU9q5pMqEykg/dMNmfQoNVts7CAiDpXNp3dYc1 pDUrJG0YwcJYXJyX8HXkIO7PdyDvDYhEC2dX7uRsu4UZ/CoSgmwfiV2+/yVRqiUwt6iy adc8M5T6WjIbwWGQxxz0exOIU0R6a3bafxJWkyW93xlwFoxZoIrsCmzHa8gLLMI8AKw+ bpsw== X-Gm-Message-State: AOAM5325oIEthJSHsso7zL7FXycVsVdOPFhuug9B1tWrtqIfQ7i3l7BP X4EWD+DiwbONGLabcqu5S2jIvQ== X-Google-Smtp-Source: ABdhPJzM7jDkSuwNUaKMukXTEB34An6L8s+Emf2GDeJiysJjIlLbhnmsm9QegCmlq8c5zS5Lv5Bvog== X-Received: by 2002:a5d:4b08:: with SMTP id v8mr540380wrq.122.1621267834737; Mon, 17 May 2021 09:10:34 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 07/29] tests/docker: Added libbpf library to the docker files. Date: Mon, 17 May 2021 17:10:00 +0100 Message-Id: <20210517161022.13984-8-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210517161022.13984-1-alex.bennee@linaro.org> References: <20210517161022.13984-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::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=unavailable 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: Andrew Melnychenko , qemu-devel@nongnu.org, Wainer dos Santos Moschetta , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Willian Rampazzo , Thomas Huth , =?UTF-8?q?Alex=20Benn=C3=A9e?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) 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=C3=A9e Reviewed-by: Willian Rampazzo Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20210406082947.672708-2-andrew@daynix.com> Message-Id: <20210512102051.12134-11-alex.bennee@linaro.org> diff --git a/tests/docker/dockerfiles/alpine.docker b/tests/docker/dockerfi= les/alpine.docker index 0ac46ddd91..7eeecacc46 100644 --- a/tests/docker/dockerfiles/alpine.docker +++ b/tests/docker/dockerfiles/alpine.docker @@ -20,6 +20,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/dockerf= iles/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/dockerfi= les/fedora.docker index d8fa16372d..0979c0e1f4 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 \ --=20 2.20.1 From nobody Sat May 18 23:44:09 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1621268212; cv=none; d=zohomail.com; s=zohoarc; b=XqckYwTOgj8SrhzLv+aXOSZU0+HN5GTOLQJCMMf+bitT960wpr0+CeU8NOpZ8PLPCEE0lICvutll7GuJZjcqountpJwRyJ1Shzqv7KUNYS5hZc/8tT3DJyV81MMM0Sq4qfrYmXdjY/s71fEFnyZk5HZMulCuM4QFfCAU6Ozayog= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621268212; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=SOwWByj9Hv79uAoR3pk2Na/zMM2B+Ft68GAsD76YMDs=; b=bw4IWu12/HuGdi1GQz1FhlsBvHpBbd3a3kzyXH2QuW5SoqsI6VXtj/xFISREVS3gRp77uZtk7EFFXxYucLuvaOZ8jlleT6bwB3S6PB6DyGvmkigDRjFRknS2f1ed2434InxbYvhj9lSHBdjyUkR7+kOSUknQOx+WOzhG3zlqqsY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1621268212329558.2907797046487; Mon, 17 May 2021 09:16:52 -0700 (PDT) Received: from localhost ([::1]:49472 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lifvG-0002jt-56 for importer@patchew.org; Mon, 17 May 2021 12:16:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56536) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lifpD-0007Og-8o for qemu-devel@nongnu.org; Mon, 17 May 2021 12:10:35 -0400 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]:56273) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lifpA-0005yu-GN for qemu-devel@nongnu.org; Mon, 17 May 2021 12:10:34 -0400 Received: by mail-wm1-x32d.google.com with SMTP id b7so3302951wmh.5 for ; Mon, 17 May 2021 09:10:32 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id g11sm17805818wri.59.2021.05.17.09.10.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 May 2021 09:10:27 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id CDE5B1FF96; Mon, 17 May 2021 17:10:23 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=SOwWByj9Hv79uAoR3pk2Na/zMM2B+Ft68GAsD76YMDs=; b=m5kdpHyuVO9axp0VY4KcVWIAZKdDSOoPpTS5FT6SsGp/fN12q54Nn4g8GytekdU9zB pp2zWoPcJ5djDLV+Wu9LucUT0TU95cXSn7iHvJdrfyZY1kfp/NyeB7c8akzSJUEo//hP 7S2beQU2N2nE3eBGUfELN6rIqBrGv53a1mRMkxLTZuycpN1LM0yYFYl3scR9qLY6W7YU Q2Jwlnr8cmgEFAGYjxtW8zhGfw/Kbx7qrdhoSyKryvso0v8sSX8VCsHlMRgBO2UbxxQT r699VrVQ67knWBTg8GNRWOCaY5C0pcW/foQckM+zMxMZjmT98uKDJ/FO/4BBIh/8LpIz BUrg== 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=SOwWByj9Hv79uAoR3pk2Na/zMM2B+Ft68GAsD76YMDs=; b=KX/9ujvHQyMSjuEkvdgUxMVHOYIpce4S+xwvor7Yfhdx8U6WaZdNyGizZSOnJvZEHY KvoyN6AyPOyUbni6pSgt2TRrkTMQQYqgvWW8e7LXN2yYWSPd3yf6l9H0KCxG8/fuCmgp MpF9J+MQc8Tm7AWf9KCAFYsnG2k5bHTNBDhXSE1pFOeY2PbxBpoyk5N/2VV6JpxbXBas ZctU8ah5KTLUK3QmKOwj577wAvjYMjxehjK1PzPYjupYioP9pNaaDtgmC4fmPhte9/RQ Bspu0ZAv6PkO1W54xZq5coZ0Pv57TwETBOTil6sfeROQnnwzPy8okKAyiSS549WtlMvP tekg== X-Gm-Message-State: AOAM530ksfyjXQxZV9k+Be4m/kwFd8qCjqbFtqybrYWTsCk8sYyLhTM7 YWHdEJZHwXxCEVCvdqsEX8VYOA== X-Google-Smtp-Source: ABdhPJynLjXWbDzshxMVNXnpiV7J/UBqg3Y5eXTqkCmA2wF3+7eLR+jj9O0t6D15JWY0BO8HXvOSTA== X-Received: by 2002:a05:600c:190e:: with SMTP id j14mr371904wmq.145.1621267831082; Mon, 17 May 2021 09:10:31 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 08/29] tests/tcg: Run timeout cmds using --foreground Date: Mon, 17 May 2021 17:10:01 +0100 Message-Id: <20210517161022.13984-9-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210517161022.13984-1-alex.bennee@linaro.org> References: <20210517161022.13984-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32d.google.com X-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: Bastian Koppelmann , =?UTF-8?q?Alex=20Benn=C3=A9e?= , qemu-devel@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Bastian Koppelmann when trying to run successful short tests from the Makefile timeout would n= ot 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, c= hil=E2=80=90 dren of COMMAND will not be timed out Signed-off-by: Bastian Koppelmann Signed-off-by: Alex Benn=C3=A9e Message-Id: <20210305170045.869437-3-kbastian@mail.uni-paderborn.de> Message-Id: <20210512102051.12134-13-alex.bennee@linaro.org> 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 =3D $(if $(V),$1,$(if $(2),@printf " %-7s= %s\n" $2 $3 && $1, @$1)) =20 # $1 =3D test name, $2 =3D cmd, $3 =3D desc ifdef CONFIG_USER_ONLY -run-test =3D $(call quiet-command, timeout $(TIMEOUT) $2 > $1.out,"TEST",$= 3) +run-test =3D $(call quiet-command, timeout --foreground $(TIMEOUT) $2 > $1= .out, \ + "TEST",$3) else -run-test =3D $(call quiet-command, timeout $(TIMEOUT) $2,"TEST",$3) +run-test =3D $(call quiet-command, timeout --foreground $(TIMEOUT) $2,"TES= T",$3) endif =20 # $1 =3D test name, $2 =3D reference --=20 2.20.1 From nobody Sat May 18 23:44:09 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1621267970; cv=none; d=zohomail.com; s=zohoarc; b=SrSR3TEcfYX7AAEfoItFOxNKmaGw8twaVIQMTHrxNaukMcxBKn0uu8KwT74TqBrOwqVGHIIXkbbT3DGOGFgBEN+aDWK26DUKGbweK6cokGpcFXMaX1+Mdkw37AF/RE/JShoTSoX0sp8krLjWjwu4mFHPTWGrPkgrpiMPcNZ/nCs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621267970; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=SN2pEUHlY9UiJaausTK9VQJ7/OcH1YFojzLo0i1fIEQ=; b=h4dW8/wCOyAt4WAJ4QtQ0CpWtLZcvEynVssTA1tdmxxWRKInWFJ4zcP3uDKb4yOKBSJ80hpWe4yOZSADejACzjTQ8KtMO6Nif0pmZ4dmXuqv3DYCRLGOyzRZYcc5N8BcR7AZXmpdyGxRBrz73NL6tbaTXrdjIwVgZzWCQLcaDXA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1621267970814751.9080982566076; Mon, 17 May 2021 09:12:50 -0700 (PDT) Received: from localhost ([::1]:37098 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lifrM-0002CB-OK for importer@patchew.org; Mon, 17 May 2021 12:12:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56688) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lifpa-0007Xs-Bw for qemu-devel@nongnu.org; Mon, 17 May 2021 12:10:58 -0400 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]:46978) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lifpN-00065F-3D for qemu-devel@nongnu.org; Mon, 17 May 2021 12:10:58 -0400 Received: by mail-wm1-x329.google.com with SMTP id h3-20020a05600c3503b0290176f13c7715so2312484wmq.5 for ; Mon, 17 May 2021 09:10:41 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id l22sm20897197wmq.28.2021.05.17.09.10.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 May 2021 09:10:36 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id EAAE81FF98; Mon, 17 May 2021 17:10:23 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=SN2pEUHlY9UiJaausTK9VQJ7/OcH1YFojzLo0i1fIEQ=; b=TxVDft7FpV9158woGT8B3acaklDn3YiPvTTQX4I62uEQ1tCz8ybA/FP4imvUdqF6Bs rLjYA3Jvo4st3NWfZQcOQXIoOiL2W8qW/kuqGxrGuEy5wYwZ9pioJrI6UYcDql7mvlRG LxYnQBCEllbxKTuzxxjLGsqP6VhFvZBo4Kz2Lb5YsiuMbY8fNbsTeB9D0gTxdNSGyeL2 vtLXKh/kQwwk+Vd/DE8sScm2pHzoOYgN+OPQa85Dxzml7z9gMbWqBxNzjLSmCfujnrZw 6sQVcnzaN/qNhebHQfyQ1nL3cm5Ilu0ECXPoHem2C7L/Tjw7Wn4z7rUl3TUoSD2D52xp K9Sg== 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=SN2pEUHlY9UiJaausTK9VQJ7/OcH1YFojzLo0i1fIEQ=; b=kbjumGRlasCFKdMY8nz72NkuVvgpTCAKXFM9bHJU1dJA9MBaq3o3JHoAtXnCQ1/0yE eQcf6Kk3dQOPGm9BW3e38O2mA2v/cEFt7xCZ/Vzah4UM5PjmlHbWJOQ5wY2TXYfn17jk 6FnQLyNjSGghzZpit9pWCqveYbPdD2a61D34izN0gll8obKzGUYpsY2MKAcSA7IAfNuh AeSqv4YjSBtXg8S6EUsoBOFs8j6bNZL3uMGK3Mw5Mpo6gdKBIlQjipvw2xgduPO2CHiV yJ8rw4seOdclGDbDKiJtLGcTzXmv1qjZ5G2Dkf3wwopStALpetM47/iyULZsTNoG4KzF 7N/Q== X-Gm-Message-State: AOAM532XKtKaMfKtmJ1eIUTZ7KrsaI6k2gPvYWfQOhUffdeMwuZoy+1A /ZDN6XVuW+OOnmC+91xaW3K1LA== X-Google-Smtp-Source: ABdhPJzBakEmkVQbd4lKwsgPbMnGHtb0qLVUIQ4ZqjkNDSVxVaGbD1xZqxFiOAGc4P1agWMWuGJ3oA== X-Received: by 2002:a1c:50:: with SMTP id 77mr371044wma.111.1621267840993; Mon, 17 May 2021 09:10:40 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 09/29] hw/tricore: Add testdevice for tests in tests/tcg/ Date: Mon, 17 May 2021 17:10:02 +0100 Message-Id: <20210517161022.13984-10-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210517161022.13984-1-alex.bennee@linaro.org> References: <20210517161022.13984-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::329; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x329.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: Bastian Koppelmann , =?UTF-8?q?Alex=20Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) 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. Signed-off-by: Bastian Koppelmann Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Alex Benn=C3=A9e Message-Id: <20210305170045.869437-4-kbastian@mail.uni-paderborn.de> Message-Id: <20210512102051.12134-14-alex.bennee@linaro.org> diff --git a/include/hw/tricore/tricore_testdevice.h b/include/hw/tricore/t= ricore_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 51658d9e37..b6810e3be0 100644 --- a/hw/tricore/tricore_testboard.c +++ b/hw/tricore/tricore_testboard.c @@ -27,6 +27,7 @@ #include "hw/loader.h" #include "elf.h" #include "hw/tricore/tricore.h" +#include "hw/tricore/tricore_testdevice.h" #include "qemu/error-report.h" =20 =20 @@ -56,6 +57,7 @@ static void tricore_testboard_init(MachineState *machine,= int board_id) { TriCoreCPU *cpu; CPUTriCoreState *env; + TriCoreTestDeviceState *test_dev; =20 MemoryRegion *sysmem =3D get_system_memory(); MemoryRegion *ext_cram =3D g_new(MemoryRegion, 1); @@ -87,6 +89,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); =20 + test_dev =3D 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 =3D machine->ram_size; tricoretb_binfo.kernel_filename =3D machine->kernel_filename; =20 diff --git a/hw/tricore/tricore_testdevice.c b/hw/tricore/tricore_testdevic= e.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 =3D { + .read =3D tricore_testdevice_read, + .write =3D tricore_testdevice_write, + .valid =3D { + .min_access_size =3D 4, + .max_access_size =3D 4, + }, + .endianness =3D DEVICE_NATIVE_ENDIAN, +}; + +static void tricore_testdevice_init(Object *obj) +{ + TriCoreTestDeviceState *s =3D 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[] =3D { + DEFINE_PROP_END_OF_LIST() +}; + +static void tricore_testdevice_class_init(ObjectClass *klass, void *data) +{ + DeviceClass *dc =3D DEVICE_CLASS(klass); + + device_class_set_props(dc, tricore_testdevice_properties); + dc->reset =3D tricore_testdevice_reset; +} + +static const TypeInfo tricore_testdevice_info =3D { + .name =3D TYPE_TRICORE_TESTDEVICE, + .parent =3D TYPE_SYS_BUS_DEVICE, + .instance_size =3D sizeof(TriCoreTestDeviceState), + .instance_init =3D tricore_testdevice_init, + .class_init =3D 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 =3D 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')) =20 --=20 2.20.1 From nobody Sat May 18 23:44:09 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1621268744; cv=none; d=zohomail.com; s=zohoarc; b=UruzkthH4HuVeUhZH7NIjP+CLRtPIlWtW+mT5p0q2udpiOPSR1m1iZm3qrW3pF8X6H+uUlmKPufUosnj08HCF+sBfByhP7AWty96ehAIByuoxkS1eVRF3WVh98bOYJdTquxd+lq6cCOl/+jf2a7AdTwART7OHwdSBqu1tLzATm4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621268744; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=8fhgplKrAIwPeJiS0d/uA6DCmsrrVSQ43uYZZyDSgQE=; b=hTt3ScWqSLy+L6H776nzfAbZMWJJRCkUfejs625+TDsaMxmDrXLMbfj9IvykUyPh+OxlBAi9sz141tpL47yz8iCFWjgGvwvpOpNhNfWR0GNZIaaCsl6daQQcGgM5aczTAB7oUJmG24Hz/ti9usfSVCyMKuohLfbHCUrY8IKjn8s= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1621268744726469.1448120705181; Mon, 17 May 2021 09:25:44 -0700 (PDT) Received: from localhost ([::1]:43392 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lig3r-0001kT-D2 for importer@patchew.org; Mon, 17 May 2021 12:25:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56762) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lifpf-0007iL-0N for qemu-devel@nongnu.org; Mon, 17 May 2021 12:11:03 -0400 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]:40921) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lifpU-00065v-39 for qemu-devel@nongnu.org; Mon, 17 May 2021 12:11:02 -0400 Received: by mail-wr1-x42e.google.com with SMTP id z17so7005449wrq.7 for ; Mon, 17 May 2021 09:10:42 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id c194sm19327185wme.46.2021.05.17.09.10.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 May 2021 09:10:36 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 11BE81FF99; Mon, 17 May 2021 17:10:24 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=8fhgplKrAIwPeJiS0d/uA6DCmsrrVSQ43uYZZyDSgQE=; b=NHnK492dnNSD6JoyPAdMvNzn4LBbBCwjkWVSUOoKJm6PenZpY6BPvaAOdtviOzUHAN PQgt4RiuzEWbNBEL14dB9UXbkHpoTe0NktMrTyN9HyY4riA8frWLHHRD6qvJRbNg9shE nT5F9B2XeQ3tYKzrhMM7uJmw5x9jh8WGAGK8E8sI7APX0OguF9/pbaHpdjD6N8Exm8gE LisSI3+EnoFdhLr6xdDNXiUkBOUtibcJTWGvQiotj+Ed5My+T40ZsTDAU/78nfLGNTtf 8p6c9tvw48eaz1WSJyt20KClxpwf30lQd1ywL2FTuY4l3NguG+uf425T4wXAI5p3+zWc JuAw== 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=8fhgplKrAIwPeJiS0d/uA6DCmsrrVSQ43uYZZyDSgQE=; b=iYvu03dK8HDB6UfWaMsWytaMBBJXoIB7kXtlxO93zNnEk2jZORhtLUVx0Tl3DXdcQn iSKfaC6W45a9lrwQwkR+xRY6FGrqHoKW+baiXAp9hjt6n0qxJmLMNzL7xAOaBJXGM3G0 7G4PF6FRTe6OXlJ17xyZWvogQM7EVpd3gHoIW1dg/eVmHgT0HFRyXc5otZXFPx5XAac+ Je1EPqAAG74kXfDJpLbgHYKXYdtxGvi7D120iRszm1BRyThxXadSAmzfieIDCEwb9tYc PPQYYqGFxlr+HojgzQfP409HKnRoDDquGrAxCST6ZYz15sQXnKG9tcfibNKFGLZOr4IJ tAew== X-Gm-Message-State: AOAM530xr8ixGHZUtIEdLFyQ+wVExBUVS9FBW6i7BrZ6UX95xEKeCcOQ kUvg4d0ixQ+Chz+s8H7un2XXMQ== X-Google-Smtp-Source: ABdhPJx7QDztDi0PFPdazRwlPkmDn7QTEpUg88ASSoRrGBv2quCQT4BnIllqQDDthLE8LbdjVi3jIg== X-Received: by 2002:adf:e944:: with SMTP id m4mr545940wrn.10.1621267842028; Mon, 17 May 2021 09:10:42 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 10/29] tests/tcg/tricore: Add build infrastructure Date: Mon, 17 May 2021 17:10:03 +0100 Message-Id: <20210517161022.13984-11-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210517161022.13984-1-alex.bennee@linaro.org> References: <20210517161022.13984-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42e; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42e.google.com X-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: Bastian Koppelmann , =?UTF-8?q?Alex=20Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Bastian Koppelmann this includes the Makefile and linker script to build all the tests. Signed-off-by: Bastian Koppelmann Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Alex Benn=C3=A9e Message-Id: <20210305170045.869437-5-kbastian@mail.uni-paderborn.de> Message-Id: <20210512102051.12134-15-alex.bennee@linaro.org> diff --git a/MAINTAINERS b/MAINTAINERS index 7572859317..40bba0fc4c 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -349,6 +349,7 @@ S: Maintained F: target/tricore/ F: hw/tricore/ F: include/hw/tricore/ +F: tests/tcg/tricore/ =20 Multiarch Linux User Tests M: Alex Benn=C3=A9e 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 =3D $(SRC_PATH)/tests/tcg/tricore + +LDFLAGS =3D -T$(TESTS_PATH)/link.ld +ASFLAGS =3D + +QEMU_OPTS +=3D -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 =3D 0x80000000, len =3D 15K + data_ram (w!xp): org =3D 0xd0000000, len =3D 130K +} +/* + * Define the sizes of the user and system stacks. + */ +__USTACK_SIZE =3D DEFINED (__USTACK_SIZE) ? __USTACK_SIZE : 1K ; +/* + * Define the start address and the size of the context save area. + */ +__CSA_BEGIN =3D 0xd0000000 ; +__CSA_SIZE =3D 8k ; +__CSA_END =3D __CSA_BEGIN + __CSA_SIZE ; + +SECTIONS +{ + .text : + { + *(.text) + . =3D ALIGN(8); + } > text_ram + + .rodata : + { + *(.rodata) + *(.rodata1) + } > data_ram + + .data : + { + . =3D ALIGN(8) ; + *(.data) + *(.data.*) + . =3D ALIGN(8) ; + __USTACK =3D . + __USTACK_SIZE -768; + + } > data_ram + /* + * Allocate space for BSS sections. + */ + .bss : + { + BSS_BASE =3D . ; + *(.bss) + *(COMMON) + . =3D ALIGN(8) ; + } > data_ram + /* Make sure CSA, stack and heap addresses are properly aligned. */ + _. =3D ASSERT ((__CSA_BEGIN & 0x3f) =3D=3D 0 , "illegal CSA start addres= s") ; + _. =3D ASSERT ((__CSA_SIZE & 0x3f) =3D=3D 0 , "illegal CSA size") ; + +} --=20 2.20.1 From nobody Sat May 18 23:44:09 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1621268830; cv=none; d=zohomail.com; s=zohoarc; b=QdXw5ywk/40rS7vtM1ekw8RGMpQpkbctvXV3dQpSlpWF0hiJxSNzup1HfW8MSGYQpnw86MJ6D0+OaEVu83YU/2PoMVrVwlclroW/u2CuFlU4n5pEYse6AH7Au5M+paC3abqwzUY7ZMpjucnK4SusrqjL+nbcT3S2Ikgu/4MmOHY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621268830; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Agdx3G/Ci/HmPNt/TIfwdrNu8lRgFz7owXgkXOV3/r0=; b=F7Q8O1vIqd9x2j/gv+urGILoeHwfoBW9mk1XmzHFuKXlgjN5ddn8ZSHHw8IXPWA4kCMmlMhTtQVAXoVrWndRE/l79i4KNPQ6PGk5RN0mmI3TUduZGU57KTIt0dJeHuT9Y2CNR4HFpBL2k32bVnlZLYAbNg1WFCjwdJwhEMJZpSM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1621268830602997.1442573039259; Mon, 17 May 2021 09:27:10 -0700 (PDT) Received: from localhost ([::1]:46482 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lig5F-0003vu-GW for importer@patchew.org; Mon, 17 May 2021 12:27:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56664) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lifpY-0007Wf-72 for qemu-devel@nongnu.org; Mon, 17 May 2021 12:10:57 -0400 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]:38659) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lifpJ-00063h-7x for qemu-devel@nongnu.org; Mon, 17 May 2021 12:10:52 -0400 Received: by mail-wr1-x429.google.com with SMTP id j14so5270393wrq.5 for ; Mon, 17 May 2021 09:10:39 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id a16sm6216631wrw.62.2021.05.17.09.10.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 May 2021 09:10:36 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 25D661FF9A; Mon, 17 May 2021 17:10:24 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Agdx3G/Ci/HmPNt/TIfwdrNu8lRgFz7owXgkXOV3/r0=; b=QGzv/rdnDAo9O4hznhQiZnxawH0k2In2lXaWgTi+LGsJyPCvRBYOp4MVFUhHcrfku0 a0Ev0buIbEFJw2xUcoArVlYFkh5JazfUnu0I/56ZAEJGeI/C80Pmc4zWhhCxHRlvZw4/ Og0NecrN5R1OZoftDmFh5KM0WHO0VtMPhU9E6/b9u5bi0H4+C0yuPfUIYatfwsDs74Rx lD7LlGs9Gwax5cTnZj7Ysg6m4nhrPjvOGV04RTvDQrb4aAnaHYMFzvSDRvsRx1ejbR4F U6w7h1dgqfhzOvm6bfJ2UZcl2EdxLYBHOrlPr55NmH6GB6QiSc2BBs8dOrYmRRvKgCtS +mdg== 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=Agdx3G/Ci/HmPNt/TIfwdrNu8lRgFz7owXgkXOV3/r0=; b=VfalFXyocco3IKmEL8l+tP7jIR7y0xhPth84iQKCc8sJZvYC4kePgArDuTQBG3LchQ v1WtjD7T+9gqCeP19pgUT0rYgIJiJCIEGBV/9kYj/07UzbDIQ+66WUfVjgqbzojGx7A5 SB/Xt7i/+gDnlHffQLOuhQ+fizQedEiiJZPV6pch9AST4DbbL+KILpN5JSmvIeWfWPan MbgHpO9ClYutL9VcdhldHDGuJvcXlpmM5+qaGISpn4NpuU4Cmjd12M/sjsicPx6TYCr4 03o73oZqZB6oZejdLX9JKXnC8dWYo5WCeWjWyo408knQ19Q4VerTA2axysZvm+v0PdJv GqGw== X-Gm-Message-State: AOAM531ShXV5TLaevD331mJ9gnZQtXpxHxUtw6N7RQV/wAvn5cVe7/v8 lyX30f1VCuw6Jz5F5/8dgV051o35h0RlmQ== X-Google-Smtp-Source: ABdhPJwfvfeSTq8Ta0sY+REeXlkIMFkKc8CJ9KWzZw2BtZwK0iBAfZZ3UgyBTogAdGp50DBoEN3Pjg== X-Received: by 2002:a5d:4d05:: with SMTP id z5mr485027wrt.127.1621267838383; Mon, 17 May 2021 09:10:38 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 11/29] configure: Emit HOST_CC to config-host.mak Date: Mon, 17 May 2021 17:10:04 +0100 Message-Id: <20210517161022.13984-12-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210517161022.13984-1-alex.bennee@linaro.org> References: <20210517161022.13984-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::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: Bastian Koppelmann , =?UTF-8?q?Alex=20Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) 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=C3=A9e Message-Id: <20210305170045.869437-6-kbastian@mail.uni-paderborn.de> Message-Id: <20210512102051.12134-16-alex.bennee@linaro.org> diff --git a/configure b/configure index 0e4233fd8a..df11c8bad0 100755 --- a/configure +++ b/configure @@ -6164,6 +6164,7 @@ echo "GENISOIMAGE=3D$genisoimage" >> $config_host_mak echo "MESON=3D$meson" >> $config_host_mak echo "NINJA=3D$ninja" >> $config_host_mak echo "CC=3D$cc" >> $config_host_mak +echo "HOST_CC=3D$host_cc" >> $config_host_mak if $iasl -h > /dev/null 2>&1; then echo "CONFIG_IASL=3D$iasl" >> $config_host_mak fi --=20 2.20.1 From nobody Sat May 18 23:44:09 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1621268569; cv=none; d=zohomail.com; s=zohoarc; b=dWrJTBjHoNn2QvbOX+GxIwx/2Xol49sgVPbnDV9Jvkd91ugjNkPpf4iNeINvH4SXprsX+R67iJP6h1G1WiYetP9ecaxBIpzhJxAkhvoAVvtR5mtHq9ACeuBufgkd3qr6K6rwyjO6L+cXZ6desVZFF0l9ocLhMPRcTBuPnaj5Q7M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621268569; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=sLXv4miOw85rWayN8jZNBHnPaB/MX2m95N1aF2nNELo=; b=QI5ymCK2XJOqqCBPKgM0Ki1Sy30dI3CSMAYAFx6F7VdeGU9nQVke8GqOqpR0Gjvofcq1ni11MrF4AsgmeNHKP4HYuRl44DCDBoIeUryLcV73zQNbxzygsQ205hLF4FkYse/tW6xpX/M3RgRrKtnYJrkguQJtw/iNIsE0w4ZQghw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 162126856922874.2860519669457; Mon, 17 May 2021 09:22:49 -0700 (PDT) Received: from localhost ([::1]:34922 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lig11-0004Dj-6f for importer@patchew.org; Mon, 17 May 2021 12:22:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56728) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lifpb-0007bf-LS for qemu-devel@nongnu.org; Mon, 17 May 2021 12:11:01 -0400 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]:34623) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lifpS-00066B-5N for qemu-devel@nongnu.org; Mon, 17 May 2021 12:10:59 -0400 Received: by mail-wr1-x433.google.com with SMTP id r12so7033402wrp.1 for ; Mon, 17 May 2021 09:10:44 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id y20sm456005wmi.0.2021.05.17.09.10.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 May 2021 09:10:36 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 4340E1FF9B; Mon, 17 May 2021 17:10:24 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=sLXv4miOw85rWayN8jZNBHnPaB/MX2m95N1aF2nNELo=; b=s9P0915K7rmHVynL2x7SXPJY9Qf93+ZvL+qQ0lAoH7x4Oyt2MveVHPT8zQnX9sOxnC TTs5uBn/Ee7+ziTdwMmmJiuL6MVQ1+OxNOUZ6ZcUXuyaD7+YnCHyEMud5fegZEDKY5oh rWkWwgKV3E/z6UCBW6mVASkUCDYQ+vgm1id52eTRhkR3UX7auHXCTfmxVs7yBA9B4Kmq bAMTbdZZ0FTZwudmnnketrIyTzNTJ4KFVL+B7zDAokBnuPL4D+yC2DskFnp27yhf0hhc 0+6rMV4wl1P6otNi2IdPQGeVY1BJtVi05+wuJsFUlajviKdQYHWq1oYQ71Qsh4FgLy1j whHA== 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=sLXv4miOw85rWayN8jZNBHnPaB/MX2m95N1aF2nNELo=; b=enVP+DqSR1r/5sPxIGKX38dX8o0mb1J6wnJInO6bNT2a45D+b5SrwL5tCOLtnB+eAV 0NG+WVYNZjElcdeXBq/Ias7PC8kldEPYjXb39fM7k3RzYCCtF3NMPhSY03mLE6ElSATK 9FEkrzfzcP6GYgqLv8IAb5xX0jU4ZS1yL3AJ+YTUTWJX+2MIrUAWqZoTLsbtiMyfgsMS zoyqB9U1hd4RFCp8ef/tA4iIMZssL/Lk2uj/QIkS82uThkEr8Buo6N1xWl1NUl+Utsso NLreRDvg3r8lDc5XTU7Mnfy9/4J8RnhrWO3r+3309Jj8oaTyRDJ90KIguv4oWfaQHivU YfuQ== X-Gm-Message-State: AOAM5327r0Pr8YaG9xylKddEdST2VoctGc2n29UX3XAgwu7RRC6tvJ6x TFS9ZMm1rzKGuGN9dUgnXZz8zOkpA69rUQ== X-Google-Smtp-Source: ABdhPJyzhnYnrb0ivcZi6JhR98/uS3zE8pfB7lc6o4KUSJI4KysoPtq9M88+ascZnC7COa+7OhJTEQ== X-Received: by 2002:a5d:4f03:: with SMTP id c3mr534880wru.158.1621267843758; Mon, 17 May 2021 09:10:43 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 12/29] tests/tcg/tricore: Add macros to create tests and first test 'abs' Date: Mon, 17 May 2021 17:10:05 +0100 Message-Id: <20210517161022.13984-13-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210517161022.13984-1-alex.bennee@linaro.org> References: <20210517161022.13984-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::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: Bastian Koppelmann , =?UTF-8?q?Alex=20Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) 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 co= de. If all tests pass we write back 0 as a status code and exit. [AJB: add container_hosts] Signed-off-by: Bastian Koppelmann Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Alex Benn=C3=A9e Message-Id: <20210305170045.869437-7-kbastian@mail.uni-paderborn.de> Message-Id: <20210512102051.12134-17-alex.bennee@linaro.org> 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 cf6062a15f..d13d2bb388 100755 --- a/tests/tcg/configure.sh +++ b/tests/tcg/configure.sh @@ -203,6 +203,12 @@ for target in $target_list; do container_image=3Ddebian-sparc64-cross container_cross_cc=3Dsparc64-linux-gnu-gcc ;; + tricore-softmmu) + container_hosts=3Dx86_64 + container_image=3Ddebian-tricore-cross + container_cross_as=3Dtricore-as + container_cross_ld=3Dtricore-ld + ;; x86_64-*) container_hosts=3D"aarch64 ppc64el x86_64" container_image=3Ddebian-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 =3D $(SRC_PATH)/tests/tcg/tricore LDFLAGS =3D -T$(TESTS_PATH)/link.ld ASFLAGS =3D =20 +TESTS +=3D test_abs.tst + QEMU_OPTS +=3D -M tricore_testboard -nographic -kernel =20 %.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 --=20 2.20.1 From nobody Sat May 18 23:44:09 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1621268343; cv=none; d=zohomail.com; s=zohoarc; b=IatWcTzBTtuqxRCnJp9SA8jDvMv34yFMz3qV8fgeHICAf6IaOMolgYUtCfmCtdwiOLUJcOhJKc6uWyH6MEg+UN3I3VwyomyP8kfxcVnVrqjuHWGpovLqnftvBZKpUeRe8jfdv5cw5mp34QtjrLRPaYjivF8hvcJieGg40eN2NRI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621268343; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=zqqVEkVFFAX35vmalm2I3V2tABfps9c4RcLK3dBbjx4=; b=APkR8O1jC91aEDKkH13b9mR0wuz+OCYWpXBgiFVKq2sz4EFwOsXy4tUVFJy75lG1KtQyUW5GFOBHmVx29SWVlXqI5R8b46Vru5GSPij4KyA6eg/X2UgDzn1uwMFYLPG7JfMeIM17AjK0XLTuDEN6r6lNvXGYzsExignknF9LtbI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1621268343804454.73030292206806; Mon, 17 May 2021 09:19:03 -0700 (PDT) Received: from localhost ([::1]:55152 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lifxN-0006dO-7C for importer@patchew.org; Mon, 17 May 2021 12:19:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56708) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lifpa-0007ZR-RT for qemu-devel@nongnu.org; Mon, 17 May 2021 12:10:58 -0400 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]:45781) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lifpJ-00064X-88 for qemu-devel@nongnu.org; Mon, 17 May 2021 12:10:58 -0400 Received: by mail-wr1-x434.google.com with SMTP id h4so6983154wrt.12 for ; Mon, 17 May 2021 09:10:40 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id f26sm13801807wmj.30.2021.05.17.09.10.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 May 2021 09:10:36 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 5DA251FF9C; Mon, 17 May 2021 17:10:24 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=zqqVEkVFFAX35vmalm2I3V2tABfps9c4RcLK3dBbjx4=; b=R6l4Og+dx6cpayXEZk0Z2ri5kjCAy3UWqpK0TdkXjCnGANBHk+mFYQQNmXT1I7/WW8 p1h6V5Y2CrUSr8fJJyXYQu5GK3+wdtIoFSfyvcPPcxvbW61L5jaZH/lQnFLqyW2jnXjP Wkhjx2Ec2Ok+ExoX4QHRxuyarzGCAwGpMHPYmYYz64ej0TLVpbBMWtVgeNpGgkXfnJhh tpTtpHvFNb5manR6p/jTYJ90GoQOfjgvzfwTXalTREdw/Zwv0gLXNlf6scqvgc3CDbvj ZKKd0hnWQ43s6PqDcrd8NG0LP7PzMUnoUmy7m7lLVwBdT0rkD6PiIL/4zCBr10+d0ZQZ xJeA== 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=zqqVEkVFFAX35vmalm2I3V2tABfps9c4RcLK3dBbjx4=; b=Pjo6UOHPPTMwjk/kahtzuTaRGBL7izFHEmRL0oVPViP9mQzqyq8Xlh2huD0TL6YHoJ X+/l6L4jqmE+OPdbamjle60VQOADKVnQKSgGpriZLfOtnSWlojrX7tYdMSf6UJ2oQ2qm /Kloeug9BPllNzy8cWg3M0PvgwsZgMHNfp2fx2Hhf8e2fRbADdPQPtU6EOe3bWnz3qzG s70Sjy7BfTJrW/we4nzh+Fq+SjMxI1+PvybIFFIlRqiVg9LrjrVPYZaYBK4jSBj7MVwy p1xUwhi9AN62ZDp+rYgqOjbJ7niu49fiqWSEsUbnpyzKzc4WgvWOJ7i7daa4nbwqqls2 Vnuw== X-Gm-Message-State: AOAM530GKEQ3hUu/1dt2K62yFXmpVajzRGNIUjxZQy4DvO/4aWKQYtNo SwazaY1S2Mc4ooFjifuuHSZtaw== X-Google-Smtp-Source: ABdhPJygfBGB/mDWSR2mUEaYvnX/DOhd+n/ajPX1s5/YJV71viTJtMVYrbVaLSBjxDV5y4qkxVktqw== X-Received: by 2002:adf:f043:: with SMTP id t3mr519846wro.344.1621267839391; Mon, 17 May 2021 09:10:39 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 13/29] tests/tcg/tricore: Add bmerge test Date: Mon, 17 May 2021 17:10:06 +0100 Message-Id: <20210517161022.13984-14-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210517161022.13984-1-alex.bennee@linaro.org> References: <20210517161022.13984-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x434.google.com X-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: Bastian Koppelmann , =?UTF-8?q?Alex=20Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Bastian Koppelmann Signed-off-by: Bastian Koppelmann Signed-off-by: Alex Benn=C3=A9e Tested-by: Alex Benn=C3=A9e Message-Id: <20210305170045.869437-8-kbastian@mail.uni-paderborn.de> Message-Id: <20210512102051.12134-18-alex.bennee@linaro.org> 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 \ =20 +#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; \ ) =20 +#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 =3D -T$(TESTS_PATH)/link.ld ASFLAGS =3D =20 TESTS +=3D test_abs.tst +TESTS +=3D test_bmerge.tst =20 QEMU_OPTS +=3D -M tricore_testboard -nographic -kernel =20 diff --git a/tests/tcg/tricore/test_bmerge.S b/tests/tcg/tricore/test_bmerg= e.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, 0x0000fff= f) + + TEST_PASSFAIL + --=20 2.20.1 From nobody Sat May 18 23:44:09 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1621269222; cv=none; d=zohomail.com; s=zohoarc; b=FJ9N+YeRONhBmnaiOUpeU41ANO05jrprqD2SpTBRl4MRYJbzfbI81Yer99xCFbuXh7zIHsME7C0fVrE39JqPVthrUT197sMclkSJ+Syhbw/2PZ/0QXZajJ0H5fA6yvRIbFSv03c7D+++8XmnfvHeALZbTIvgwhHbxgpuTqqTe3w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621269222; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=/GoNt9HHy9fj7GtsQyqbYSYiaxiEhaVdxxiDzDGgum0=; b=RD+p4DB/y8K9aoeQYnIR/iZaEWWftameJbOel3aiMJBICDiOLc0GB8FIiBopbqTClkEsH9eSrp+s5phRQU58OGIKJ/EYAZgu44dIogdNQ1hUK6FzYTIN96OW+ZuHlG7BYVDVUDykMmDCTAQS0SSH4novH+UKQo/WKE64/seuYjc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1621269222508133.59334890770083; Mon, 17 May 2021 09:33:42 -0700 (PDT) Received: from localhost ([::1]:33158 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ligBZ-0005yN-5H for importer@patchew.org; Mon, 17 May 2021 12:33:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60400) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lifyr-0001sN-Uy for qemu-devel@nongnu.org; Mon, 17 May 2021 12:20:33 -0400 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]:33662) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lifyh-0002C8-Gn for qemu-devel@nongnu.org; Mon, 17 May 2021 12:20:33 -0400 Received: by mail-wm1-x32f.google.com with SMTP id z137-20020a1c7e8f0000b02901774f2a7dc4so231297wmc.0 for ; Mon, 17 May 2021 09:20:22 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id o11sm3643109wrq.93.2021.05.17.09.20.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 May 2021 09:20:14 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 764761FF9D; Mon, 17 May 2021 17:10:24 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=/GoNt9HHy9fj7GtsQyqbYSYiaxiEhaVdxxiDzDGgum0=; b=GCNfcTehREn1MwjgatoRkiVlkWxbEGdqtixlShehgHp9uzreQL0P+X0lxtNQqtK6l+ YjCTAgh0BasUADdpljs7Q7vlx55dbnfgd5vEw5LSeCKM4408IBqjrnzeaj0mrkcEoxoI qYVG7lrEJ3Fv0gfV5met42ZzAA2/w8ymUYc52g2w6ARTkql47J+TQdXOtNfsDItnBsMb XmOXw9s8dr7brzvsNZ8a4k4Hl/eCsucTVQdVPfFJ8z465MLnO0hDjpOVpxDCM1JrrLYh qvHP7UIySzduaxj2ZHTLZAux6eAYYstKACeUgpCCWAePauI4pBatm4tOp2B8kFyv84uv T1jw== 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=/GoNt9HHy9fj7GtsQyqbYSYiaxiEhaVdxxiDzDGgum0=; b=rLmuKuIygIJ5FUihJiGfY767ymr/b0OwosazqoxwbLw09DVl9rSBn9khVWTu31WDQT eSmGNB24q/FHOjgE4tzKAwv/uOrVggf7ZzmTZXsFHd3PyCbJoDs2SFkNMa9okbHL7cRp JasO5ELqrLK5MHjOKlwOHuNHs+TI3H1l21a5yN6NmwvJDS2x8rSFVP4YFkvYmcYa6Ds3 wIroG4KB5zeioAFiIFW4+NnrrScNj+6dH6VX9g2bffp5WcTmgbn8oGrrbPWrEVlxOf5n tSjFjYW9WJLGmiZ4pIbCVcnCgjP2ApnJEEOHtuBgl4lXlNkZ7OiraaBdr9cO9WpTcTnJ LG+Q== X-Gm-Message-State: AOAM53299Ov6x8+9XqluqYq2iZHZi1EO141abJgzWQMt7529s3WA3y5H +9/9X5LWNTohayxHKz4BJVIZwAMPGDn0MA== X-Google-Smtp-Source: ABdhPJzutZw0p1YJo9C8xcJVswO5nLHlgLq/JEkPKoow4pqdSBjje/ahTVYRhdbFHXnIGkY01igfuQ== X-Received: by 2002:a7b:c24a:: with SMTP id b10mr672587wmj.157.1621268422029; Mon, 17 May 2021 09:20:22 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 14/29] tests/tcg/tricore: Add clz test Date: Mon, 17 May 2021 17:10:07 +0100 Message-Id: <20210517161022.13984-15-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210517161022.13984-1-alex.bennee@linaro.org> References: <20210517161022.13984-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32f; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32f.google.com X-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: Bastian Koppelmann , =?UTF-8?q?Alex=20Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Bastian Koppelmann [AJB: dropped duplicate Makefile] Signed-off-by: Bastian Koppelmann Signed-off-by: Alex Benn=C3=A9e Tested-by: Alex Benn=C3=A9e Message-Id: <20210305170045.869437-9-kbastian@mail.uni-paderborn.de> Message-Id: <20210512102051.12134-19-alex.bennee@linaro.org> 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 =3D =20 TESTS +=3D test_abs.tst TESTS +=3D test_bmerge.tst +TESTS +=3D test_clz.tst =20 QEMU_OPTS +=3D -M tricore_testboard -nographic -kernel =20 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 + --=20 2.20.1 From nobody Sat May 18 23:44:09 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1621268765; cv=none; d=zohomail.com; s=zohoarc; b=S8WlBnnFmb6SLwE/p/JW8AOyiIRBjGy1hS20d+UbA1BoQ9UJ+za8Gz6SlgAHXz9CX8uJIRm2uvaZhMvfOlo1I9BZl2gD4AjwJ4cb1KhCG+603q5fJ6s5FjpajsqrWWx4v3sSmzb35B6o7H9NW7O3NJrLmlUIlkg/6FAM1GRVH3A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621268765; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=w/hNpOL3LseeGhFSjqXSpkvVGbd/+PpFDw4qT/V6I3k=; b=GAJHpnBEZz/e7e5ATGN9lgOcodSA1akeFKBfqboAu7RCMB3i5+TE5NcpI664N3L+PgWWBmMDHaYoTtgW/bq12ix3NHpoXw1gmsxEtZOI3P+si7inuhWHZE2w1Gvho+wLBNKcoVvPQq1uzpJICzjolw+onLbhl6fcKHymX11ElZY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1621268765448667.5784785549398; Mon, 17 May 2021 09:26:05 -0700 (PDT) Received: from localhost ([::1]:44492 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lig4C-0002UQ-A2 for importer@patchew.org; Mon, 17 May 2021 12:26:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60304) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lifyk-0001k4-S8 for qemu-devel@nongnu.org; Mon, 17 May 2021 12:20:27 -0400 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]:33771) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lifyZ-000269-2n for qemu-devel@nongnu.org; Mon, 17 May 2021 12:20:25 -0400 Received: by mail-wr1-x42b.google.com with SMTP id n2so7120305wrm.0 for ; Mon, 17 May 2021 09:20:14 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id q13sm16397627wrw.56.2021.05.17.09.20.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 May 2021 09:20:07 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 91C5A1FF9E; Mon, 17 May 2021 17:10:24 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=w/hNpOL3LseeGhFSjqXSpkvVGbd/+PpFDw4qT/V6I3k=; b=tPcvegta0anouMbL3EvCXBbW1M8ZzJZh7Cdl+qwJxAOjZHmJW4wGO8XuiFS+vYi84P fmXEFrFI5Oex7tOrOJG8pWMx000O8hS6d4Zn8k6zoYOnTSEZ6cUOhjxSDzy1yBFBjsDo Nv+ctVaE5JjlMcLTIvn97y+EXGy8zgIuFCArwGigvS2aqalhh5g50x/V+ANlcQrPlrQv EWHK4i3bP2nee/6Jwo9x/DwfzfJNBU1HNlU5jIbcZJhQo95TtxWM5SCr6amgfji9sDTp qgdKoDng1X2wFQ8OPArm1qgsSyatORqFs4KG+QwcLRbV9PYlPnPmTARMMux31lOWh4nz epkA== 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=w/hNpOL3LseeGhFSjqXSpkvVGbd/+PpFDw4qT/V6I3k=; b=TJVuV8V120GeDEweFf3yJXH4h61nDlmQj6TQW+7Cy6TxmhEg+VYw7FX7d+hH/kfq1O 8h7C8rm1A1y+GgzBOrZCu7lFFburb+/Y0PJG2/0yDqIhNldCwYZOYx1uex+J2jBx1/vs FoFdk5O5IDPdJjhwbEqnqeq7532vsKpcs0iTbf+y9Pa4vkbPL3Ze8JOulVNBvOZx9hF6 GcAUrInJdobX14ghgunN4CNE3b9exqkSI+mjtfdK30fZ0rfDrbUnY4SVL/X9liKOXYoN tMroaeTnVFCsB4x3InNPPrvYb46QQcQtkzjKqfgCWYJMRqcg/QAMOL7A5VqDvQFeqe0P jPbQ== X-Gm-Message-State: AOAM533WWiRXWR/1dvvog3uV67etUFbCww2RZmt8i6aeIxnr5yx42hDD aoSIv/TeL+SpW8ttHoYbaL2rOg== X-Google-Smtp-Source: ABdhPJwg5MDPVuaTn8AkV7hzxNPEbhfn10iUOUv0vYKvBtf0mw0NQN9t3+6fsWNFeOV5lw6SFjLomg== X-Received: by 2002:adf:f142:: with SMTP id y2mr558277wro.426.1621268413820; Mon, 17 May 2021 09:20:13 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 15/29] tests/tcg/tricore: Add dvstep test Date: Mon, 17 May 2021 17:10:08 +0100 Message-Id: <20210517161022.13984-16-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210517161022.13984-1-alex.bennee@linaro.org> References: <20210517161022.13984-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::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=unavailable 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: Bastian Koppelmann , =?UTF-8?q?Alex=20Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Bastian Koppelmann Signed-off-by: Bastian Koppelmann Signed-off-by: Alex Benn=C3=A9e Tested-by: Alex Benn=C3=A9e Message-Id: <20210305170045.869437-10-kbastian@mail.uni-paderborn.de> Message-Id: <20210512102051.12134-20-alex.bennee@linaro.org> 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 @@ =20 #define DREG_DEV_ADDR %a15 =20 +#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 \ =20 +#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; \ ) =20 - +#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; \ + ) =20 /* 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 =3D TESTS +=3D test_abs.tst TESTS +=3D test_bmerge.tst TESTS +=3D test_clz.tst +TESTS +=3D test_dvstep.tst =20 QEMU_OPTS +=3D -M tricore_testboard -nographic -kernel =20 diff --git a/tests/tcg/tricore/test_dvstep.S b/tests/tcg/tricore/test_dvste= p.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 + --=20 2.20.1 From nobody Sat May 18 23:44:09 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1621269425; cv=none; d=zohomail.com; s=zohoarc; b=eixVstNOloCxcu8lx72ZJCy44pTdKVxBm7dMWv+UuNM8zt2PVnC3Icn9nKY2ONv1WtwfvV/kWL1IzMESwCNuWMqAJpLfu5xNEVKMhOlxk//0+B0eehuvDyYLI5mSPK37AQZqDiSQB+kxhWGO4sn6Gs+ITieFYokl1UOuiXXoYR8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621269425; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=WvhMIJ7db8pZDvDIWrYxGMRIUJdWESbF5FwiwPU2Dbg=; b=nFEiUpIUcoytRsrQqQbvG/MY+3N8UOdmgospUlzD6jDl1Q3ZMbISV+D4jH43/icYe9PlGlrkguOd/TEOH0mNOlJ9uBoWayQHp6rxbKD+EbdqXXwnk/d+us/1AzTAnSaKa38j3jebSQXz5lkvrn37y4oluwEyG8F/TpC3SemZGFs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1621269425036628.9712572220749; Mon, 17 May 2021 09:37:05 -0700 (PDT) Received: from localhost ([::1]:40890 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ligEp-0003I2-JJ for importer@patchew.org; Mon, 17 May 2021 12:37:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60316) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lifyl-0001kK-0o for qemu-devel@nongnu.org; Mon, 17 May 2021 12:20:27 -0400 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]:33665) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lifyc-00027B-4k for qemu-devel@nongnu.org; Mon, 17 May 2021 12:20:26 -0400 Received: by mail-wm1-x333.google.com with SMTP id z137-20020a1c7e8f0000b02901774f2a7dc4so231171wmc.0 for ; Mon, 17 May 2021 09:20:17 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id s5sm16964991wrw.95.2021.05.17.09.20.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 May 2021 09:20:14 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id A9AF81FF7E; Mon, 17 May 2021 17:10:24 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=WvhMIJ7db8pZDvDIWrYxGMRIUJdWESbF5FwiwPU2Dbg=; b=dHT60kNd+SVrjduazssJnDHHQw7a3MDrC+3FLcujw+d5kyQ8dX+/x9AdTCm0qOx7rV i2A8FzqPoOomMRYRDfBiWwBcdrdGy/F3J1lxB8DuASJg5mVkE28XVo7vQNd5/YDewK/T +hVto37RCFEynoJP8Beu1KGjadqzt5v471UZqCtkTXOmRVaDwXtKzCwmUVWzX49Xmgtj es/vllJGDZScYZGSqTMV/6RClu9pSEt65bT3lzdzI6Z2GSFhB9tn/EpJxdpygMpHLxFB ggK90665csrg+XrEeA/PYEa7SFWiUM5xnNj3vCOT5Omqszj2wbAX+dD58RhnD3copJnr VrVA== 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=WvhMIJ7db8pZDvDIWrYxGMRIUJdWESbF5FwiwPU2Dbg=; b=YLuSnz/0embZbG3mtlClQ5CV7i6Ydxm2zz0MQmVHHQIbrRWQWD2L6P9m844ub5e+TH 19l4dRgu+uDvfvXEZHL9TsbPbiJLtfKM+C1B/hG1cVJl/OgYt9l6GaKmTtpFuiCqKT4t ykIhYUiIhRTMvaBid68BC7kfHYWlJISaV1coTzHMSZkyNZH009A0sJdI4dV4kbaKpv0S t6hQ3MwpeQpNuxEuC3a/ppjJrjy5/CnIVkd1PHXhZjOQKk/9drBamZA3dWUVnQxshSup NWEmk3x8cOomSyVqU3k2iPOfVX6YE3BeIFFSqWSb4j25p2SDq7geRl8YsT6A3rG27PiJ TmzA== X-Gm-Message-State: AOAM5327g9GQ9glQNbUnfbU9BYnr6JwYUfPXK6bkXpoQ1qYFbZYspt8f DEaLgDAk8yh1KqemnRbzoz43LA== X-Google-Smtp-Source: ABdhPJxGoABR3pnNOD9mEgQfjfn188CkF88EB1hIHedNC0OU8arKwmjpm8FywavLdwAeeftcHh6LCQ== X-Received: by 2002:a1c:9d43:: with SMTP id g64mr424019wme.181.1621268416322; Mon, 17 May 2021 09:20:16 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 16/29] tests/tcg/tricore: Add fadd test Date: Mon, 17 May 2021 17:10:09 +0100 Message-Id: <20210517161022.13984-17-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210517161022.13984-1-alex.bennee@linaro.org> References: <20210517161022.13984-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::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: Bastian Koppelmann , =?UTF-8?q?Alex=20Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Bastian Koppelmann Signed-off-by: Bastian Koppelmann Signed-off-by: Alex Benn=C3=A9e Tested-by: Alex Benn=C3=A9e Message-Id: <20210305170045.869437-11-kbastian@mail.uni-paderborn.de> Message-Id: <20210512102051.12134-21-alex.bennee@linaro.org> 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 +=3D test_abs.tst TESTS +=3D test_bmerge.tst TESTS +=3D test_clz.tst TESTS +=3D test_dvstep.tst +TESTS +=3D test_fadd.tst =20 QEMU_OPTS +=3D -M tricore_testboard -nographic -kernel =20 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 + --=20 2.20.1 From nobody Sat May 18 23:44:09 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1621271029; cv=none; d=zohomail.com; s=zohoarc; b=i1ZVMbtt6EuUjRmtCrdYvUQ0mEacrz3z2pqjPQtIJU049Xwa/7RCP0UHMbpMDGVJ0Kl+77PlM5XMn7HYmIGcSKsFpcid7NFv3tlm2L3/eYvJUf4z7QPcnFqCRxHGzQ5JR/VLVPgv6AscnYny+Fk0Lp33R2PVVxSM7cQZy3OAoQ0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621271029; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=uJRixgwKB4R/8PvCfIqI45wxOthEoZS3ugc5iFFCnVo=; b=eJ2oPbMQkEEblu2NqcCkNgA1btzIYmaJ9BV63FEyEbyDyHkYEUxiPTaIRSGl19lJn6TfbtsWX6CdujX4eJH6ifGlTZ4k/fApxDt0qeuOs9bfhLlF288AhudQhWNor+ajzKEUJIMnDuby3Jr04okfavrRsXLkH+t5PmaSYTFE5yQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 16212710292761003.5199034188756; Mon, 17 May 2021 10:03:49 -0700 (PDT) Received: from localhost ([::1]:50672 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ligef-0007mr-TT for importer@patchew.org; Mon, 17 May 2021 13:03:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34496) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lig8B-00045V-UD for qemu-devel@nongnu.org; Mon, 17 May 2021 12:30:13 -0400 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]:46699) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lig8A-0005wu-0l for qemu-devel@nongnu.org; Mon, 17 May 2021 12:30:11 -0400 Received: by mail-wr1-x42c.google.com with SMTP id y14so4993770wrm.13 for ; Mon, 17 May 2021 09:30:09 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id k6sm21072059wmi.42.2021.05.17.09.30.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 May 2021 09:30:07 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id C066B1FF9F; Mon, 17 May 2021 17:10:24 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=uJRixgwKB4R/8PvCfIqI45wxOthEoZS3ugc5iFFCnVo=; b=PN8sbdPzlXbwZvFl69uq2zAZBPXh9fG6DInEihci7gwaH+Y/s978Ji6rsmTpcwcWPj 7bq4DqMwS5OgpvkTLkn6ms1KXehQTDCxqgj+1KwdHfA9VhqEQ+/Exrd4D96aBDYpixHL iALJpTZWIJNfglNIUygYo6/H7m+NNk5fkMYFASizqOV+TEdcaz8OIXyjrURoUjQKA9DF E2NoDmwJk2u/pb/GY4AzJVDcoIWkar23nEj/HOA7wLSJY6UioTx+UtPIvV4wFUu+pUWx /wziwmxvYnswU7Izo+HGV/5pN3LXxOctBHOqnrDM0HCNn/WlmEzuknns2MJa+OEv29sD Oy7w== 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=uJRixgwKB4R/8PvCfIqI45wxOthEoZS3ugc5iFFCnVo=; b=j2yWkOasfxAljYIqp17U6KQq5IhC2n0PGuwkjNJ6WMrvZeXUmI/NIdQHRFWoAV7VWQ 0OSvan6N2KdR5SYqK9c6Mqt2s7Vh/35XebZnNzfMW5STDi6tvnTt4pzPlG3JYwkgn5W9 4oKBa0xTn1W+YoeM+IV2hCYtOYIqZHLBTe5FgK0wUtT6i/eAe0QXd7A8Dw4qHkEWgKov sPU9eHC4/rHi9pwUB4CPPsNXjddjThNhqbtakWI/NwfvxW899sQgOHMrfS/IvLAInq+g zxby0Vy4Hv1jX8gmW45u8+6WuuhUz6WvAblNue2SMZeMnXCv0WKk//qDNgk9Se7KSUKH aloQ== X-Gm-Message-State: AOAM530zaOA/r1ooKlv3/Uer1fKwH4eAx+PAvlK09IUhAy84+yYLFO+i CfLCo5DMiXd/jqyJT7iTbG2ysg== X-Google-Smtp-Source: ABdhPJxyopTihD83XM0rNg8HSkaP+xxdgqrRSEN3C5lqm4rNZUofmrSh1U49S8VxupVw4yyEjukw0A== X-Received: by 2002:a05:6000:18a4:: with SMTP id b4mr635485wri.86.1621269008139; Mon, 17 May 2021 09:30:08 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 17/29] tests/tcg/tricore: Add fmul test Date: Mon, 17 May 2021 17:10:10 +0100 Message-Id: <20210517161022.13984-18-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210517161022.13984-1-alex.bennee@linaro.org> References: <20210517161022.13984-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::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: Bastian Koppelmann , =?UTF-8?q?Alex=20Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Bastian Koppelmann Signed-off-by: Bastian Koppelmann Signed-off-by: Alex Benn=C3=A9e Tested-by: Alex Benn=C3=A9e Message-Id: <20210305170045.869437-12-kbastian@mail.uni-paderborn.de> Message-Id: <20210512102051.12134-22-alex.bennee@linaro.org> 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 +=3D test_bmerge.tst TESTS +=3D test_clz.tst TESTS +=3D test_dvstep.tst TESTS +=3D test_fadd.tst +TESTS +=3D test_fmul.tst =20 QEMU_OPTS +=3D -M tricore_testboard -nographic -kernel =20 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 + --=20 2.20.1 From nobody Sat May 18 23:44:09 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1621268979; cv=none; d=zohomail.com; s=zohoarc; b=VhnmlfOFACEI2nlef710+qaT67qh99WZAMdU/XaYXa6wXQXrWxFggZfX7obKirTKj43AXvYnGDUY4g4RPYdpHBOsZDQDfTLjmJL2ZzwGQrmMvUDOGijz3P2GS+VmsAlWJJXcrurfP6VncsOShwEz70lb4tNGeT1XGEMgCfYvs0M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621268979; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=kfyD+xyRFhNVltAJ3AwK8fH0Q4t00IkcCwNm6Vrvf38=; b=SO/zPTFyTAO33NxixzYg/UKiVUjpsPeVz96NRjeDeUqBQVVaMsRxKG81AyHjU1pUTwxrDN82ZihxntVbXYVIxPm7O4r8x+vdd0PiFGhGRsvRNTENwrZcQgrb26KCO3EBNb8NFEcw8rFOYOEUeTBQFqMW96ZJrP+T+Ge8cSIxiEY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 162126897973988.28313985788009; Mon, 17 May 2021 09:29:39 -0700 (PDT) Received: from localhost ([::1]:54902 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lig7e-0001JE-0z for importer@patchew.org; Mon, 17 May 2021 12:29:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56742) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lifpd-0007d9-Kb for qemu-devel@nongnu.org; Mon, 17 May 2021 12:11:01 -0400 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]:37403) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lifpa-00066I-0U for qemu-devel@nongnu.org; Mon, 17 May 2021 12:11:01 -0400 Received: by mail-wm1-x32d.google.com with SMTP id k5-20020a05600c4785b0290174b7945d7eso3495717wmo.2 for ; Mon, 17 May 2021 09:10:45 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id f12sm11567007wre.88.2021.05.17.09.10.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 May 2021 09:10:43 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id D87981FFA5; Mon, 17 May 2021 17:10:24 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=kfyD+xyRFhNVltAJ3AwK8fH0Q4t00IkcCwNm6Vrvf38=; b=JMkD7NxrH/W1LlwfhXvV8ydJn8DYfs8lCJDO+/rousI3R3LdiLrmWe7NDx/fj6W/JG MKxe4mt/sy+TFuTxxTwYZvwJAPfPOVVGG2aOTh+REDkxxP13ICdOqa8H7L6GKpHlZQB4 t1SHy8bi/nijW/XdnyDfzuGVWtXG6lxulpAv4Zot6kJqjF1zUEkQmS+8MCtD4B1y22Wm KB6Dae4NgVTNM7daO1wBa9q6rFuY1GWSn/5wWO/bTTZmNXWnG1oZVWMHaduKmzYCbg7o rpkuhYZ8fsll/NRu7wEoEdUOFVpPf2kxJ6cLBMqfIMLEZyLvjXhdfErtVdNLwTswQrOc UR0Q== 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=kfyD+xyRFhNVltAJ3AwK8fH0Q4t00IkcCwNm6Vrvf38=; b=rPZyXwfLU4alB6UGVk8u3uxPhLm3dqUbYoL+LWO8YFVd9suMncCOo+McSAov4zLXFI cQhufkx50jYvK+TRZSyqJ+2y5UZTHgevaf0NaSiU+AMlqk6GsIvWt6kISporgM0YeCZ0 8XRSNzbAmx/srnIqbpvmx5a+CUgEQoE+M9kV1EoX8+ScFf7tIcuZM9Jzmd7QW3hrLNdG ac8FVr9xdogrWhc396lxJxP2ssydKhRVZJ4T2QEtguPuBZhrlz2zW7V4ivpPp3V5jLp4 RdroPzUmioxehMnBkNQ0Nimce8kR0QCVFVxMdiJcyy0zzEl50WprdOuu7WZiNprhqqjJ /D5A== X-Gm-Message-State: AOAM530lOr54PpJy7W6M9/cU9YPHGoyZcv8OaluJFUkPTXA5xCFEx7TF qeIViAtF6Sx73RXJRHHFpAb7kg== X-Google-Smtp-Source: ABdhPJz0d62dfkDFmLJSDY1uALM+JbQHacSsFS3pkob3QLBL0R6st99VYhYgvWEdVcnh5pGGJ64X9g== X-Received: by 2002:a7b:c742:: with SMTP id w2mr423553wmk.76.1621267844862; Mon, 17 May 2021 09:10:44 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 18/29] tests/tcg/tricore: Add ftoi test Date: Mon, 17 May 2021 17:10:11 +0100 Message-Id: <20210517161022.13984-19-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210517161022.13984-1-alex.bennee@linaro.org> References: <20210517161022.13984-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32d.google.com X-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: Bastian Koppelmann , =?UTF-8?q?Alex=20Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Bastian Koppelmann Signed-off-by: Bastian Koppelmann Signed-off-by: Alex Benn=C3=A9e Tested-by: Alex Benn=C3=A9e Message-Id: <20210305170045.869437-13-kbastian@mail.uni-paderborn.de> Message-Id: <20210512102051.12134-23-alex.bennee@linaro.org> 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; \ ) =20 +#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 +=3D test_clz.tst TESTS +=3D test_dvstep.tst TESTS +=3D test_fadd.tst TESTS +=3D test_fmul.tst +TESTS +=3D test_ftoi.tst =20 QEMU_OPTS +=3D -M tricore_testboard -nographic -kernel =20 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 + --=20 2.20.1 From nobody Sat May 18 23:44:09 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1621269434; cv=none; d=zohomail.com; s=zohoarc; b=hnpZhsISw5GS35NJsjPHM3t8pXLntQZtU8fYIpSpLAlwxSyGvO4FDaxCS3YKuHW41/tFF8RO6boDzb4mr6ubtRaYuRuABeihJb2jvLahYN+W2T4UfrQnkcA7AU0vcvuFtrffFtfIXbEe62uGA9v9sPoAIEcrt2Jx3jgnnIHxgYo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621269434; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=3tnX1FEG5gAj6hH28VBua+UMBDYi0WyGLJaNygRNlzA=; b=PvGHBN0/4S7dFf83ATv+1JJudXcLkrAsIwLUHHNUtkMjah7CVvfGLkFNpP5nYfo6m+sl0DGf+0gi/H5zHqFoS6HLEd0CoE7BnrI6wk0ILGnKpT4uVjxWhAXrG0OYXWS/i4JHOZEIW9LaVhtNo+E/3jH9/2X6Is8ppTTMw8g2vkY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1621269434308569.0477888844601; Mon, 17 May 2021 09:37:14 -0700 (PDT) Received: from localhost ([::1]:41752 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ligEy-0003rR-Qs for importer@patchew.org; Mon, 17 May 2021 12:37:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60428) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lifys-0001vV-NJ for qemu-devel@nongnu.org; Mon, 17 May 2021 12:20:34 -0400 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]:34711) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lifyk-0002FT-Lz for qemu-devel@nongnu.org; Mon, 17 May 2021 12:20:34 -0400 Received: by mail-wr1-x429.google.com with SMTP id r12so7066401wrp.1 for ; Mon, 17 May 2021 09:20:25 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id f15sm1547426wrs.47.2021.05.17.09.20.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 May 2021 09:20:14 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id F3D1D1FFA6; Mon, 17 May 2021 17:10:24 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=3tnX1FEG5gAj6hH28VBua+UMBDYi0WyGLJaNygRNlzA=; b=iwDQkp+ANBvtY24CZ+m3//tIcKvGrYmaSkNSfPTrbEp/fm2t95fybRIwxzL/IH+RZY hlWxI9geKc8HILNtLS5tewrIsQjgLxgYBoWHkvpDP4FDmuG8P6Yi/vbQG5ohya5MqL6A Pnadjmsp1CLOw8pa5nlQJDQJMaDHRmkyrdRHj3SVL8gbMkEIXM5V8XtegJv3H40Xu7Fb nueq4faU1JVIw5hknOkZVYheQnZRF08a6pcwxtkFUeJZtVUYOuHmf58NcRIUa80bChDk +EFfxTTK6kuwI4L/0ngnORTx41kHb4r06hDsnnKWNplR+rSpxlzDVIenwc4HKbjI59NA vuJg== 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=3tnX1FEG5gAj6hH28VBua+UMBDYi0WyGLJaNygRNlzA=; b=o9e2pG0pcoxbb8KZgiRYaDuAjrTvxncBrjNyotKJInVIpvKbaQP+l4Qy1W4OibIiD2 eM5kffLUSX5cYKDIIl/tkVkNZoIKmjYD+/iNf5/xwtr6IPLTh1CR62B61qpezfZRZl/k xZi4Y9cjBehf34YhZIR6Z4eBpDttNeXu8kU/o6ewJCB+jz7DoOivTDke7R9iF8OsoF+x 7q1oHYBV1vKXhz9hhFFW3J4fX0t4ZJTiSWCqEJA1tKckcscaN441V9MmDYSpLyB6SrFO Jf1tNX8Xbqy8NzoCkCp3lR/S1ZALmbNuzHLMcHss+Nz+f8DkHaPhPf7MvZI6tAJZUlAG Woyw== X-Gm-Message-State: AOAM5334V70OQ4H+FGCoks7p9CNLk7eLCI4Mq0FOXb1EIWm+AeTUCci0 +9XWsof+B+TIlhEB9/ov3SO7Bg== X-Google-Smtp-Source: ABdhPJwGWtiEFhUmnkGBp2Rxt/lcPT6813KmBXKngx9ykjh3c0h2i66hdbq/r2H8+lMbm97dJsW7RA== X-Received: by 2002:adf:f60c:: with SMTP id t12mr599221wrp.152.1621268424852; Mon, 17 May 2021 09:20:24 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 19/29] tests/tcg/tricore: Add madd test Date: Mon, 17 May 2021 17:10:12 +0100 Message-Id: <20210517161022.13984-20-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210517161022.13984-1-alex.bennee@linaro.org> References: <20210517161022.13984-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::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: Bastian Koppelmann , =?UTF-8?q?Alex=20Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Bastian Koppelmann Signed-off-by: Bastian Koppelmann Signed-off-by: Alex Benn=C3=A9e Tested-by: Alex Benn=C3=A9e Message-Id: <20210305170045.869437-14-kbastian@mail.uni-paderborn.de> Message-Id: <20210512102051.12134-24-alex.bennee@linaro.org> 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; \ ) =20 +#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 +=3D test_dvstep.tst TESTS +=3D test_fadd.tst TESTS +=3D test_fmul.tst TESTS +=3D test_ftoi.tst +TESTS +=3D test_madd.tst =20 QEMU_OPTS +=3D -M tricore_testboard -nographic -kernel =20 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, 0x7ffff= fff,2) + TEST_D_DDI_PSW(madd, 2, 0xffff7fff, 0x60000b80, 0xffff8001, 0x7ffff= fff,2) + TEST_D_DDD_PSW(madds.u, 3, 0xffffffff, 0x60000b80, 0x00000000, 0x80000= 000, \ + 0x80000000) + + TEST_PASSFAIL + --=20 2.20.1 From nobody Sat May 18 23:44:09 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1621268765; cv=none; d=zohomail.com; s=zohoarc; b=g5C1XBXmk8iGF3KmtdqEPyTHftmrUGME/ribVI3st/gDAT0ZhWafB3lTpDsAl0VmWYoGNWZwVCI+zxyo9hMZsWkXiiPcnJ7OgVOmuLfapfh8IQq7DNv2XUG2L0lO/RVSlEO2gaDEhaJivRlDhEfaHWiX3y5qlnktNdJlZX4H7UI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621268765; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=AwHUKic2neBlh0Oqi4dLL3Doo9PeLOJuBwfn8ueZrao=; b=JmsY2+pjfIQZSyr+rzqHgNoUaXDcfen8aOtrb2h0qfLahYsc72P5E2wuYoVFyPv7XpMgp4x2ewBZZnTDIZohOjNf6JBLwvv8ZEt/w7DkfDOSKeisB3uQQ3DyR6wNGb8XCiKd6AsJuHqbtcjouY1IFqo2wrZGdf6Ipr5rOdigXGk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1621268765059143.5438451331886; Mon, 17 May 2021 09:26:05 -0700 (PDT) Received: from localhost ([::1]:44434 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lig4B-0002SD-M5 for importer@patchew.org; Mon, 17 May 2021 12:26:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60144) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lifyY-0001bw-Le for qemu-devel@nongnu.org; Mon, 17 May 2021 12:20:14 -0400 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]:42604) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lifyU-000246-Mw for qemu-devel@nongnu.org; Mon, 17 May 2021 12:20:14 -0400 Received: by mail-wr1-x42a.google.com with SMTP id x8so7035217wrq.9 for ; Mon, 17 May 2021 09:20:09 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id z9sm14997968wmi.17.2021.05.17.09.20.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 May 2021 09:20:07 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 18D241FFA9; Mon, 17 May 2021 17:10:25 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=AwHUKic2neBlh0Oqi4dLL3Doo9PeLOJuBwfn8ueZrao=; b=nQLN+uVe5MRaiv2Y8oHuR5Jc4YQ8J8mUVSlubZy68eMafs+P66i1tELFMgyR6xNho+ GofoHpMfQFPVazH1gaMev/qmd+iMEiWcr6qCfbMGWqRhjzVEcfWHstE0cZpiCLZKQo7O PKkS6feyxTkr2aigizS3TYGf2geveuxQ8zPn800AqlybSHRNqBw1h1a7Yy4JJiEYrDho +OG06vXM9enPc2kQMFKyYL+EJaiSBJ+ZzsUdiKpmVnGIDlw7O4SQGEgs21MMvrW4FGWn GLhPjMO8LQGXgbqNjCni+hjlp7RMw0Dxud4uKDCu6/ZrB9DOIJkFrpJe0b06ZPaZrNOh ao6w== 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=AwHUKic2neBlh0Oqi4dLL3Doo9PeLOJuBwfn8ueZrao=; b=WGarlKt2JOa2bnGScLtbogiNr9I+vi3A1dRGQJyhemIdxWmws/QRXKT8nzWGBx75qm dvqcKqeDUSgFNIcPqhVd4SeKJQ26/ID1iLJKJsxZPWyae4D29qGhIpNYvtZh9WqNawsD WiD7FfqQeneObxkUxENr4Jxhj3ecI/3ie7dAB2hFtUiqD7n6r2T+o03SwKSNulWgAro7 Up5SFTCspyCdgMzP6WM66JTvLoCZm1yldJ0xHbh9sTRJRuW6Im1WttTf/t56hUK8/P8z 7ERtO07+75m6rnKNV2yxy17PAu0dav7U03IQUymz9NZMLM0CrJ2g1jYWbNfl4zOVEU7w hrQg== X-Gm-Message-State: AOAM531sDcD1PerRpzXrwvNMH7ojam1pgY1vwlPy5eLZv4t+e46FAlkB mUs7T30IlQidlMmBctIWN7fk4A== X-Google-Smtp-Source: ABdhPJyw6pXLNbJVUTjAqNxUF4BMwxEmr679bo60ZeCD/gwBwh3uYqEOAcO+wequPY2yfJqONnAXOQ== X-Received: by 2002:adf:e70e:: with SMTP id c14mr600181wrm.104.1621268408246; Mon, 17 May 2021 09:20:08 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 20/29] tests/tcg/tricore: Add msub test Date: Mon, 17 May 2021 17:10:13 +0100 Message-Id: <20210517161022.13984-21-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210517161022.13984-1-alex.bennee@linaro.org> References: <20210517161022.13984-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42a; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42a.google.com X-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: Bastian Koppelmann , =?UTF-8?q?Alex=20Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Bastian Koppelmann Signed-off-by: Bastian Koppelmann Signed-off-by: Alex Benn=C3=A9e Tested-by: Alex Benn=C3=A9e Message-Id: <20210305170045.869437-15-kbastian@mail.uni-paderborn.de> Message-Id: <20210512102051.12134-25-alex.bennee@linaro.org> 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 +=3D test_fadd.tst TESTS +=3D test_fmul.tst TESTS +=3D test_ftoi.tst TESTS +=3D test_madd.tst +TESTS +=3D test_msub.tst =20 QEMU_OPTS +=3D -M tricore_testboard -nographic -kernel =20 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, 0xffffffd= b) + TEST_PASSFAIL + --=20 2.20.1 From nobody Sat May 18 23:44:09 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1621269218; cv=none; d=zohomail.com; s=zohoarc; b=DJiwZIzmKlAibbtjm99r1CbTw9SkMvRaknhSpDM+o5Xvcd6suYQcn7Xh2AHdwxXpQqdmvqgkUPUDhUSuoLdvnVFnD2c7DLY02TRsevefD+tKsGEJ8fDvQF2KboRcZFO/5h0ZDy8iQ1eFBsPjWkRuII/h/nJGh/qOmP8aT245xO8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621269218; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=u2zl0v/ZGpHuJYXeEUyU1isb5BGw5bVkcJXnd3C7i50=; b=IbhvrHvgdqpl0U+CJwG42W68fiacDa2WHE8ZGqXmrNF1z7O0FPeiKCTpuGB7SXerphq3+272WGIxDJecrSoPQiuAaNc032g8Uh+TIiALj6HjXeo9Zp8/AIZyMoOKhxTajN0q2uSMFSBB0SsTHFCzjEIfn8XRLQpXKvZQTnmz/xE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 162126921854312.083178780159528; Mon, 17 May 2021 09:33:38 -0700 (PDT) Received: from localhost ([::1]:32808 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ligBV-0005iG-1n for importer@patchew.org; Mon, 17 May 2021 12:33:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60220) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lifyf-0001j9-3r for qemu-devel@nongnu.org; Mon, 17 May 2021 12:20:23 -0400 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]:42603) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lifyW-000257-EO for qemu-devel@nongnu.org; Mon, 17 May 2021 12:20:20 -0400 Received: by mail-wm1-x334.google.com with SMTP id f75-20020a1c1f4e0000b0290171001e7329so3952321wmf.1 for ; Mon, 17 May 2021 09:20:12 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id c194sm19350470wme.46.2021.05.17.09.20.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 May 2021 09:20:07 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 300AF1FFAA; Mon, 17 May 2021 17:10:25 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=u2zl0v/ZGpHuJYXeEUyU1isb5BGw5bVkcJXnd3C7i50=; b=S2v44eDNNIGapl8zlmmB32UO5QFHcjTsCd7CAdqiV8dgepVGmOOFynzo+3FBb55Iex IBguUYikIi+GV19LQjF0nLFbDIGT9fUn+WjuDiXLP0SPyAoPleFufoJLRWzHBaj4dgKU qez7zoNR9ZzW8XKn4hktKtxxK1SKQw8GaWtSWSH9Jlz4sMxX/dlG21HPIk6X8j3pMtQ5 jJg1ALGPiVaG/0z5O67LwwNZ8B+sLNrMONkIhLcUnzQOf5kyy8yPlROudnCs/fENkm8V oktjTLmpGt/afHLpLbVzmYk95tN6nzMAlSVewzdrDk4sEv+/krjaakdQAUm/nFCXsEye jDfA== 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=u2zl0v/ZGpHuJYXeEUyU1isb5BGw5bVkcJXnd3C7i50=; b=Y60O5dXXdz0O2y0Uo7a7cbiK5PRo4zlr/oyHHWnNby2oCz6zLWRXxp9h7A2kwoIqPi an/HgS5JtzFelCinnZb5wxMkonXBkueH5WH01hFfXDv8kp16NK7hovewjty3iVLozSfO c6wRETcDVE3+gIgPdYc7B4m4I9BipE5vJBE6ZPQAxEHfXFtzkeVK+15TVwpfihNu/IXV lGeQ1cmoJfP/VsBxJA/gDTbh1M9nm4gFoYi7FMBl6l4AVC0ex36dHuqAqSNHv06gzU/V Amjf+MEXfshN+2nNEYpNZfES4RAp47ITnHL69Ps5dcu1H/05kJf/BXUj4W1HbjELT0zX 3nNg== X-Gm-Message-State: AOAM532KmtP22IODFlE/r6P7BjVJGj4D83VmL6Sg2EWJ9pJuIuN6p2RW Ut13MJ/KaaAQWO3rp7FB1Y0AZA== X-Google-Smtp-Source: ABdhPJz4DcZWXknBhhZi0VtjG56lX2/O3JNuRNvwZlRWbzL7qfN0+X6VGCvcLmfJWhDw55l5pJ8AGg== X-Received: by 2002:a1c:988f:: with SMTP id a137mr720995wme.110.1621268411060; Mon, 17 May 2021 09:20:11 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 21/29] tests/tcg/tricore: Add muls test Date: Mon, 17 May 2021 17:10:14 +0100 Message-Id: <20210517161022.13984-22-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210517161022.13984-1-alex.bennee@linaro.org> References: <20210517161022.13984-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::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: Bastian Koppelmann , =?UTF-8?q?Alex=20Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Bastian Koppelmann Signed-off-by: Bastian Koppelmann Signed-off-by: Alex Benn=C3=A9e Tested-by: Alex Benn=C3=A9e Message-Id: <20210305170045.869437-16-kbastian@mail.uni-paderborn.de> Message-Id: <20210512102051.12134-26-alex.bennee@linaro.org> 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 +=3D test_fmul.tst TESTS +=3D test_ftoi.tst TESTS +=3D test_madd.tst TESTS +=3D test_msub.tst +TESTS +=3D test_muls.tst =20 QEMU_OPTS +=3D -M tricore_testboard -nographic -kernel =20 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, 0xfffffff= f) + TEST_D_DD_PSW(muls.u, 2, 0xffffffff, 0x60000b80, 0xfffffffe, 0xfffffff= f) + + TEST_PASSFAIL + --=20 2.20.1 From nobody Sat May 18 23:44:09 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1621270475; cv=none; d=zohomail.com; s=zohoarc; b=afq2aSIgB0F0x+ZJmEgTeqyTZqGbcU/+bIg57QwwCXCWsN7qquBAOp9pBWe9fqkavkXRbaatpigugXEAZL1QAGMe7zDbE4rvQbMD2f7d14hW/N1JWhiOMlUzOL8kdFPRd4tAfReRSWo6q8el03veY3k6M3yXZtG0z9O8zPzvfiE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621270475; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=ecrJ8Yrx6ZRJ+fACPN+MlJLK85SE+W/xoTVC0N/qwc0=; b=c22V8TAS6ztIdXrFHL9XqNTpw52DcDcRJD0yi3/P6I2/cOZ6uEmyT45565VYp7an7zZOvnpBMGEIrHKREKhDofMNcKOrX+qCYI2gx9TL5GH0z50rk/v87xHke7ssjBJSNBQM690MjpFX69NQCTzJYEk71lGsLJSBZ67YFy6VqFU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1621270475483279.1586604359903; Mon, 17 May 2021 09:54:35 -0700 (PDT) Received: from localhost ([::1]:55704 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ligVm-0007rW-8T for importer@patchew.org; Mon, 17 May 2021 12:54:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60368) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lifyq-0001ns-R9 for qemu-devel@nongnu.org; Mon, 17 May 2021 12:20:32 -0400 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]:37457) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lifye-00028i-Pj for qemu-devel@nongnu.org; Mon, 17 May 2021 12:20:32 -0400 Received: by mail-wm1-x32c.google.com with SMTP id k5-20020a05600c4785b0290174b7945d7eso3512769wmo.2 for ; Mon, 17 May 2021 09:20:17 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id c7sm8796478wrs.23.2021.05.17.09.20.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 May 2021 09:20:14 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 4A0F01FFAB; Mon, 17 May 2021 17:10:25 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ecrJ8Yrx6ZRJ+fACPN+MlJLK85SE+W/xoTVC0N/qwc0=; b=Qt+U7dja5K02eYNlzpW0xIuVoXvMerwBhJ/RDvx/U17ezrvlejAtRNjweya/bBgRfe i52IqbRU8EwoIWwIBeOKQDfp6rEukpqp5UVM4UXcCOjJrGjL7RHNifN6xCxCcW+1+Rwh aM9kcgEze8vDIySx3+HudzUrP+3IRYf3SP42RHf1+O5cFbnd/ettp+gYcv1DPOMPu/9Y o9w+gecw5kQCj8Fh1otp5P2/YZFZpRqt2E7XpSoRRC6yETHGevZU0Ovae5ayPc2CkKmH mynrv3twjsIJd3kieEXwiXV6+QvD4pLwscyeKTBQZXvzd/obqx6mj61cYn1I7isFoDFS Fkvg== 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=ecrJ8Yrx6ZRJ+fACPN+MlJLK85SE+W/xoTVC0N/qwc0=; b=SrFYBNnUxgmnyBSCPp0tHBjxt5Shjzd8FbW4uXy7X3UoLDTNzrngWG67ceQ1jmwVR3 xbzzhx1uqBi8GtK8fIrwUYdbUYZBo62umajYe7HRqH/qVG8Eqx/4auHPN0D6eqbvi2qJ npvpmaimT7FNeQtt5/QVls7DqXj54VIvo5Ls90+TgSdDr/3b8W0KyZcjodrkgpO6xqez gZsKBGCCzDctxgAGYUgvgQSFvJRo8Yj+9bFq4/yhXSNt58FpQ+evj5fIHOl20ElBLPrt 4C4/xMRCsX88wEkEKv6CIV8cympfgwdgwVKB48WqwLEjZvdOnkDLFeuF5W1H9RKWXyMY 9Seg== X-Gm-Message-State: AOAM532jIrDXWFNm1LOT6kG5tth6yp6eOXxgIr2kygYN00GEmAgVawWL k93gjxNQAB+Wtx7la3sWisA+ew== X-Google-Smtp-Source: ABdhPJzY8AD9LCs0VT5TPWglwCc0BiTqNS6QDXCKEFL0nOZw2Y4PJnH51hEJQURmdihSWPvLq5zoRw== X-Received: by 2002:a7b:c444:: with SMTP id l4mr487457wmi.36.1621268417035; Mon, 17 May 2021 09:20:17 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 22/29] tests/tcg/ppc64le: tests for brh/brw/brd Date: Mon, 17 May 2021 17:10:15 +0100 Message-Id: <20210517161022.13984-23-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210517161022.13984-1-alex.bennee@linaro.org> References: <20210517161022.13984-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::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: =?UTF-8?q?Alex=20Benn=C3=A9e?= , Matheus Ferst , qemu-devel@nongnu.org, Fabiano Rosas Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Matheus Ferst Tests for Byte-Reverse Halfword, Word and Doubleword [AJB: tweak to make rules for skip/plugins] Signed-off-by: Matheus Ferst Signed-off-by: Alex Benn=C3=A9e Tested-by: Fabiano Rosas Message-Id: <20210423205757.1752480-3-matheus.ferst@eldorado.org.br> Message-Id: <20210512102051.12134-28-alex.bennee@linaro.org> diff --git a/tests/tcg/ppc64le/byte_reverse.c b/tests/tcg/ppc64le/byte_reve= rse.c new file mode 100644 index 0000000000..53b76fc2e2 --- /dev/null +++ b/tests/tcg/ppc64le/byte_reverse.c @@ -0,0 +1,21 @@ +#include + +int main(void) +{ + unsigned long var; + + var =3D 0xFEDCBA9876543210; + asm("brh %0, %0" : "+r"(var)); + assert(var =3D=3D 0xDCFE98BA54761032); + + var =3D 0xFEDCBA9876543210; + asm("brw %0, %0" : "+r"(var)); + assert(var =3D=3D 0x98BADCFE10325476); + + var =3D 0xFEDCBA9876543210; + asm("brd %0, %0" : "+r"(var)); + assert(var =3D=3D 0x1032547698BADCFE); + + return 0; +} + diff --git a/tests/tcg/ppc64/Makefile.target b/tests/tcg/ppc64/Makefile.tar= get index 0c6a4585fc..a6a4ddaeca 100644 --- a/tests/tcg/ppc64/Makefile.target +++ b/tests/tcg/ppc64/Makefile.target @@ -10,4 +10,17 @@ PPC64_TESTS=3Dbcdsub endif bcdsub: CFLAGS +=3D -mpower8-vector =20 +PPC64_TESTS +=3D byte_reverse +ifneq ($(DOCKER_IMAGE)$(CROSS_CC_HAS_POWER10),) +run-byte_reverse: QEMU_OPTS+=3D-cpu POWER10 +run-plugin-byte_reverse-with-%: QEMU_OPTS+=3D-cpu POWER10 +else +byte_reverse: + $(call skip-test, "BUILD of $@", "missing compiler support") +run-byte_reverse: + $(call skip-test, "RUN of byte_reverse", "not built") +run-plugin-byte_reverse-with-%: + $(call skip-test, "RUN of byte_reverse ($*)", "not built") +endif + TESTS +=3D $(PPC64_TESTS) diff --git a/tests/tcg/ppc64le/Makefile.target b/tests/tcg/ppc64le/Makefile= .target index 1acfcff94a..c0c14ffbad 100644 --- a/tests/tcg/ppc64le/Makefile.target +++ b/tests/tcg/ppc64le/Makefile.target @@ -9,4 +9,17 @@ PPC64LE_TESTS=3Dbcdsub endif bcdsub: CFLAGS +=3D -mpower8-vector =20 +PPC64LE_TESTS +=3D byte_reverse +ifneq ($(DOCKER_IMAGE)$(CROSS_CC_HAS_POWER10),) +run-byte_reverse: QEMU_OPTS+=3D-cpu POWER10 +run-plugin-byte_reverse-with-%: QEMU_OPTS+=3D-cpu POWER10 +else +byte_reverse: + $(call skip-test, "BUILD of $@", "missing compiler support") +run-byte_reverse: + $(call skip-test, "RUN of byte_reverse", "not built") +run-plugin-byte_reverse-with-%: + $(call skip-test, "RUN of byte_reverse ($*)", "not built") +endif + TESTS +=3D $(PPC64LE_TESTS) --=20 2.20.1 From nobody Sat May 18 23:44:09 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1621268933; cv=none; d=zohomail.com; s=zohoarc; b=cJgJilkxOB0Xbku3S/bjvLCZHGllwfTHH4lLkjSYigPEYELDADWoDNWIkJ4wBhhG9Qoc4aa2rsL1hgFP1qH+Py6YJwiM5XSv0dZrA5IPNGygxeHk97DrGOfEM6GTp7Gukc+ROLdOpyYATIZTHWzvxZIx6hVV1Uct2EmLbiJqt9Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621268933; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=mkstvpf+hN6bSILMqqRSGrxtXoo4HBUUCL7fU3xWKkM=; b=NhXAJ63vfGnpwWUlGXExeEyYIbEx2DbvjtvgbKLlgKKSAG6SPM/7IGtLt33DjvPOl2gFsLNujFjJDSs4b7jWMmKFa9xAkzltc76rXucvfg2FO+mGX3usdIZ6bY6EQvyjc+DZIzPpcQyFVcbJcfzbzOJBEHmf78jum7uRE354c1Q= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1621268933802236.3829211847742; Mon, 17 May 2021 09:28:53 -0700 (PDT) Received: from localhost ([::1]:52712 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lig6u-0008FF-GW for importer@patchew.org; Mon, 17 May 2021 12:28:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60108) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lifyX-0001bR-As for qemu-devel@nongnu.org; Mon, 17 May 2021 12:20:14 -0400 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]:42601) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lifyU-00024p-O0 for qemu-devel@nongnu.org; Mon, 17 May 2021 12:20:13 -0400 Received: by mail-wm1-x332.google.com with SMTP id f75-20020a1c1f4e0000b0290171001e7329so3952254wmf.1 for ; Mon, 17 May 2021 09:20:10 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id f6sm20754175wru.72.2021.05.17.09.20.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 May 2021 09:20:07 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 61C871FFAC; Mon, 17 May 2021 17:10:25 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=mkstvpf+hN6bSILMqqRSGrxtXoo4HBUUCL7fU3xWKkM=; b=yOJPNrGdzr/a24hKdf+de5oH4elbtkWcgAPmgavcxNuVS5eNMna4l2m2zt96hgwQjp 0AXssebE5HaCLJ1VipzHJyZWEv+ZClIsLTat/jzAKAJZWy3vwbLdcaH/XNE8/H/72L1k OB5JeDNYw1ngeFOX8OovrMi7ABPc8FRWuYs3y/I98NodHopup+S4wolIt9nWI1MnxSWK bOy2nVfbajBmq9q+7+KQaeow09d/XgrJZohJtBK8CQLm7gwwMwzGgP72oxQX+3DJ7W7c 1Pnd1Yag0ujrYXEiiMY59MlaOd/+eyDC/F0TYZ8ekIrfWVF6BRZejy20/Y642M+PUX0u pagw== 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=mkstvpf+hN6bSILMqqRSGrxtXoo4HBUUCL7fU3xWKkM=; b=b8DQZAGX5uujixu+iKsh2qaJSFKiNh9vDhELofRozLBO5UzQzoLKKb7nlyl6RdO6KX qv2d+WF/r/aDXQsDMKMwZP+7DQ2jYTLonXmRgofzh5uNxHXV2Br+IIAOoR1iUZlZA5Fv ft4nPxe5vlPxEuQ0PR4BW/TlVAlASYGGt2u828EdyMB5s3Log0BHD0SQpx0A+IKXJdgC 6WW7/4NiSyN0TPowaNpPKvHyb6cd269+Rs58MP13gJEoFEw6gqjDYsonEYeVOZhWaHqd adlcr9tg2TrGSgr0YKpazG4uKlsXpmxjnAhDVkIh/U+tiqP+/90e3OBMXIIa3+blcZ6K 643w== X-Gm-Message-State: AOAM532n8/e//OdX9o+yghZykjWy2lSCtMTVzKlVeKahrF5ngzy2pdLr 6/RW9fikWBJAqXLBOhOlvkiDdw== X-Google-Smtp-Source: ABdhPJwcphuzfJJNNKEdXswEnU+EADD890BlqHHXfs7Na8BAcETjnBq0yB5NY2FJLf5nufC03cPF+A== X-Received: by 2002:a05:600c:3388:: with SMTP id o8mr675433wmp.101.1621268409041; Mon, 17 May 2021 09:20:09 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 23/29] tests/tcg: fix missing return Date: Mon, 17 May 2021 17:10:16 +0100 Message-Id: <20210517161022.13984-24-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210517161022.13984-1-alex.bennee@linaro.org> References: <20210517161022.13984-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::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: =?UTF-8?q?Alex=20Benn=C3=A9e?= , qemu-devel@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) This was picked up when clang built the test. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20210512102051.12134-30-alex.bennee@linaro.org> diff --git a/tests/tcg/multiarch/system/memory.c b/tests/tcg/multiarch/syst= em/memory.c index eb0ec6f8eb..41c7f66e2e 100644 --- a/tests/tcg/multiarch/system/memory.c +++ b/tests/tcg/multiarch/system/memory.c @@ -326,6 +326,7 @@ static bool do_unsigned_test(init_ufn fn) fn(i); ok =3D do_unsigned_reads(i); } + return ok; #else fn(0); return do_unsigned_reads(0); --=20 2.20.1 From nobody Sat May 18 23:44:09 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1621270093; cv=none; d=zohomail.com; s=zohoarc; b=PkJN86n+5H1KUb1czm/GfYIjnJTW7kxVJIaFHUCEkxBnld6jZVyhMblLd2HxvwUhuPGcB34p4EzOU1GMIl8WCtNveU00ORyIqTqJTpEN9cJpF7s7LBfjU9DTROkwWSlW7K+ENZDPxfj5miOwRePBigCdGSIjntydF8gSKQGxTzk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621270093; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=SG64un54Q9dR+nW/jKLTv4A2RmDY5Rqb3p7F8J5Dt48=; b=dir6Q/AbdTIVuoTMjjfKah6CIsNkLSnT3t/XCfm76trf+s5i78YpaoFAzFD2qf0pNNHKFdLoeCjdzYJCHy8jR2C1Q+Vbm4YRA5Da7SAg0maqK8NU3MLUbpu7ZBaOQx3DH3TtgxWfSgA8jeBkwjqKZGk9Ba4VKJsWSrsNuJ5nYks= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1621270093822301.47456658128; Mon, 17 May 2021 09:48:13 -0700 (PDT) Received: from localhost ([::1]:35922 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ligPc-0002j7-91 for importer@patchew.org; Mon, 17 May 2021 12:48:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34538) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lig8H-00047w-NQ for qemu-devel@nongnu.org; Mon, 17 May 2021 12:30:17 -0400 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]:39570) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lig8A-0005x1-IE for qemu-devel@nongnu.org; Mon, 17 May 2021 12:30:17 -0400 Received: by mail-wm1-x336.google.com with SMTP id l18-20020a1ced120000b029014c1adff1edso5518437wmh.4 for ; Mon, 17 May 2021 09:30:10 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id q186sm1974451wme.20.2021.05.17.09.30.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 May 2021 09:30:07 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 77D5D1FF87; Mon, 17 May 2021 17:10:25 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=SG64un54Q9dR+nW/jKLTv4A2RmDY5Rqb3p7F8J5Dt48=; b=W89sO4vUX5l8oqFUkAQGpZiZzt+06eW0VNoHAhdC+PnyVDZZ6TMT5vsEwIGrwgsuBN tQ7ntY+0lw2hnM/wqVGxbrNax6EIsNSok8VmUAK4/TJqCeDdY1wQpdtR4SEQfOrR+GcU Gi4kpZQVmXa9uGlYqENxhRqdCUVJjbqJejnAWvTqiT/ZvhPN4gHkxvGyLkqljbcv4Dcb FGAJpkYM9XN2yQwBCIi25dPGeyFDJiipiyS6r8GwK+c6FY/s+SMeA6chKoVHNvAj0rCz lfY74Mb9GcZiRUikKQs7+LvQdv88+UjH0cuEO8eDB/Li1KCr1CL/3fN7mnNAPL/DPgBw v+WQ== 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=SG64un54Q9dR+nW/jKLTv4A2RmDY5Rqb3p7F8J5Dt48=; b=HDVKYqZKRKbGfMQGqvflpImX4RcVG6lNYQrI4BIaQRLWg+wuOH6G4oAPd0ETRH6vm7 uqJKUjM+I8BhQNXD4kLdJXYRq8MWxtgw3RRRvb/AXMexiu9/Derbx458mbYdbSGqXo+q tUG7LWODDuza8vH3H2oidrV9DpaDZGdngHhJTlg0fA0NYVIOsCvVf60EzVkIGrumXwnQ 7q5CKU43t+bl8m10ITBIP5mcV4DCdZnchV/6p92vVG0z5/y+o39U0yBTt1au3gxAQsLW qcM8KvSomM521sQl/8E5wOS9uIFl5CMsYD9WnawPrgNahARkVE4QjwKNEJoO4xs3wUgj PdAg== X-Gm-Message-State: AOAM530xmkOCGucvvQehvk7XwH4hFp9CRRDUYYmPWnFjuQ4VU40HKrgV 26YGwZ3m61KqPbt0FvcJcKHgEg== X-Google-Smtp-Source: ABdhPJy9Hq2Pb4qks9Hi0Qbseea+Edwo8zMOhFmZHc+79uPHuF5V9i27yWPuAgOGo/dG20WhEWG9sw== X-Received: by 2002:a7b:cf13:: with SMTP id l19mr746724wmg.140.1621269008949; Mon, 17 May 2021 09:30:08 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 24/29] tests/tcg: don't allow clang as a cross compiler Date: Mon, 17 May 2021 17:10:17 +0100 Message-Id: <20210517161022.13984-25-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210517161022.13984-1-alex.bennee@linaro.org> References: <20210517161022.13984-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::336; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x336.google.com X-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: =?UTF-8?q?Alex=20Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Currently there are two problems. The first is clang generates a preamble (that is always executed) to stack xmm registers. This causes a ILLOP on the x86_64 softmmu tests as SSE isn't enabled. The second is the inline assembler in test-i386.c breaks clangs compiler and I don't know how to fix it. Even with Theodore's patch series (D5741445-7EFD-4AF1-8DB2-E4AFA93CBB1A@icloud.com) I still get compiler failures. For now lets just skip clang and allow it to fall back to the containers which we know have compilers which work. Signed-off-by: Alex Benn=C3=A9e diff --git a/tests/tcg/configure.sh b/tests/tcg/configure.sh index d13d2bb388..016aa24ce4 100755 --- a/tests/tcg/configure.sh +++ b/tests/tcg/configure.sh @@ -105,6 +105,14 @@ for target in $target_list; do esac =20 container_image=3D + container_hosts=3D + container_cross_cc=3D + container_cross_as=3D + container_cross_ld=3D + + # suppress clang + supress_clang=3D + case $target in aarch64-*) # We don't have any bigendian build tools so we only use this for AA= rch64 @@ -142,6 +150,7 @@ for target in $target_list; do container_hosts=3Dx86_64 container_image=3Dfedora-i386-cross container_cross_cc=3Dgcc + supress_clang=3Dyes ;; m68k-*) container_hosts=3Dx86_64 @@ -213,6 +222,7 @@ for target in $target_list; do container_hosts=3D"aarch64 ppc64el x86_64" container_image=3Ddebian-amd64-cross container_cross_cc=3Dx86_64-linux-gnu-gcc + supress_clang=3Dyes ;; xtensa*-softmmu) container_hosts=3Dx86_64 @@ -246,71 +256,75 @@ for target in $target_list; do if eval test "x\${cross_cc_$i+yes}" !=3D xyes; then continue fi + eval "target_compiler=3D\${cross_cc_$arch}" =20 - eval "target_compiler=3D\${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=3Dy" >> $config_target_mak - else - echo "CROSS_CC_GUEST_STATIC=3Dy" >> $config_target_mak + if has "$target_compiler"; then + if test "$supress_clang" =3D yes && + $target_compiler --version | grep -qi "clang"; then + got_cross_cc=3Dno + else + 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=3Dyes + echo "CROSS_CC_GUEST_STATIC=3Dy" >> $config_target_mak + echo "CROSS_CC_GUEST=3D$target_compiler" >> $config_ta= rget_mak + fi + else + got_cross_cc=3Dyes + echo "CROSS_CC_GUEST_STATIC=3Dy" >> $config_target_mak + echo "CROSS_CC_GUEST=3D$target_compiler" >> $config_target= _mak + fi + + # Test for compiler features for optional tests. We only do th= is + # for cross compilers because ensuring the docker containers b= ased + # 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_cfl= ags \ + -march=3Darmv8.1-a+sve -o $TMPE $TMPC; = then + echo "CROSS_CC_HAS_SVE=3Dy" >> $config_target_mak + fi + if do_compiler "$target_compiler" $target_compiler_cfl= ags \ + -march=3Darmv8.3-a -o $TMPE $TMPC; then + echo "CROSS_CC_HAS_ARMV8_3=3Dy" >> $config_target_= mak + fi + if do_compiler "$target_compiler" $target_compiler_cfl= ags \ + -mbranch-protection=3Dstandard -o $TMPE= $TMPC; then + echo "CROSS_CC_HAS_ARMV8_BTI=3Dy" >> $config_targe= t_mak + fi + if do_compiler "$target_compiler" $target_compiler_cfl= ags \ + -march=3Darmv8.5-a+memtag -o $TMPE $TMP= C; then + echo "CROSS_CC_HAS_ARMV8_MTE=3Dy" >> $config_targe= t_mak + fi + ;; + ppc*) + if do_compiler "$target_compiler" $target_compiler_cfl= ags \ + -mpower8-vector -o $TMPE $TMPC; then + echo "CROSS_CC_HAS_POWER8_VECTOR=3Dy" >> $config_t= arget_mak + fi + ;; + i386-linux-user) + if do_compiler "$target_compiler" $target_compiler_cfl= ags \ + -Werror -fno-pie -o $TMPE $TMPC; then + echo "CROSS_CC_HAS_I386_NOPIE=3Dy" >> $config_targ= et_mak + fi + ;; + esac + fi fi - echo "CROSS_CC_GUEST=3D$target_compiler" >> $config_target_mak =20 - # 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=3Darmv8.1-a+sve -o $TMPE $TMPC; then - echo "CROSS_CC_HAS_SVE=3Dy" >> $config_target_mak - fi - if do_compiler "$target_compiler" $target_compiler_cflags \ - -march=3Darmv8.3-a -o $TMPE $TMPC; then - echo "CROSS_CC_HAS_ARMV8_3=3Dy" >> $config_target_mak + if test $got_cross_cc =3D no && test "$container" !=3D no && test -n "= $container_image"; then + for host in $container_hosts; do + if test "$host" =3D "$ARCH"; then + echo "DOCKER_IMAGE=3D$container_image" >> $config_target_m= ak + echo "DOCKER_CROSS_CC_GUEST=3D$container_cross_cc" >> $con= fig_target_mak fi - if do_compiler "$target_compiler" $target_compiler_cflags \ - -mbranch-protection=3Dstandard -o $TMPE $TMPC; then - echo "CROSS_CC_HAS_ARMV8_BTI=3Dy" >> $config_target_mak - fi - if do_compiler "$target_compiler" $target_compiler_cflags \ - -march=3Darmv8.5-a+memtag -o $TMPE $TMPC; then - echo "CROSS_CC_HAS_ARMV8_MTE=3Dy" >> $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=3Dy" >> $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=3Dy" >> $config_target_mak - fi - ;; - esac - - enabled_cross_compilers=3D"$enabled_cross_compilers $target_compiler" - got_cross_cc=3Dyes - break + done + fi done - - if test $got_cross_cc =3D no && test "$container" !=3D no && test -n "$c= ontainer_image"; then - for host in $container_hosts; do - if test "$host" =3D "$ARCH"; then - echo "DOCKER_IMAGE=3D$container_image" >> $config_target_mak - echo "DOCKER_CROSS_CC_GUEST=3D$container_cross_cc" >> $confi= g_target_mak - fi - done - fi done --=20 2.20.1 From nobody Sat May 18 23:44:09 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1621269729; cv=none; d=zohomail.com; s=zohoarc; b=TyPwDiFtkIQ8yu9gGz/IdQ2ISMWHzIsghCQLXJE38UVsyHFdA7OUDMRzB586pzlvj5IlsvmqHQgQZ32P4TTU4Eeo7620xmF9FXvebpAVLYxOU2oA8TGNhfeLpU9DFDCKjph5IZgVzbnbAQVYfvuIGyodHwiYjVXO+mAQ8CJUhnY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621269729; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=aArNQrBNJ1XP3sxmOTGdE9hYoqsnx7QPKTcrKqVX3cY=; b=aLA07hkGFNb6Nw9XXzkVB2kb2g857yUo3VoiRBAEZG730Kf7WbBmNYMFTR5R+RE5reZMBgqJPlg3CtsFYfR0/pidAjxvlR/4PDVUqYSO7tvctzv30uim2mLMMvY2J0JS26l/UKNEodaWBZ4AqWYOgGQuVv3cv6vtzGk0OzAtGIE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1621269729850553.3288531910646; Mon, 17 May 2021 09:42:09 -0700 (PDT) Received: from localhost ([::1]:52718 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ligJk-00033m-KF for importer@patchew.org; Mon, 17 May 2021 12:42:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34540) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lig8H-00048g-Tr for qemu-devel@nongnu.org; Mon, 17 May 2021 12:30:17 -0400 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]:40625) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lig8D-0005xy-HO for qemu-devel@nongnu.org; Mon, 17 May 2021 12:30:17 -0400 Received: by mail-wr1-x430.google.com with SMTP id z17so7070981wrq.7 for ; Mon, 17 May 2021 09:30:12 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id e8sm17745240wrt.30.2021.05.17.09.30.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 May 2021 09:30:07 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 8E0EE1FFAE; Mon, 17 May 2021 17:10:25 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=aArNQrBNJ1XP3sxmOTGdE9hYoqsnx7QPKTcrKqVX3cY=; b=tv5boI8O0DNknjgn9AkC77mEaZs8G2DbbAlJEQxY0quzurzjAY1kaiwMUhhffb+SYv i/hsGWZrztRxV8sUfZbOwzXehWxkGlqnwW1zqvM4E4xUnlPEvzFF6VpFAEezTGCK00MI g7QyTK1+ihAJmE8/3sG1mVoclpvCj+qf9gIDkjZaRIHp08U80TLAGCQmgnkhKMsrREQ4 GztgSk8X5YSOgqI7ZdoM4QYcFZZJAskaVgcSp95FxWZzcmLqCoLRirXRIHgupdHt0+c3 EaUtmQ1cIIEf/P57MbSY4lBxdHLs5UhDeh1KgnY1i6UnTX3MWHc+giG1oC6vkPj2GuEB Ua3Q== 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=aArNQrBNJ1XP3sxmOTGdE9hYoqsnx7QPKTcrKqVX3cY=; b=PPAW49sk4scx+f3ABW5zu03QNb44IbjrVyvHs4bNfdK0jbJCgUYAI9KB01ewcjD15b G8PyFetDZg0MuI6qEucZKrv7HxqTcGs2gs+OA4XjikdJ4x0UXGRG/DaRBgUvkqPEyW3c qafSAKfmLIDzd8Ft/IoB+cqcK9go8Ys+yenvQRr4o7N1yDq0h1wAgA1c4BL/+SyvUXSl wz3eP9m2tRHJFJEsRMaLQx9ZtfeLOFDNSRqZB+GlTB1WHXCmh/eggo0FFJe43UEuK3b4 rV9JwZ7wmtgEzM/q5kkrxL4Xy3iFzmB78MaklOpv0MlCyVrS1ZCxGF66EcgI8uV0diau ubQQ== X-Gm-Message-State: AOAM533W+9sW30yOMztkKxA9A6i9rSxFaQy6pxNm3aEFY/hx09MeRxWt Fco1QiFUVC/4saBGe++3LC90yw== X-Google-Smtp-Source: ABdhPJyZxR2BST7lBSDX8vpHmWPBJ1rAroiTws/YALBRP6mKtoEWhuH7/ZfRVTY51zuTiphPSfY9SA== X-Received: by 2002:a5d:6c61:: with SMTP id r1mr596553wrz.151.1621269011120; Mon, 17 May 2021 09:30:11 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 25/29] configure: use cc, not host_cc to set cross_cc for build arch Date: Mon, 17 May 2021 17:10:18 +0100 Message-Id: <20210517161022.13984-26-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210517161022.13984-1-alex.bennee@linaro.org> References: <20210517161022.13984-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x430.google.com X-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: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Alex=20Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Otherwise you run into hilarity like trying when cross compiling a 32 bit ARM build on a 64 bit system trying to use host_cc to build 32 bit test cases. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20210512102051.12134-32-alex.bennee@linaro.org> diff --git a/configure b/configure index df11c8bad0..9470fff09a 100755 --- a/configure +++ b/configure @@ -1651,7 +1651,7 @@ case "$cpu" in # No special flags required for other host CPUs esac =20 -eval "cross_cc_${cpu}=3D\$host_cc" +eval "cross_cc_${cpu}=3D\$cc" cross_cc_vars=3D"$cross_cc_vars cross_cc_${cpu}" QEMU_CFLAGS=3D"$CPU_CFLAGS $QEMU_CFLAGS" =20 --=20 2.20.1 From nobody Sat May 18 23:44:09 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1621268935; cv=none; d=zohomail.com; s=zohoarc; b=KbStPVpEw421vzH96UxQn2DIZsw5m6BDgylNyjT7zSD7peM+p9iEcpKzrBpy17Y9ohv8kMH0KWFs0snfH+IQ86Tr/fEgWKAohjBZksUlZtu7oRb6qC9MdJFAO6KM/ES/AUCoyAtWcdr+fnMgN1gqBVqvM/f1X75W3ZFpO1pUlr8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621268935; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=laBTRAnhUqYkkWxlzGzSELGQ267uzqchU3TV+3waw3g=; b=mmdjLuBLaFN9hTfmPsXgwep9zVLi1/Nx2MQbKg+L0y2dqRteR/x9QJ9eD/hlTVBQbQgoKcbkfA/sDcy8a33vTdMn8V+KZ9LM6dDf8F9jut3NIAsyRjxziB6AYqfFUfhzmfqESyZddsFYEWQ7vMsHJJ7EH3+odQJUNaDArmaKK44= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1621268935984849.695769149123; Mon, 17 May 2021 09:28:55 -0700 (PDT) Received: from localhost ([::1]:52862 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lig6w-0008Lv-Ue for importer@patchew.org; Mon, 17 May 2021 12:28:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60352) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lifyp-0001mt-SV for qemu-devel@nongnu.org; Mon, 17 May 2021 12:20:32 -0400 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]:37482) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lifye-0002AQ-Ts for qemu-devel@nongnu.org; Mon, 17 May 2021 12:20:31 -0400 Received: by mail-wr1-x436.google.com with SMTP id q5so7054414wrs.4 for ; Mon, 17 May 2021 09:20:20 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id s18sm7551429wra.80.2021.05.17.09.20.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 May 2021 09:20:14 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id A47221FFAF; Mon, 17 May 2021 17:10:25 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=laBTRAnhUqYkkWxlzGzSELGQ267uzqchU3TV+3waw3g=; b=Kt7lxjfhIBrfiH3KTPAODzXItNhwVOQwVfMCnoGv76PcVzxAQJWzCctWAq02rghu+f R2bSvco/nzvIcDkRV3t0Z1KrYmJZ++aCs6U9+ajZpsqW86oWLMu88SE0g0D5sdyfuVnb 3nQXWkx5E+PLJn3c4FX/4u2OD5hNFf15E3EVV3JH3LL2PV1djTTeCW7L0MEKNLlc7h/t nYgpLBxqIQbvub4SQfzVmAVBTZtuZIHKAQw+O2IjH4xY5Mky624pzE6PpIWhB8W67V4C oguo0YRdr0T4iOaUsz35IGHVoSiB/PJ6yjteRdtHnIlMPMX3QNNdLuOfxIzlRJ2tdM8V HRoA== 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=laBTRAnhUqYkkWxlzGzSELGQ267uzqchU3TV+3waw3g=; b=aFWGNxmeQgrIQRqtnm+c0Szx8MgpyyBkm8PPPta0TxFAsquMVFrktieAWe4+94G/W2 nPpIKtFqgIRA2MU4mbfffpoC/Umrm1pfRwjzoAk9S/ay9N0suyfjMmx3OVON5HwXP+HU /ksOFgPdm9yjsKSJAJiutXPVoreGIh7iR9z9j44nnqXTQy2tJS56DB70MRNMmvk4m/f+ oUi3t+asvagHNrwlhv4zOSSStlMGcOnsaz6HoSDy4lhxsPtcrhAoIUbmjFhckko2on9Z 3Z6jQzlOJgnongFekKzT89D//D2+HNiRNJaQ8E+/3RWfVC41Dv6MXJJmIwGhMe7+M065 AuBA== X-Gm-Message-State: AOAM530J9p3nU/Bvl/bmZsxMKfIw32veqlyC9EbMsIzleLYOWR3UjS57 OahwkXgo+HXZyLFD6LAgnIO6Cg== X-Google-Smtp-Source: ABdhPJyI2PhjgaqdPWhlONptt2ojiklYxgWkSRpbS6ARFa5WMbXy8zMD0UMz1F16EXsfITJqIEE5vg== X-Received: by 2002:adf:e991:: with SMTP id h17mr538534wrm.265.1621268419094; Mon, 17 May 2021 09:20:19 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 26/29] plugins: Update qemu-plugins.symbols to match qemu-plugins.h Date: Mon, 17 May 2021 17:10:19 +0100 Message-Id: <20210517161022.13984-27-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210517161022.13984-1-alex.bennee@linaro.org> References: <20210517161022.13984-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::436; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x436.google.com X-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: Yonggang Luo , =?UTF-8?q?Alex=20Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Yonggang Luo Reorder the function symbols that consistence with qemu-plugins.h Signed-off-by: Yonggang Luo Signed-off-by: Alex Benn=C3=A9e Message-Id: <20210318185555.434-2-luoyonggang@gmail.com> Message-Id: <20210505092259.8202-2-alex.bennee@linaro.org> diff --git a/plugins/qemu-plugins.symbols b/plugins/qemu-plugins.symbols index 4bdb381f48..a0ac1df62a 100644 --- a/plugins/qemu-plugins.symbols +++ b/plugins/qemu-plugins.symbols @@ -5,35 +5,34 @@ qemu_plugin_register_vcpu_exit_cb; qemu_plugin_register_vcpu_idle_cb; qemu_plugin_register_vcpu_resume_cb; - qemu_plugin_register_vcpu_insn_exec_cb; - qemu_plugin_register_vcpu_insn_exec_inline; - qemu_plugin_register_vcpu_mem_cb; - qemu_plugin_register_vcpu_mem_haddr_cb; - qemu_plugin_register_vcpu_mem_inline; - qemu_plugin_ram_addr_from_host; qemu_plugin_register_vcpu_tb_trans_cb; qemu_plugin_register_vcpu_tb_exec_cb; qemu_plugin_register_vcpu_tb_exec_inline; - qemu_plugin_register_flush_cb; - qemu_plugin_register_vcpu_syscall_cb; - qemu_plugin_register_vcpu_syscall_ret_cb; - qemu_plugin_register_atexit_cb; + qemu_plugin_register_vcpu_insn_exec_cb; + qemu_plugin_register_vcpu_insn_exec_inline; qemu_plugin_tb_n_insns; - qemu_plugin_tb_get_insn; qemu_plugin_tb_vaddr; + qemu_plugin_tb_get_insn; qemu_plugin_insn_data; qemu_plugin_insn_size; qemu_plugin_insn_vaddr; qemu_plugin_insn_haddr; - qemu_plugin_insn_disas; qemu_plugin_mem_size_shift; qemu_plugin_mem_is_sign_extended; qemu_plugin_mem_is_big_endian; qemu_plugin_mem_is_store; qemu_plugin_get_hwaddr; qemu_plugin_hwaddr_is_io; - qemu_plugin_hwaddr_to_raddr; + qemu_plugin_hwaddr_phys_addr; + qemu_plugin_hwaddr_device_name; + qemu_plugin_register_vcpu_mem_cb; + qemu_plugin_register_vcpu_mem_inline; + qemu_plugin_register_vcpu_syscall_cb; + qemu_plugin_register_vcpu_syscall_ret_cb; + qemu_plugin_insn_disas; qemu_plugin_vcpu_for_each; + qemu_plugin_register_flush_cb; + qemu_plugin_register_atexit_cb; qemu_plugin_n_vcpus; qemu_plugin_n_max_vcpus; qemu_plugin_outs; --=20 2.20.1 From nobody Sat May 18 23:44:09 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1621270312; cv=none; d=zohomail.com; s=zohoarc; b=TVYI7k27lPccqE1XjSvuzBvv4/6/3x9GHPDydKXa5cfG8FXE7v95xboGn4HmrPK+y+bIeG95ssX+lxRJzauBg0WAdRwHexMyxjvYOawny9ZcOGbx+ZU66rLpvFk5ZVqWBvcFpVSxyx0/0iHj1M31Ju+LdtofT6GKa/r4ObwIJWA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621270312; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=W7tjTvDwpWeS7WRwmPx5p6DYd0bz3KPUyEjh0yy6O08=; b=eABO8AJKTNaLI7LmBfs85uOqoxfKwnK1cPdcIH29MdiRzcGQQSZ8V20wXdorUTZFM8wmeDOAmt0UBjIg6lCKdkf+W/qyG8dFa+QPHRj9Vs8HH/Zr462ZVw9nOFKiddWmGlag0URE5SsZGiz5HHqWnq0EO6Bq50GsllSwhxfXYaU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1621270312413910.2513160321062; Mon, 17 May 2021 09:51:52 -0700 (PDT) Received: from localhost ([::1]:47228 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ligT9-00023r-A9 for importer@patchew.org; Mon, 17 May 2021 12:51:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60338) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lifyp-0001mJ-NK for qemu-devel@nongnu.org; Mon, 17 May 2021 12:20:32 -0400 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]:42610) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lifyg-0002B6-JL for qemu-devel@nongnu.org; Mon, 17 May 2021 12:20:27 -0400 Received: by mail-wr1-x42e.google.com with SMTP id x8so7035984wrq.9 for ; Mon, 17 May 2021 09:20:21 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id f14sm5599450wry.40.2021.05.17.09.20.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 May 2021 09:20:14 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id BBFD81FFB1; Mon, 17 May 2021 17:10:25 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=W7tjTvDwpWeS7WRwmPx5p6DYd0bz3KPUyEjh0yy6O08=; b=N7WKU6lvxE7z/9mK6cVnNVSyu81zH7h2ofEcLmiJkm+Cfd2vMLrdOWTzunkCkKHyfh sVVORNdrYREn7R2NOWVYy+KqleyogWs/E//7oiTLVWanOVOBoPUErETGum2NFJb9Rctw qtHMC/GY+fZLTYRaj+Ambj1SAXwS3MgCdFEeTXsxgB7BMg+y3mEfYAPROgnl/vcQd9tB EjtYhub4MfTtQ6XOtLnJiki2TLROl28qnV9OqLrxd9bsrqBZsm7oow/qUMSudn0N+Jpm QykHEpzkbr+Ls5D700yDA1oXrObMcoBI4ew3Rl2GLnMrPm7HVTe/Cu0+xasze3Xq7O8Z WpWw== 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=W7tjTvDwpWeS7WRwmPx5p6DYd0bz3KPUyEjh0yy6O08=; b=lB3U6PhU2pr63XummyPBGrFcjpM/D9nbXPrnW2ZTng9fz5h93Kr6A2ohbCn5SnVSGD LjUYvGfM8fXK9nQE/HJRFJGPaMJSEVbKi6pev25VoBwp5WJ0VD/W9i5FejU+SDqbuoTW psMVMAdP9JQkz/pG+FY6zQVhH0IFzgsHl853GWBqBjUtIMSHoiubXRG3yUV83mf+pPzi jLC0dCLz2Jj1iVk9M3l+B5vPdLM0E0ZoleSrZL9UohrRDPgGhu7foQu4lWufa0XALjlx CoLuVhFcePHQDt87PTUGJdcX+vn8zcm+zPY0MN0IbIbFVWlERxd7QQDDMhSR0Lz1zqaJ cyyw== X-Gm-Message-State: AOAM532ENdP/nSQcTryc8ihog8S+Wzm8jsCDUdu95REZab+WDA1dcMJU LgOBsO1HXDmCEM08obn5Odjvow== X-Google-Smtp-Source: ABdhPJx/I+/T+Fz/szJK3mvYk3tJihY853S8L0X7gxfx4apbBrvVNrLvxKKfWYrZWqm5Ra/8adx2Fg== X-Received: by 2002:adf:e38c:: with SMTP id e12mr580800wrm.128.1621268420071; Mon, 17 May 2021 09:20:20 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 27/29] plugins: Move all typedef and type declaration to the front of the qemu-plugin.h Date: Mon, 17 May 2021 17:10:20 +0100 Message-Id: <20210517161022.13984-28-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210517161022.13984-1-alex.bennee@linaro.org> References: <20210517161022.13984-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42e; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42e.google.com X-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: Yonggang Luo , =?UTF-8?q?Alex=20Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Yonggang Luo Signed-off-by: Yonggang Luo Signed-off-by: Alex Benn=C3=A9e Message-Id: <20210318185555.434-3-luoyonggang@gmail.com> Message-Id: <20210505092259.8202-3-alex.bennee@linaro.org> diff --git a/include/qemu/qemu-plugin.h b/include/qemu/qemu-plugin.h index 97cdfd7761..2cb17f3051 100644 --- a/include/qemu/qemu-plugin.h +++ b/include/qemu/qemu-plugin.h @@ -81,27 +81,6 @@ typedef struct qemu_info_t { }; } qemu_info_t; =20 -/** - * qemu_plugin_install() - Install a plugin - * @id: this plugin's opaque ID - * @info: a block describing some details about the guest - * @argc: number of arguments - * @argv: array of arguments (@argc elements) - * - * All plugins must export this symbol which is called when the plugin - * is first loaded. Calling qemu_plugin_uninstall() from this function - * is a bug. - * - * Note: @info is only live during the call. Copy any information we - * want to keep. @argv remains valid throughout the lifetime of the - * loaded plugin. - * - * Return: 0 on successful loading, !0 for an error. - */ -QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugin_id_t id, - const qemu_info_t *info, - int argc, char **argv); - /** * typedef qemu_plugin_simple_cb_t - simple callback * @id: the unique qemu_plugin_id_t @@ -135,6 +114,98 @@ typedef void (*qemu_plugin_vcpu_simple_cb_t)(qemu_plug= in_id_t id, typedef void (*qemu_plugin_vcpu_udata_cb_t)(unsigned int vcpu_index, void *userdata); =20 +/** struct qemu_plugin_tb - Opaque handle for a translation block */ +struct qemu_plugin_tb; +/** struct qemu_plugin_insn - Opaque handle for a translated instruction */ +struct qemu_plugin_insn; + +/** + * enum qemu_plugin_cb_flags - type of callback + * + * @QEMU_PLUGIN_CB_NO_REGS: callback does not access the CPU's regs + * @QEMU_PLUGIN_CB_R_REGS: callback reads the CPU's regs + * @QEMU_PLUGIN_CB_RW_REGS: callback reads and writes the CPU's regs + * + * Note: currently unused, plugins cannot read or change system + * register state. + */ +enum qemu_plugin_cb_flags { + QEMU_PLUGIN_CB_NO_REGS, + QEMU_PLUGIN_CB_R_REGS, + QEMU_PLUGIN_CB_RW_REGS, +}; + +enum qemu_plugin_mem_rw { + QEMU_PLUGIN_MEM_R =3D 1, + QEMU_PLUGIN_MEM_W, + QEMU_PLUGIN_MEM_RW, +}; + +/** + * typedef qemu_plugin_vcpu_tb_trans_cb_t - translation callback + * @id: unique plugin id + * @tb: opaque handle used for querying and instrumenting a block. + */ +typedef void (*qemu_plugin_vcpu_tb_trans_cb_t)(qemu_plugin_id_t id, + struct qemu_plugin_tb *tb); + +/** + * enum qemu_plugin_op - describes an inline op + * + * @QEMU_PLUGIN_INLINE_ADD_U64: add an immediate value uint64_t + * + * Note: currently only a single inline op is supported. + */ + +enum qemu_plugin_op { + QEMU_PLUGIN_INLINE_ADD_U64, +}; + +/** + * typedef qemu_plugin_meminfo_t - opaque memory transaction handle + * + * This can be further queried using the qemu_plugin_mem_* query + * functions. + */ +typedef uint32_t qemu_plugin_meminfo_t; +/** struct qemu_plugin_hwaddr - opaque hw address handle */ +struct qemu_plugin_hwaddr; + +typedef void +(*qemu_plugin_vcpu_mem_cb_t)(unsigned int vcpu_index, + qemu_plugin_meminfo_t info, uint64_t vaddr, + void *userdata); + +typedef void +(*qemu_plugin_vcpu_syscall_cb_t)(qemu_plugin_id_t id, unsigned int vcpu_in= dex, + int64_t num, uint64_t a1, uint64_t a2, + uint64_t a3, uint64_t a4, uint64_t a5, + uint64_t a6, uint64_t a7, uint64_t a8); +typedef void +(*qemu_plugin_vcpu_syscall_ret_cb_t)(qemu_plugin_id_t id, unsigned int vcp= u_idx, + int64_t num, int64_t ret); + +/** + * qemu_plugin_install() - Install a plugin + * @id: this plugin's opaque ID + * @info: a block describing some details about the guest + * @argc: number of arguments + * @argv: array of arguments (@argc elements) + * + * All plugins must export this symbol which is called when the plugin + * is first loaded. Calling qemu_plugin_uninstall() from this function + * is a bug. + * + * Note: @info is only live during the call. Copy any information we + * want to keep. @argv remains valid throughout the lifetime of the + * loaded plugin. + * + * Return: 0 on successful loading, !0 for an error. + */ +QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugin_id_t id, + const qemu_info_t *info, + int argc, char **argv); + /** * qemu_plugin_uninstall() - Uninstall a plugin * @id: this plugin's opaque ID @@ -205,41 +276,6 @@ void qemu_plugin_register_vcpu_idle_cb(qemu_plugin_id_= t id, void qemu_plugin_register_vcpu_resume_cb(qemu_plugin_id_t id, qemu_plugin_vcpu_simple_cb_t cb); =20 -/** struct qemu_plugin_tb - Opaque handle for a translation block */ -struct qemu_plugin_tb; -/** struct qemu_plugin_insn - Opaque handle for a translated instruction */ -struct qemu_plugin_insn; - -/** - * enum qemu_plugin_cb_flags - type of callback - * - * @QEMU_PLUGIN_CB_NO_REGS: callback does not access the CPU's regs - * @QEMU_PLUGIN_CB_R_REGS: callback reads the CPU's regs - * @QEMU_PLUGIN_CB_RW_REGS: callback reads and writes the CPU's regs - * - * Note: currently unused, plugins cannot read or change system - * register state. - */ -enum qemu_plugin_cb_flags { - QEMU_PLUGIN_CB_NO_REGS, - QEMU_PLUGIN_CB_R_REGS, - QEMU_PLUGIN_CB_RW_REGS, -}; - -enum qemu_plugin_mem_rw { - QEMU_PLUGIN_MEM_R =3D 1, - QEMU_PLUGIN_MEM_W, - QEMU_PLUGIN_MEM_RW, -}; - -/** - * typedef qemu_plugin_vcpu_tb_trans_cb_t - translation callback - * @id: unique plugin id - * @tb: opaque handle used for querying and instrumenting a block. - */ -typedef void (*qemu_plugin_vcpu_tb_trans_cb_t)(qemu_plugin_id_t id, - struct qemu_plugin_tb *tb); - /** * qemu_plugin_register_vcpu_tb_trans_cb() - register a translate cb * @id: plugin ID @@ -269,18 +305,6 @@ void qemu_plugin_register_vcpu_tb_exec_cb(struct qemu_= plugin_tb *tb, enum qemu_plugin_cb_flags flags, void *userdata); =20 -/** - * enum qemu_plugin_op - describes an inline op - * - * @QEMU_PLUGIN_INLINE_ADD_U64: add an immediate value uint64_t - * - * Note: currently only a single inline op is supported. - */ - -enum qemu_plugin_op { - QEMU_PLUGIN_INLINE_ADD_U64, -}; - /** * qemu_plugin_register_vcpu_tb_exec_inline() - execution inline op * @tb: the opaque qemu_plugin_tb handle for the translation @@ -393,16 +417,6 @@ uint64_t qemu_plugin_insn_vaddr(const struct qemu_plug= in_insn *insn); */ void *qemu_plugin_insn_haddr(const struct qemu_plugin_insn *insn); =20 -/** - * typedef qemu_plugin_meminfo_t - opaque memory transaction handle - * - * This can be further queried using the qemu_plugin_mem_* query - * functions. - */ -typedef uint32_t qemu_plugin_meminfo_t; -/** struct qemu_plugin_hwaddr - opaque hw address handle */ -struct qemu_plugin_hwaddr; - /** * qemu_plugin_mem_size_shift() - get size of access * @info: opaque memory transaction handle @@ -480,11 +494,6 @@ uint64_t qemu_plugin_hwaddr_phys_addr(const struct qem= u_plugin_hwaddr *haddr); */ const char *qemu_plugin_hwaddr_device_name(const struct qemu_plugin_hwaddr= *h); =20 -typedef void -(*qemu_plugin_vcpu_mem_cb_t)(unsigned int vcpu_index, - qemu_plugin_meminfo_t info, uint64_t vaddr, - void *userdata); - void qemu_plugin_register_vcpu_mem_cb(struct qemu_plugin_insn *insn, qemu_plugin_vcpu_mem_cb_t cb, enum qemu_plugin_cb_flags flags, @@ -496,21 +505,9 @@ void qemu_plugin_register_vcpu_mem_inline(struct qemu_= plugin_insn *insn, enum qemu_plugin_op op, void *pt= r, uint64_t imm); =20 - - -typedef void -(*qemu_plugin_vcpu_syscall_cb_t)(qemu_plugin_id_t id, unsigned int vcpu_in= dex, - int64_t num, uint64_t a1, uint64_t a2, - uint64_t a3, uint64_t a4, uint64_t a5, - uint64_t a6, uint64_t a7, uint64_t a8); - void qemu_plugin_register_vcpu_syscall_cb(qemu_plugin_id_t id, qemu_plugin_vcpu_syscall_cb_t cb= ); =20 -typedef void -(*qemu_plugin_vcpu_syscall_ret_cb_t)(qemu_plugin_id_t id, unsigned int vcp= u_idx, - int64_t num, int64_t ret); - void qemu_plugin_register_vcpu_syscall_ret_cb(qemu_plugin_id_t id, qemu_plugin_vcpu_syscall_ret_cb_t= cb); --=20 2.20.1 From nobody Sat May 18 23:44:09 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1621268595; cv=none; d=zohomail.com; s=zohoarc; b=LZNOXkr7QaMXEVfw6sHsDpv2w6Rl9bab84Ht57sbKapgMBI9GFVvrvTIlFLGLfUHGXqkceSTP2M1TDm+51WW1q1PLIM+FcFT2XRYSeUWUkaMkXbOdc/WiKeM4/J7d+aUcsFQdbAmV0CiA2v8c2XToGf/U+ADU1Id+E5MsfqTVrs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621268595; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=50j4O5HpF3lWjOwIwMIUVpGBggucg+cBxQSDFU6ktaY=; b=EicePdS+WSD0R1hdk91Pv/v+Lmx2sS5gl+dPCwLq3ymeoyqvdZDpKim/1wWSVKeoJ0YL+N+7EBFWXStuTybKufnPbsjRUGiOHnWemjIPu2JP+vvPlpaj6fiEyMOTaYKJ8bHZy+T1w+jc7YFBQVuHTN1S/UC/75PoKXrBvPyctYc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1621268595380130.80403182601992; Mon, 17 May 2021 09:23:15 -0700 (PDT) Received: from localhost ([::1]:36100 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lig1R-00054r-Rr for importer@patchew.org; Mon, 17 May 2021 12:23:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60282) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lifyj-0001jn-5l for qemu-devel@nongnu.org; Mon, 17 May 2021 12:20:26 -0400 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]:55809) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lifyX-00025F-76 for qemu-devel@nongnu.org; Mon, 17 May 2021 12:20:24 -0400 Received: by mail-wm1-x329.google.com with SMTP id b7so3319118wmh.5 for ; Mon, 17 May 2021 09:20:12 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id r11sm12061267wrp.46.2021.05.17.09.20.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 May 2021 09:20:07 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id D3A4A1FFB3; Mon, 17 May 2021 17:10:25 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=50j4O5HpF3lWjOwIwMIUVpGBggucg+cBxQSDFU6ktaY=; b=KzOcjwKRx8HvVdwe+nX2EAot4dNihCmshqBCRhupJOhjH4Zk23y7H3X8t0SS6PJYoz Zi1G1DSkzm7UrTVMZ+qY1g2A1oD0KCao+e1DXTKKPCY+6UZY43zoXXo9kdKrQ5XWj9Rf mNcJ9NFFgP1nGUVCmYFgYymWQSst6E14jYp+PsByT/RMYwp4MjkEV749k45o67STO9+9 C1zXAFfahGkVCVnVESzu95lEk4fSC2b5LsgdLDG6R9ka20Zq7sf+46R5VyNz47BImg2O 1pJ96Ufiycn8DamMdy5+CqmW3pk0cZ3lzz09Cu/315nAm8YFx1DCg51lmQ8RZcnh5Txc nu4Q== 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=50j4O5HpF3lWjOwIwMIUVpGBggucg+cBxQSDFU6ktaY=; b=S5VbzEATVRqDluPcgHfuXO9wUd4L7liSFdd24jbBJ/u4kOvuadumdb0XY7RDZq10Dt FAQnaHShrRYGMfk9u+R9xzbFXqmLDKkA/18+LUvZNntI6B2Oy0A+regUoembrmlM+Vpv k+9y4radeJ3LydUXkhAegsc4xqydKrbHCt0HSMT3c8SVrgj4AIMqg0M+FmcUWEW7vFC2 hc+OQylGoNrxVcu8fo4r3QTQbKmyY3UruczO6RNO2HCroWha9CRzW+YPekkIWjnLdurm YPQ2MeWYFU/ejG7KExCskeIFqAcJgSdp9WaeSKHJ8k+qWQkSFBzhCm2DtM6fm2+Zifhe BUcQ== X-Gm-Message-State: AOAM532RWJk1A+qaheIXZwxPbEzZQIAvRh57VZ6LXscA9egesxDlj2pH t0p/Cqlx0dJJW2ugo3mXXuyDyQ== X-Google-Smtp-Source: ABdhPJyoHV2IrHHqW58IgUSbQqvDuSwdTTCDCKJIcrtB5ftlQZCwWML4+MXcHKQd8nfruYqsFb+3KQ== X-Received: by 2002:a7b:c182:: with SMTP id y2mr424951wmi.125.1621268411830; Mon, 17 May 2021 09:20:11 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 28/29] plugins/hotblocks: Properly freed the hash table values Date: Mon, 17 May 2021 17:10:21 +0100 Message-Id: <20210517161022.13984-29-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210517161022.13984-1-alex.bennee@linaro.org> References: <20210517161022.13984-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::329; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x329.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: Mahmoud Mandour , =?UTF-8?q?Alex=20Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Mahmoud Mandour Freed the values stored in the hash table ``hotblocks`` returned by ``g_hash_table_get_values()`` by freeing the sorted list and destroyed the hash table afterward. Signed-off-by: Mahmoud Mandour Signed-off-by: Alex Benn=C3=A9e Message-Id: <20210422005043.3569-2-ma.mandourr@gmail.com> Message-Id: <20210505092259.8202-4-alex.bennee@linaro.org> diff --git a/contrib/plugins/hotblocks.c b/contrib/plugins/hotblocks.c index 4b08340143..64692c0670 100644 --- a/contrib/plugins/hotblocks.c +++ b/contrib/plugins/hotblocks.c @@ -68,10 +68,11 @@ static void plugin_exit(qemu_plugin_id_t id, void *p) rec->insns, rec->exec_count); } =20 - g_list_free(it); + g_list_free_full(it, g_free); g_mutex_unlock(&lock); } =20 + g_hash_table_destroy(hotblocks); qemu_plugin_outs(report->str); } =20 --=20 2.20.1 From nobody Sat May 18 23:44:09 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1621270629; cv=none; d=zohomail.com; s=zohoarc; b=OuRkP3OA0R7o4AqcvnidfyHkY5B0OzDYXZsXDlAOEnzF7lLd/HO2yRrmg5aQBmc13OYWEU3XFyci6N4X7WBGZI+xlmW0gCHqSsxdhRn0/S3HuohZOtI7wT8O5/E98/YW1OYm3KnMck6u0Ydu2snbuQSRC61j2FTlAnyPFne+BVo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621270629; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=aZuDUoz3vNGYexV1AEzGlzVlTs4kTeswm8li9GZxIko=; b=FatpEIksKldj9YFSi+oUIPmLE63/RHGQXyBqwjMhcg2yXfMBuQom/zm2Vq0J3Za5GjkfMyMOKbTk2+M48iVe6bHxYiU+2rMwBM56oZKh3OZ1dJYg+WTBiTMdTXzOBiff+dtQWxkoUg0FRIfT8H7WWl7jwkSDhrpsMAxFRYwDVnE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1621270629561162.58383922024427; Mon, 17 May 2021 09:57:09 -0700 (PDT) Received: from localhost ([::1]:34188 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ligYG-0004Hf-JO for importer@patchew.org; Mon, 17 May 2021 12:57:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60374) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lifyr-0001om-3M for qemu-devel@nongnu.org; Mon, 17 May 2021 12:20:33 -0400 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]:42596) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lifyi-0002DT-RN for qemu-devel@nongnu.org; Mon, 17 May 2021 12:20:32 -0400 Received: by mail-wm1-x32b.google.com with SMTP id f75-20020a1c1f4e0000b0290171001e7329so3952654wmf.1 for ; Mon, 17 May 2021 09:20:23 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id r1sm2333011wrt.67.2021.05.17.09.20.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 May 2021 09:20:14 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id EA6601FFB4; Mon, 17 May 2021 17:10:25 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=aZuDUoz3vNGYexV1AEzGlzVlTs4kTeswm8li9GZxIko=; b=JV7tltDSdSR9KmszjToHv6VBlamZSzMvBvKcaPronfV5LOmDnZVCqwlytyO+ha9CTb Bp9U1AQtHl6gT4CusHJp0A6lsy2w0TpNhDQJpgA92L/Md202XA7AT2GaiMPwV1ILJ1eR 5+DtnWDNuDE4lLDRiIHAc/MzF/cwl3WuaJEpnvPovanYvGLzAfLseIcTwfVT9kIw77kk neq00oaA9dMzGG9xraxEGlrKBs5L9vr/n4P5Gam8krGIrKur7sViX3BxiutL6V9jGOBW 50/5yGUwAvP1KZEbf3tGNSFiQt5XGmeuO8uuY92R/h64MLd/M7d3/mY97br4Km4HJTX6 VGuQ== 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=aZuDUoz3vNGYexV1AEzGlzVlTs4kTeswm8li9GZxIko=; b=gpYRa/wwC+/ZuCu0zFa21rMuFMZwYgWCkDTc7WOszv/sFOoz40/ofErXSbFNzGA7BM VloQ3bL0sG8VhO56fy5gMhHNwnFYQghEBfDU/Gq4+FVDpi8rv00RWmlH4csaRqPq9VOF VJGJD+gnM76ruJC/IwfxN/7+lebOZVtv1EJuIgGwJS45KEdOlUNcE+W8YUjllfgVvTR3 7C0WCgfrtc41Oqi2dBLb68E85FcWXkMIoKypjGHgBSJKDXRPBU49qZc+jsCgk0tNnCVe 2yMBJSB8FJbNp4hTDtIChVnqyN+HgDpTHMIO0dHvX5whz+Ai1xM3TJsYS+M0zMamS6Hy dRCQ== X-Gm-Message-State: AOAM530QUoVL1+xzz1R3W/9BgiLE23oOHJ90sRSmynVuB+qzxJN1Lm0X 3amthcFy3+clLJ3n1kKvdb1e4g== X-Google-Smtp-Source: ABdhPJwDCqubkyXWeDwC7sOkZhZ/ykhcBtsUATGEqyBruQPAkcmSADf+Ul96p55sMM/JVvSVs71p6w== X-Received: by 2002:a1c:e408:: with SMTP id b8mr441275wmh.85.1621268422887; Mon, 17 May 2021 09:20:22 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 29/29] plugins/hotpages: Properly freed the hash table values Date: Mon, 17 May 2021 17:10:22 +0100 Message-Id: <20210517161022.13984-30-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210517161022.13984-1-alex.bennee@linaro.org> References: <20210517161022.13984-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32b; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32b.google.com X-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: Mahmoud Mandour , =?UTF-8?q?Alex=20Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Mahmoud Mandour Allocated ``pages`` hash table through ``g_hash_table_new_full`` to add a freeing function & destroyed the hash table on exit. Signed-off-by: Mahmoud Mandour Signed-off-by: Alex Benn=C3=A9e Message-Id: <20210422005043.3569-3-ma.mandourr@gmail.com> Message-Id: <20210505092259.8202-5-alex.bennee@linaro.org> diff --git a/contrib/plugins/hotpages.c b/contrib/plugins/hotpages.c index bf53267532..9cf7f02c77 100644 --- a/contrib/plugins/hotpages.c +++ b/contrib/plugins/hotpages.c @@ -97,13 +97,14 @@ static void plugin_exit(qemu_plugin_id_t id, void *p) g_list_free(it); } =20 + g_hash_table_destroy(pages); qemu_plugin_outs(report->str); } =20 static void plugin_init(void) { page_mask =3D (page_size - 1); - pages =3D g_hash_table_new(NULL, g_direct_equal); + pages =3D g_hash_table_new_full(NULL, g_direct_equal, NULL, g_free); } =20 static void vcpu_haddr(unsigned int cpu_index, qemu_plugin_meminfo_t memin= fo, --=20 2.20.1