From patchwork Tue May 18 09:06:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 12264235 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 794A2C433B4 for ; Tue, 18 May 2021 09:09:15 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D7D2C60720 for ; Tue, 18 May 2021 09:09:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D7D2C60720 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:35926 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1liviz-0001wW-S8 for qemu-devel@archiver.kernel.org; Tue, 18 May 2021 05:09:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55404) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1livhG-0007m9-Rj for qemu-devel@nongnu.org; Tue, 18 May 2021 05:07:26 -0400 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]:38852) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1livhF-0005PB-4X for qemu-devel@nongnu.org; Tue, 18 May 2021 05:07:26 -0400 Received: by mail-wm1-x32c.google.com with SMTP id u4-20020a05600c00c4b02901774b80945cso1045339wmm.3 for ; Tue, 18 May 2021 02:07:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=hNbaGxhqPGsZO3tTrtNT3mznUNT/xWUzHwS2o2IUsWc=; b=XDBDblTNM9H+yWCwcRRwxuhMSDMhDUBbD9nKQzW2pfvGaHiCU5olEvRchcROt4uz1Q zGMaen+sU2nsF8e5qlq6Vq5E2bm/1fsLVwla85rqnnYbpq72pwf/f9p9fddgc2zFxp/T 6LqTCNKobQUlH3S/BM93jxXFQEpTCXHFs5az3MI1uRBMaq73CIsbP74i/u2eobIuhO4A sDs+xG5pylyc6jHkaWJ4SxkfAtTXb3nJYL8d2bNxGTcgZgvpRUQ1cQr1u/fDnHvIHEq2 loL2NQuBG1d1HVPS1XOZBMl8Ke213U9iKrFopoYowbi48k82OTU/07T/NVL3IMTl0Hd7 VwMA== 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=hNbaGxhqPGsZO3tTrtNT3mznUNT/xWUzHwS2o2IUsWc=; b=KxTb9ia/TTJOcgq+BJ21POZAUHFaI2WArXAzuSF1e0u09hsxPhOoVE8kcjECVMh4CK nBzqw83wal7a1T5O1joLWwtBayhWA2vvPX8x+Cs+OtwMavwplq8LDQFs67urb95TckxQ /C1k58Z3SVeIMGbB04MHlBzEHCvoUrtVQNnWZ2VFxjmh9e/AgupGdXFe3MLxdthaztwf 6f9gaJW3EpsEOOnKxB4bjiqREnl2IZ3fMkSvLGkAKxqQLzYv9ZYw4DFuUqjqNAU2fisu +HryuodCdWkk27k5uQ1HK5EBzrA1HGxikxf0GSvZ3/ahP8mqi9yZ6J7hcvtv8uBPDHg1 XU3w== X-Gm-Message-State: AOAM5323jS7fpj+kf+Jw8Pf6dW5vuWyAE81bqN1BDUeU8+SwjDDno8gV 5BFsFYaKHy+xPW2ILp1Ry6ih/g== X-Google-Smtp-Source: ABdhPJyz62oqBEM1GvkX4eUi7ZXpnm17mNko6kze7YiIYzlOEFFVYZHQPGyPVa3bEh8d0i+xzHrPQw== X-Received: by 2002:a05:600c:3798:: with SMTP id o24mr3917792wmr.12.1621328843629; Tue, 18 May 2021 02:07:23 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id x2sm7276469wmj.3.2021.05.18.02.07.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 May 2021 02:07:21 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 0D5251FF87; Tue, 18 May 2021 10:07:21 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL v2 01/29] tests/docker: fix copying of executable in "update" Date: Tue, 18 May 2021 10:06:52 +0100 Message-Id: <20210518090720.21915-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210518090720.21915-1-alex.bennee@linaro.org> References: <20210518090720.21915-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Huth , qemu-devel@nongnu.org, Wainer dos Santos Moschetta , =?utf-8?q?Philippe_Mathi?= =?utf-8?q?eu-Daud=C3=A9?= , Willian Rampazzo , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" We have the same symlink chasing problem when doing an "update" operation. Fix that. Based-on: 5e33f7fead ("tests/docker: better handle symlinked libs") Signed-off-by: Alex Bennée Reviewed-by: Willian Rampazzo 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 = _get_so_libs(args.executable) if libs: for l in libs: - tmp_tar.add(os.path.realpath(l), arcname=l) + so_path = os.path.dirname(l) + name = os.path.basename(l) + real_l = os.path.realpath(l) + try: + tmp_tar.add(real_l, arcname="%s/%s" % (so_path, name)) + except FileNotFoundError: + print("Couldn't add %s/%s to archive" % (so_path, name)) + pass # Create a Docker buildfile df = StringIO() From patchwork Tue May 18 09:06:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 12264239 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5CAB3C433B4 for ; Tue, 18 May 2021 09:09:18 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BC51F610CC for ; Tue, 18 May 2021 09:09:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BC51F610CC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:36086 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1livj1-00022r-UR for qemu-devel@archiver.kernel.org; Tue, 18 May 2021 05:09:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55462) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1livhI-0007mh-To for qemu-devel@nongnu.org; Tue, 18 May 2021 05:07:28 -0400 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]:38834) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1livhG-0005Pu-OC for qemu-devel@nongnu.org; Tue, 18 May 2021 05:07:28 -0400 Received: by mail-wr1-x430.google.com with SMTP id j14so7587387wrq.5 for ; Tue, 18 May 2021 02:07:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=oKQRss2uIBpRXo6hgFfm/Wk+D//+r61sABFE2JlaFZg=; b=WeeCyq1n8l1luYCg9Z06/+h6ukfDsAV9uV7wM1zC8IbBA4DQZKHjia5sHAOYAJhqoJ tkoaN1UPfSChEd7Pey2H39VynxBMtmpD2LoJb2A4xE7UMLPf+s+NJFu6fn8lj6y4QhaB m6c2m1pdXyazWac4/oC4uC6WN+qyd7aw5SK1BhCAz2YoYdokUJlOuJoCJZq0aL5fSJLS 9aXwDqT+C5uv/0566PT4bGGYGn/uvHa/PQ6HXhUlb0oafW9VGaL90CmRt5HCpYHdqcXS b0Dtp1YNZ5R+sAxZy9qVH/PAafEB/G7vtX5tedELESPAY2Hg/7kc1pfOm2sVe2VcIax2 NCgg== 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=oKQRss2uIBpRXo6hgFfm/Wk+D//+r61sABFE2JlaFZg=; b=qG4Gr8AF/RVMkCyFPRmX7zyIBuSOkc7bMHSLTkgwbNtDdtts1ihVlAexw6FMGlHzk2 VqDNuJEp7xsB++OBNyrlYGX1NcuIFdc4a3w9UjoC6SDEAAbakk4Xhv4rRnLzdQVUs8ML 9VSURP4ZIG67rgPzwWNcE50gGFv5mFUHrwGna6rO4LJ6P+Z+ii7hM1Ncltiu/eVXaEwG 54bo1APAndX7Yh9vXX5UuSNcneC0OsFJWAR8gPcPe8H1Chx+zkZdaqApQ8Fmq5YaT2Fg XzUeFe0howvU+f2A4+Txdys4evNgaWpb1JmOUqDDjlqgbufO9CZE7mw832MIBg2VVDF0 S7DA== X-Gm-Message-State: AOAM531eQH9aSwm+pQiK8fdnQX+PElA2JqKh1MeE5fxGK9vuEM9xZZzd FmJa3AutKmAN1EI50cxCvVtLvA== X-Google-Smtp-Source: ABdhPJwcnyIF1LNvcRfdNiIErPSy+ONy0BPtkn/2fG/vtXtvlqDXnaStURVnnusr7NdrMfRTPGF9Vg== X-Received: by 2002:a5d:6291:: with SMTP id k17mr5632498wru.247.1621328845376; Tue, 18 May 2021 02:07:25 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id r7sm15882585wmq.18.2021.05.18.02.07.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 May 2021 02:07:21 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 254371FF8C; Tue, 18 May 2021 10:07:21 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL v2 02/29] tests/docker: make executable an optional argument to "update" Date: Tue, 18 May 2021 10:06:53 +0100 Message-Id: <20210518090720.21915-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210518090720.21915-1-alex.bennee@linaro.org> References: <20210518090720.21915-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x430.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Huth , qemu-devel@nongnu.org, Wainer dos Santos Moschetta , =?utf-8?q?Philippe_Mathi?= =?utf-8?q?eu-Daud=C3=A9?= , Willian Rampazzo , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" We're going to extend the abilities of the command shortly. Reviewed-by: Willian Rampazzo Signed-off-by: Alex Bennée 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="Image Tag") - parser.add_argument("executable", + parser.add_argument("--executable", help="Executable to copy") def run(self, args, argv): @@ -532,35 +532,37 @@ def run(self, args, argv): tmp = tempfile.NamedTemporaryFile(suffix="dckr.tar.gz") tmp_tar = TarFile(fileobj=tmp, mode='w') - # Add the executable to the tarball, using the current - # configured binfmt_misc path. If we don't get a path then we - # only need the support libraries copied - ff, enabled = _check_binfmt_misc(args.executable) - - if not enabled: - print("binfmt_misc not enabled, update disabled") - return 1 - - if ff: - tmp_tar.add(args.executable, arcname=ff) - - # Add any associated libraries - libs = _get_so_libs(args.executable) - if libs: - for l in libs: - so_path = os.path.dirname(l) - name = os.path.basename(l) - real_l = os.path.realpath(l) - try: - tmp_tar.add(real_l, arcname="%s/%s" % (so_path, name)) - except FileNotFoundError: - print("Couldn't add %s/%s to archive" % (so_path, name)) - pass - # Create a Docker buildfile df = StringIO() df.write(u"FROM %s\n" % args.tag) - df.write(u"ADD . /\n") + + if args.executable: + # Add the executable to the tarball, using the current + # configured binfmt_misc path. If we don't get a path then we + # only need the support libraries copied + ff, enabled = _check_binfmt_misc(args.executable) + + if not enabled: + print("binfmt_misc not enabled, update disabled") + return 1 + + if ff: + tmp_tar.add(args.executable, arcname=ff) + + # Add any associated libraries + libs = _get_so_libs(args.executable) + if libs: + for l in libs: + so_path = os.path.dirname(l) + name = os.path.basename(l) + real_l = os.path.realpath(l) + try: + tmp_tar.add(real_l, arcname="%s/%s" % (so_path, name)) + except FileNotFoundError: + print("Couldn't add %s/%s to archive" % (so_path, name)) + pass + + df.write(u"ADD . /\n") df_bytes = BytesIO(bytes(df.getvalue(), "UTF-8")) From patchwork Tue May 18 09:06:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 12264281 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 92E9FC433ED for ; Tue, 18 May 2021 09:12:51 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 40890611CC for ; Tue, 18 May 2021 09:12:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 40890611CC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:44476 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1livmU-0007l8-AF for qemu-devel@archiver.kernel.org; Tue, 18 May 2021 05:12:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55464) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1livhJ-0007n8-4J for qemu-devel@nongnu.org; Tue, 18 May 2021 05:07:29 -0400 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]:54861) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1livhH-0005Qo-Cf for qemu-devel@nongnu.org; Tue, 18 May 2021 05:07:28 -0400 Received: by mail-wm1-x334.google.com with SMTP id o127so4979519wmo.4 for ; Tue, 18 May 2021 02:07:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=k3GgIZwo1ALDw7AyuDX5LfQUKo52ZHvXcuy3wRBGlmI=; b=T1Ke2WSA+sKRz1V1wNjsW35K4N3kKn6JOCvD77u9/KQ7rqi1p7nVA97kFLrGfpHLhD oL5dnJAnYhI8dukQ6o7wuslvMuxabzj7VuKsCdC6V4PES0wFSYCJUXHY2xYVW+SMDYqm ElqNwo8wdv7JiIlSt/aPY9elcp5pWLc429P0ZtLc0zppNioM/1BQJSxTCr3C4WOm1Fhm qkwRbIxpsEZI9Ped0k2e1V76lDdtQ8sYjyG5xmuboLnWnIu3B/jefC8iOEBvNdgQQ7qI EtvAuYO1vAx07qXMZPk4S4xuzLrp5fhK3MYHeqSotBNWEUET4l1C+21eOxmd/rF/LIQi akdw== 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=k3GgIZwo1ALDw7AyuDX5LfQUKo52ZHvXcuy3wRBGlmI=; b=Ze1qbadBRwWe/1/YCOCH9KjGYusN+c3nlM5fR2lIGa81FuUgFzREsqUeOi3Jk6BHqU cwELuJ9qgZKRR/oD96eRgSNRCtaxYeyWb5dRpfkhCiOGiOVjRcL3uscgYitfltBv3eWn FOnnvYNlQovds0Yzco3te8FWw4fQOkLptsI0wSIvh0ZazsQKw0o6NENHn1gmOJRJ0WvO v8cNOSSJr6j7xp+X5NVMYPZuldJk9i2FjjWnD03NtEQRLoRaMHIF7eWuztCbaHoxwDpO vojhaCmwIbiGT7/FL+Lag3GoK1wvprLiHA87ZdJQsnReqsnRoFFuXEEuZ84I56LORc69 4gtw== X-Gm-Message-State: AOAM5311/HZprSjnT7qW2In6ADOcY9Gf3yeL3wwwyHsXORBQXYr4Jcun bhiPxxbXqcH/MvDCX+H6OBQaZA== X-Google-Smtp-Source: ABdhPJyqZUw0XQ6eR+en05NbdZRZNRQT8/+v/CHBni3J6eMArBoOmeVbKo3cHHCJ2eYeB36RAC0MPQ== X-Received: by 2002:a7b:cb85:: with SMTP id m5mr926923wmi.118.1621328845970; Tue, 18 May 2021 02:07:25 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id x13sm10604875wro.31.2021.05.18.02.07.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 May 2021 02:07:22 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 3A7D81FF8F; Tue, 18 May 2021 10:07:21 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL v2 03/29] tests/docker: allow "update" to add the current user Date: Tue, 18 May 2021 10:06:54 +0100 Message-Id: <20210518090720.21915-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210518090720.21915-1-alex.bennee@linaro.org> References: <20210518090720.21915-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x334.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Huth , qemu-devel@nongnu.org, Wainer dos Santos Moschetta , =?utf-8?q?Philippe_Mathi?= =?utf-8?q?eu-Daud=C3=A9?= , Willian Rampazzo , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" The current user functionality is used for cross compiling to avoid complications with permissions when building test programs. However for images that come from the registry we still need the ability to add the user after the fact. Reviewed-by: Willian Rampazzo Signed-off-by: Alex Bennée 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): class UpdateCommand(SubCommand): - """ Update a docker image with new executables. Args: """ + """ Update a docker image. Args: """ name = "update" def args(self, parser): @@ -525,6 +525,9 @@ def args(self, parser): help="Image Tag") parser.add_argument("--executable", help="Executable to copy") + parser.add_argument("--add-current-user", "-u", dest="user", + action="store_true", + help="Add the current user to image's passwd") def run(self, args, argv): # Create a temporary tarball with our whole build context and @@ -564,6 +567,13 @@ def run(self, args, argv): df.write(u"ADD . /\n") + if args.user: + uid = os.getuid() + uname = getpwuid(uid).pw_name + df.write("\n") + df.write("RUN id %s 2>/dev/null || useradd -u %d -U %s" % + (uname, uid, uname)) + df_bytes = BytesIO(bytes(df.getvalue(), "UTF-8")) df_tar = TarInfo(name="Dockerfile") From patchwork Tue May 18 09:06:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 12264283 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 74DBAC433B4 for ; Tue, 18 May 2021 09:12:52 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 39521611CC for ; Tue, 18 May 2021 09:12:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 39521611CC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:44522 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1livmV-0007mi-7a for qemu-devel@archiver.kernel.org; Tue, 18 May 2021 05:12:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55488) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1livhL-0007tG-NJ for qemu-devel@nongnu.org; Tue, 18 May 2021 05:07:31 -0400 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]:46674) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1livhJ-0005Rx-KC for qemu-devel@nongnu.org; Tue, 18 May 2021 05:07:31 -0400 Received: by mail-wr1-x434.google.com with SMTP id y14so7241191wrm.13 for ; Tue, 18 May 2021 02:07:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=iLkCUVtUulJ2g8D+2QnEZXZOurs4a/57hc6xJ37hdkM=; b=UAzAkxueHkNZvp4be7rfU4M1J81KAF0ullEP49AAgibsoS4tbdC6yPmtQcaVoVANx3 fHV1cT8hecGsYwo64Y75itJjzQT/FOfF5Xvw3vX1kzyty4rrw/vDGeHSEd7AVpoUFuQK 3+8gtWUlaJfEGX8JynPcsADr96ApeV8YZTtyiXpJcIzHqWI97YrE6L+mQvG3yhqGAwdo bmpVRbagl7Ec1DGna1SFq55O+fOr9wb2MuAOzQRZYnoyicRiI+aA7zskpWbmASrT5SpF vlodJFwz6vaAe3SErODqy0LJHgS6vpL28VAxDzU7FoA5WbggEuasrpl2Ud4Fp0MELBUZ ORPA== 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=iLkCUVtUulJ2g8D+2QnEZXZOurs4a/57hc6xJ37hdkM=; b=Fye74MptOhrRbLbcnTfyfJFnNZFRrjyjox7hrS7c42VbOXHQcZxypD31GEWcsTV5jm YZpiAG8LGyfsULzwyAPksz7SyFnd4QebtHJ2dqGgtu/bYTXiZkdJk2vSQI9nD/8HPZDT 5jRCe3jUBa8qKpGgsKcnFWpZxm9Fm00nYrz8CIjp43v24luWHhYMtQgXDNGjfWv6eLhT RgM2uU6qrgqPK9On0EBz1m5b5JqgdsHhCpCk+7kggK1YNLwthCuc1qPkOhjGDWKY1pc8 tWMm70J6esvCMH/yMp4IH7is/kBXHuQD/uOIBvr29Fi53OKnQ7PvJdesPxdjwGvWlAxM jdCQ== X-Gm-Message-State: AOAM533e7csE3WRVvDr3HJake2bUwfyVUDUf/02wGfDjUImyKLaia7bh L2yjt9llQRKO8oNMvPpP5S6lig== X-Google-Smtp-Source: ABdhPJyfvoul09JAMghtRiMbs3hD49PZoOMfEmu/SzpVXE+SslKfNsEBfyBWR5Tbht+E2snxGrCpog== X-Received: by 2002:adf:ee0c:: with SMTP id y12mr5526772wrn.335.1621328848122; Tue, 18 May 2021 02:07:28 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id x16sm20442417wrp.6.2021.05.18.02.07.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 May 2021 02:07:25 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 5070C1FF90; Tue, 18 May 2021 10:07:21 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL v2 04/29] tests/docker: add "fetch" sub-command Date: Tue, 18 May 2021 10:06:55 +0100 Message-Id: <20210518090720.21915-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210518090720.21915-1-alex.bennee@linaro.org> References: <20210518090720.21915-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x434.google.com X-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_Mathi?= =?utf-8?q?eu-Daud=C3=A9?= , Willian Rampazzo , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" This simply wraps up fetching a build from the registry and tagging it as the local build. Reviewed-by: Willian Rampazzo Signed-off-by: Alex Bennée 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): return 0 +class FetchCommand(SubCommand): + """ Fetch a docker image from the registry. Args: """ + name = "fetch" + + def args(self, parser): + parser.add_argument("tag", + help="Local tag for image") + parser.add_argument("registry", + help="Docker registry") + + def run(self, args, argv): + dkr = Docker() + dkr.command(cmd="pull", quiet=args.quiet, + argv=["%s/%s" % (args.registry, args.tag)]) + dkr.command(cmd="tag", quiet=args.quiet, + argv=["%s/%s" % (args.registry, args.tag), args.tag]) + class UpdateCommand(SubCommand): """ Update a docker image. Args: """ From patchwork Tue May 18 09:06:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 12264285 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.9 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,URIBL_BLACK, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4A695C433B4 for ; Tue, 18 May 2021 09:12:59 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B3D97611CC for ; Tue, 18 May 2021 09:12:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B3D97611CC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:44690 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1livmb-0007tz-SZ for qemu-devel@archiver.kernel.org; Tue, 18 May 2021 05:12:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55540) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1livhP-00082O-SX for qemu-devel@nongnu.org; Tue, 18 May 2021 05:07:35 -0400 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]:36596) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1livhK-0005Sj-Ff for qemu-devel@nongnu.org; Tue, 18 May 2021 05:07:35 -0400 Received: by mail-wm1-x32d.google.com with SMTP id n17-20020a7bc5d10000b0290169edfadac9so1060226wmk.1 for ; Tue, 18 May 2021 02:07:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=UlpFXmqq5bThry8cwDRWyiNrM1DpTdOCe+EjGMnyA/o=; b=ZD4ZzbfSQxmyDpD/9vzlbikE0K5b14SNU9PK7XMt1Sv9cfdGIJ5YJwbNmIh1tsk4Ie di7gYdDoqsoFOnxgLYoueipY842njfLeddGb70uSeOKzcKgi5uhKBBHnvirksEtN14sd Hp1pDcX/ARHOYHTqfxS8ttumOnWbCNm+JkQ3MEe43E8GKzznSvqB+Kwwhfa4hru5pube nccE0huoRPkyKti9ne5fwmFqyGd7TfwY1dDz892I1Kqj5XhCYjFfaXdRC8bPKN+5eeTZ pJ96sLddlBXe5bqRsNgryaplFvu1rWb66Cb4k4nwlOEQ585eVzb4E5Wa4uJIP5I+YoX6 ZOpg== 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=UlpFXmqq5bThry8cwDRWyiNrM1DpTdOCe+EjGMnyA/o=; b=L+8ygX6X2LN3FD8fa8j1fYee/3FYpd6mXcZPZi6RFS0hxwp/ZghdE4bPHthp7G7LAo XxqCfWyJJ2qES0y15mROUh4f7R7hU4ZWmSdAuYEB1Y/9Mm2JVAPbdsvDaJ53olsCDYz0 i/yEWzWmww8XMFXmkOjv6vedzBdrGPWcxwI5cnkaTNssRX0X+tANy9rp5b0TRTCs0EBo RyzJxWMMRcwfSy1Y2cdasIyMUMCxc+Fw6QNf0lSFPkVafz1OMZ5rNDWfKRXFkY32nxZn b9VgGWD3YKc941pCWTwcwEvpZS4ouZUcxFL2VUoBNpvF6xnrVi14Wk+Y8KLymDrWuFEN n8ug== X-Gm-Message-State: AOAM5309dICZXG7WJqarTXFjeKoL+/R2K7Dy9+ei+i1IELsIhfZRch5c CFbK9xWEb94EwoP0KDV0DprXVw== X-Google-Smtp-Source: ABdhPJxTiAVbvddS4yYZ9Vl2fwBdVfpJSQWgOjJrO1L4oapYqUaM1uhdj7N38D99c8/kXE23DHptUg== X-Received: by 2002:a7b:c096:: with SMTP id r22mr4348791wmh.144.1621328848903; Tue, 18 May 2021 02:07:28 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id t11sm20710687wrz.57.2021.05.18.02.07.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 May 2021 02:07:26 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 6CB781FF91; Tue, 18 May 2021 10:07:21 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL v2 05/29] docker: Add Hexagon image Date: Tue, 18 May 2021 10:06:56 +0100 Message-Id: <20210518090720.21915-6-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210518090720.21915-1-alex.bennee@linaro.org> References: <20210518090720.21915-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alessandro Di Federico , Brian Cain , Thomas Huth , qemu-devel@nongnu.org, Wainer dos Santos Moschetta , =?utf-8?q?Philippe_Mathi?= =?utf-8?q?eu-Daud=C3=A9?= , Willian Rampazzo , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Alessandro Di Federico This image is a little special because it takes a long time to build. As such most users don't want to be doing that and just pull random binaries from the ether as intended by the container gods. This involves someone with credentials and a beefy machine running: make docker-image-debian-hexagon-cross V=1 NOCACHE=1 J=30 docker tag qemu/debian-hexagon-cross registry.gitlab.com/qemu-project/qemu/qemu/debian-hexagon-cross docker push registry.gitlab.com/qemu-project/qemu/qemu/debian-hexagon-cross With a suitable binary in the "cloud" a normal user will run: make docker-image-debian-hexagon-cross or have it run for them through the dependency mechanism of our over-engineered makefiles and get the binary they wanted. There are a few wrinkles of course including needing to tweak the final image to have the credentials of the user so we can actually do our cross compiles. Tested-by: Philippe Mathieu-Daudé Reviewed-by: Willian Rampazzo Signed-off-by: Alex Bennée Cc: Alessandro Di Federico Cc: Philippe Mathieu-Daudé 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 HPPA (PA-RISC) TCG CPUs M: Richard Henderson diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include index 820423d718..8967ecf118 100644 --- a/tests/docker/Makefile.include +++ b/tests/docker/Makefile.include @@ -148,6 +148,28 @@ docker-image-debian-s390x-cross: docker-image-debian10 docker-image-debian-sh4-cross: docker-image-debian10 docker-image-debian-sparc64-cross: docker-image-debian10 +# +# The build rule for hexagon-cross is special in so far for most of +# the time we don't want to build it. While dockers caching does avoid +# this most of the time sometimes we want to force the issue. +# +docker-image-debian-hexagon-cross: $(DOCKER_FILES_DIR)/debian-hexagon-cross.docker + $(if $(NOCACHE), \ + $(call quiet-command, \ + $(DOCKER_SCRIPT) build -t qemu/debian-hexagon-cross -f $< \ + $(if $V,,--quiet) --no-cache \ + --registry $(DOCKER_REGISTRY) --extra-files \ + $(DOCKER_FILES_DIR)/debian-hexagon-cross.docker.d/build-toolchain.sh, \ + "BUILD", "debian-hexagon-cross"), \ + $(call quiet-command, \ + $(DOCKER_SCRIPT) fetch $(if $V,,--quiet) \ + qemu/debian-hexagon-cross $(DOCKER_REGISTRY), \ + "FETCH", "debian-hexagon-cross") \ + $(call quiet-command, \ + $(DOCKER_SCRIPT) update $(if $V,,--quiet) \ + qemu/debian-hexagon-cross --add-current-user, \ + "PREPARE", "debian-hexagon-cross")) + # Specialist build images, sometimes very limited tools docker-image-debian-tricore-cross: docker-image-debian10 docker-image-debian-all-test-cross: docker-image-debian10 diff --git a/tests/docker/dockerfiles/debian-hexagon-cross.docker b/tests/docker/dockerfiles/debian-hexagon-cross.docker new file mode 100644 index 0000000000..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=noninteractive apt install -yy eatmydata && \ + DEBIAN_FRONTEND=noninteractive eatmydata \ + apt install -y --no-install-recommends \ + bison \ + cmake \ + flex \ + lld \ + rsync \ + wget + +ENV TOOLCHAIN_INSTALL /usr/local +ENV ROOTFS /usr/local + +ENV LLVM_URL https://github.com/llvm/llvm-project/archive/bfcd21876adc3498065e4da92799f613e730d475.tar.gz +ENV MUSL_URL https://github.com/quic/musl/archive/aff74b395fbf59cd7e93b3691905aa1af6c0778c.tar.gz +ENV LINUX_URL https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.6.18.tar.xz + +ADD build-toolchain.sh /root/hexagon-toolchain/build-toolchain.sh + +RUN cd /root/hexagon-toolchain && ./build-toolchain.sh + +FROM debian:buster-slim +# Duplicate deb line as deb-src +RUN cat /etc/apt/sources.list | sed "s/^deb\ /deb-src /" >> /etc/apt/sources.list +# Install QEMU build deps for use in CI +RUN apt update && \ + DEBIAN_FRONTEND=noninteractive apt install -yy eatmydata && \ + DEBIAN_FRONTEND=noninteractive eatmydata apt install -yy git ninja-build && \ + DEBIAN_FRONTEND=noninteractive eatmydata \ + apt build-dep -yy --arch-only qemu +COPY --from=0 /usr/local /usr/local +ENV PATH $PATH:/usr/local/bin/ diff --git a/tests/docker/dockerfiles/debian-hexagon-cross.docker.d/build-toolchain.sh b/tests/docker/dockerfiles/debian-hexagon-cross.docker.d/build-toolchain.sh new file mode 100755 index 0000000000..19b1c9f83e --- /dev/null +++ b/tests/docker/dockerfiles/debian-hexagon-cross.docker.d/build-toolchain.sh @@ -0,0 +1,141 @@ +#!/bin/bash + +set -e + +BASE=$(readlink -f ${PWD}) + +TOOLCHAIN_INSTALL=$(readlink -f "$TOOLCHAIN_INSTALL") +ROOTFS=$(readlink -f "$ROOTFS") + +TOOLCHAIN_BIN=${TOOLCHAIN_INSTALL}/bin +HEX_SYSROOT=${TOOLCHAIN_INSTALL}/hexagon-unknown-linux-musl +HEX_TOOLS_TARGET_BASE=${HEX_SYSROOT}/usr + +function cdp() { + DIR="$1" + mkdir -p "$DIR" + cd "$DIR" +} + +function fetch() { + DIR="$1" + URL="$2" + TEMP="$(readlink -f "$PWD/tmp.tar.gz")" + wget --quiet "$URL" -O "$TEMP" + cdp "$DIR" + tar xaf "$TEMP" --strip-components=1 + rm "$TEMP" + cd - +} + +build_llvm_clang() { + fetch "$BASE/llvm-project" "$LLVM_URL" + cdp "$BASE/build-llvm" + + cmake -G Ninja \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=${TOOLCHAIN_INSTALL} \ + -DLLVM_ENABLE_LLD=ON \ + -DLLVM_TARGETS_TO_BUILD="Hexagon" \ + -DLLVM_ENABLE_PROJECTS="clang;lld" \ + "$BASE/llvm-project/llvm" + ninja all install + cd ${TOOLCHAIN_BIN} + ln -sf clang hexagon-unknown-linux-musl-clang + ln -sf clang++ hexagon-unknown-linux-musl-clang++ + ln -sf llvm-ar hexagon-unknown-linux-musl-ar + ln -sf llvm-objdump hexagon-unknown-linux-musl-objdump + ln -sf llvm-objcopy hexagon-unknown-linux-musl-objcopy + ln -sf llvm-readelf hexagon-unknown-linux-musl-readelf + ln -sf llvm-ranlib hexagon-unknown-linux-musl-ranlib + + # workaround for now: + cat < hexagon-unknown-linux-musl.cfg +-G0 --sysroot=${HEX_SYSROOT} +EOF +} + +build_clang_rt() { + cdp "$BASE/build-clang_rt" + cmake -G Ninja \ + -DCMAKE_BUILD_TYPE=Release \ + -DLLVM_CONFIG_PATH="$BASE/build-llvm/bin/llvm-config" \ + -DCMAKE_ASM_FLAGS="-G0 -mlong-calls -fno-pic --target=hexagon-unknown-linux-musl " \ + -DCMAKE_SYSTEM_NAME=Linux \ + -DCMAKE_C_COMPILER="${TOOLCHAIN_BIN}/hexagon-unknown-linux-musl-clang" \ + -DCMAKE_ASM_COMPILER="${TOOLCHAIN_BIN}/hexagon-unknown-linux-musl-clang" \ + -DCMAKE_INSTALL_PREFIX=${HEX_TOOLS_TARGET_BASE} \ + -DCMAKE_CROSSCOMPILING=ON \ + -DCMAKE_C_COMPILER_FORCED=ON \ + -DCMAKE_CXX_COMPILER_FORCED=ON \ + -DCOMPILER_RT_BUILD_BUILTINS=ON \ + -DCOMPILER_RT_BUILTINS_ENABLE_PIC=OFF \ + -DCMAKE_SIZEOF_VOID_P=4 \ + -DCOMPILER_RT_OS_DIR= \ + -DCAN_TARGET_hexagon=1 \ + -DCAN_TARGET_x86_64=0 \ + -DCOMPILER_RT_SUPPORTED_ARCH=hexagon \ + -DLLVM_ENABLE_PROJECTS="compiler-rt" \ + "$BASE/llvm-project/compiler-rt" + ninja install-compiler-rt +} + +build_musl_headers() { + fetch "$BASE/musl" "$MUSL_URL" + cd "$BASE/musl" + make clean + CC=${TOOLCHAIN_BIN}/hexagon-unknown-linux-musl-clang \ + CROSS_COMPILE=hexagon-unknown-linux-musl \ + LIBCC=${HEX_TOOLS_TARGET_BASE}/lib/libclang_rt.builtins-hexagon.a \ + CROSS_CFLAGS="-G0 -O0 -mv65 -fno-builtin -fno-rounding-math --target=hexagon-unknown-linux-musl" \ + ./configure --target=hexagon --prefix=${HEX_TOOLS_TARGET_BASE} + PATH=${TOOLCHAIN_BIN}:$PATH make CROSS_COMPILE= install-headers + + cd ${HEX_SYSROOT}/.. + ln -sf hexagon-unknown-linux-musl hexagon +} + +build_kernel_headers() { + fetch "$BASE/linux" "$LINUX_URL" + mkdir -p "$BASE/build-linux" + cd "$BASE/linux" + make O=../build-linux ARCH=hexagon \ + KBUILD_CFLAGS_KERNEL="-mlong-calls" \ + CC=${TOOLCHAIN_BIN}/hexagon-unknown-linux-musl-clang \ + LD=${TOOLCHAIN_BIN}/ld.lld \ + KBUILD_VERBOSE=1 comet_defconfig + make mrproper + + cd "$BASE/build-linux" + make \ + ARCH=hexagon \ + CC=${TOOLCHAIN_BIN}/clang \ + INSTALL_HDR_PATH=${HEX_TOOLS_TARGET_BASE} \ + V=1 \ + headers_install +} + +build_musl() { + cd "$BASE/musl" + make clean + CROSS_COMPILE=hexagon-unknown-linux-musl- \ + AR=llvm-ar \ + RANLIB=llvm-ranlib \ + STRIP=llvm-strip \ + CC=clang \ + LIBCC=${HEX_TOOLS_TARGET_BASE}/lib/libclang_rt.builtins-hexagon.a \ + CFLAGS="-G0 -O0 -mv65 -fno-builtin -fno-rounding-math --target=hexagon-unknown-linux-musl" \ + ./configure --target=hexagon --prefix=${HEX_TOOLS_TARGET_BASE} + PATH=${TOOLCHAIN_BIN}/:$PATH make CROSS_COMPILE= install + cd ${HEX_TOOLS_TARGET_BASE}/lib + ln -sf libc.so ld-musl-hexagon.so + ln -sf ld-musl-hexagon.so ld-musl-hexagon.so.1 + cdp ${HEX_TOOLS_TARGET_BASE}/../lib + ln -sf ../usr/lib/ld-musl-hexagon.so.1 +} + +build_llvm_clang +build_kernel_headers +build_musl_headers +build_clang_rt +build_musl From patchwork Tue May 18 09:06:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 12264299 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8C5E0C433B4 for ; Tue, 18 May 2021 09:20:17 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 14A3461285 for ; Tue, 18 May 2021 09:20:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 14A3461285 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:33542 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1livtg-0002aq-0d for qemu-devel@archiver.kernel.org; Tue, 18 May 2021 05:20:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55574) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1livhR-00086u-CE for qemu-devel@nongnu.org; Tue, 18 May 2021 05:07:37 -0400 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]:43540) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1livhP-0005Vw-GY for qemu-devel@nongnu.org; Tue, 18 May 2021 05:07:37 -0400 Received: by mail-wr1-x436.google.com with SMTP id p7so5598465wru.10 for ; Tue, 18 May 2021 02:07:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=WOubj9I0hfuhKMAhvEchXd3pEKvLduIygi3tQKq1LBQ=; b=lXSVAMkf304Cu72vpEz3mLWiGeWK0Q58MYdQBQJ6c+mGuiPMZNVKHoGEtGBSItr/7e oeDnbd84DJI9EVESnxFia0IQdwwTVA8edwCGJOyzothfXxu56o+67ZxkPW+BQNS6rX/G EuWj4DT+dMx7R4QfJ55RTqbR5WNUxM/w6ZJ5DT4shMuO/7vx8eDnPMo69t/TXn8H9pbO PLhLTzNU/otTsUc8ruEdGAxXgQLOSdTJsCixjfPSL70izsXWgWio3u5W3hUzvJ+AHDLv Q8gGWy2v9UvE/CJd0HE/JXyTrTdD2x5ToleN+Wcuit4EYHrPdTepfz8aWa6lMoTPA5rK z1KA== 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=WOubj9I0hfuhKMAhvEchXd3pEKvLduIygi3tQKq1LBQ=; b=jfHxki+J2u7ySOvQja0GVXABjrLCkamSwEm31yfHa22wvalk4C630wxYTdbNc3L+Vj l0HoWCbWtz3IpD9+HASiV5PM6bT69D3qbIuZBFsAtK6I2umrj1i3DUllsdQHNRNtqNhU URR5g9ovFa/kKaHiaJMVidPwliT7aefcHscfNCdA+uOTHYnpr3yTLOzoz0ODNIbIvLO+ hg2qohzgxsrV8y49RgVizFzzWp212yNoGNihdmS3Wr7miOPN3mMlAoma1rnHVKKKfr7o Of5sCDTa2lwa+3YM6lwW2z0QioTGugEyMG1JguyI6+Kf/dLlV4IUoIJpj69RLPmTF4qH zS8g== X-Gm-Message-State: AOAM530LPGDDMvUi+MJ7vFIuGPVzX7w5u8dJptv1xrs24ekYi76RQHmx Xf80vvzDRMNH9yNmtSUwQCndvg== X-Google-Smtp-Source: ABdhPJx9yZElX0dHmf/FVk0pZzskJPq9sOVEsyvOgk1R3uJO9olsWtiSnMd44U7UTLOC5Tc9PRT1ww== X-Received: by 2002:a05:6000:2cf:: with SMTP id o15mr5508177wry.243.1621328853443; Tue, 18 May 2021 02:07:33 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id p187sm6411406wmp.28.2021.05.18.02.07.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 May 2021 02:07:26 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 8118E1FF92; Tue, 18 May 2021 10:07:21 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL v2 06/29] tests/tcg: Use Hexagon Docker image Date: Tue, 18 May 2021 10:06:57 +0100 Message-Id: <20210518090720.21915-7-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210518090720.21915-1-alex.bennee@linaro.org> References: <20210518090720.21915-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::436; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x436.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alessandro Di Federico , =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Alessandro Di Federico [PMD: Split from 'Add Hexagon Docker image' patch] Signed-off-by: Alessandro Di Federico Signed-off-by: Philippe Mathieu-Daudé [AJB: add container_hosts] Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé 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=fedora-cris-cross container_cross_cc=cris-linux-gnu-gcc ;; + hexagon-*) + container_hosts=x86_64 + container_image=debian-hexagon-cross + container_cross_cc=hexagon-unknown-linux-musl-clang + ;; hppa-*) container_hosts=x86_64 container_image=debian-hppa-cross From patchwork Tue May 18 09:06:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 12264291 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6251EC433ED for ; Tue, 18 May 2021 09:16:36 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1AE4961285 for ; Tue, 18 May 2021 09:16:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1AE4961285 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:53046 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1livq6-00058G-VB for qemu-devel@archiver.kernel.org; Tue, 18 May 2021 05:16:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55560) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1livhQ-00085A-O4 for qemu-devel@nongnu.org; Tue, 18 May 2021 05:07:36 -0400 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]:36602) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1livhM-0005UK-8B for qemu-devel@nongnu.org; Tue, 18 May 2021 05:07:36 -0400 Received: by mail-wm1-x333.google.com with SMTP id n17-20020a7bc5d10000b0290169edfadac9so1060302wmk.1 for ; Tue, 18 May 2021 02:07:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=RAXGx82XxM7VmXNOT6ej/QtLpo+ZWO9C8Z/4DJv4ABo=; b=M8TdHit31d60SG5yPc79bteZkeNXOHEZb7SC0aAvQ2iNeQQXX24EnUYwLXKZHfhyyt OArEscmaOOURZAD/Lk7fvALNEL0QX8zJJyhS82pdbWq0ZW6V7/TWEQK4JTjUQh0a532r nASDVmjkEGosTX+6qe4KE9QifBbxOiyZqIsIjnZWc4vKPWE1FR8inXHOssJCvpjFBo3E xXU2q+2b1NPDGvBC2MrNSQKM6G0F6rTR4dhnWvyjSztvoX9fC4DCyajZRHMaA1MDAlYR w/icQeon8BqKpaQDkrk4zZJjIBaBuCI2K3ZsksL6QZcyOVYzqfNC3UVVBJHP7JBpAfSY jpBg== 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=RAXGx82XxM7VmXNOT6ej/QtLpo+ZWO9C8Z/4DJv4ABo=; b=k+COq1mj/koOeD+Le08u8OODqulC/KtK/Tgq3aPM8MIjilXW/NTrWMx7Q+YJ/ThKEz 5CDiP7SQrGzpgVTgj9kGjiFBAcVMVuK1NPo1RhbmUDiKQluPafwJW9QJpjUvwtAVDXkq QGvbGv+PgBi5COwD7VXZoOqubynmFvqq0+/GT8goB2Me3hZ0aTJADhrMPT1c1reWCQ1y kObw1rXxnq2WGpRbO5l3gP4vVZtwMOYunohs2/roj/DS9AbkqCTBpyttYkzYxj2dE+aW BPBz0huOmk6bHnuK75Scb52eRAReQ+JYQe4L7E3X9iJq0JIr0kNuMJ5DQGXuAVDhT/dP +c7A== X-Gm-Message-State: AOAM530g6U2fD+GSVN5wCRqozBTGK6MlmNV5rYVKgvPAVzmcaqB66Tvd 8SDuhZLwQzVpO8NdMcUXq5T7+g== X-Google-Smtp-Source: ABdhPJzI9SazYg9sbll0da5yhUeBBrAMXr9inycZIUc9EzseHdlxy1Lhf9QXBmNhCZLywq+vwJEFDw== X-Received: by 2002:a05:600c:3545:: with SMTP id i5mr3679740wmq.43.1621328850865; Tue, 18 May 2021 02:07:30 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id s1sm2020734wmj.8.2021.05.18.02.07.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 May 2021 02:07:26 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 958E21FF93; Tue, 18 May 2021 10:07:21 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL v2 07/29] gitlab: add build-user-hexagon test Date: Tue, 18 May 2021 10:06:58 +0100 Message-Id: <20210518090720.21915-8-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210518090720.21915-1-alex.bennee@linaro.org> References: <20210518090720.21915-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x333.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Huth , qemu-devel@nongnu.org, Wainer dos Santos Moschetta , =?utf-8?q?Philippe_Mathi?= =?utf-8?q?eu-Daud=C3=A9?= , Willian Rampazzo , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" We special case this as the container with the cross compiler for the tests takes so long to build it is manually uploaded into the registry. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Wainer dos Santos Moschetta Reviewed-by: Willian Rampazzo Tested-by: Philippe Mathieu-Daudé Message-Id: <20210512102051.12134-9-alex.bennee@linaro.org> diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 24f300aace..f718b61fa7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -416,6 +416,17 @@ build-user-static: CONFIGURE_ARGS: --disable-tools --disable-system --static MAKE_CHECK_ARGS: check-tcg +# Because the hexagon cross-compiler takes so long to build we don't rely +# on the CI system to build it and hence this job has no dependency +# declared. The image is manually uploaded. +build-user-hexagon: + extends: .native_build_job_template + variables: + IMAGE: debian-hexagon-cross + TARGETS: hexagon-linux-user + CONFIGURE_ARGS: --disable-tools --disable-docs --enable-debug-tcg + MAKE_CHECK_ARGS: check-tcg + # Only build the softmmu targets we have check-tcg tests for build-some-softmmu: extends: .native_build_job_template From patchwork Tue May 18 09:06:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 12264241 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D259EC433ED for ; Tue, 18 May 2021 09:09:28 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6AA5B6108D for ; Tue, 18 May 2021 09:09:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6AA5B6108D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:36852 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1livjD-0002Y0-Bk for qemu-devel@archiver.kernel.org; Tue, 18 May 2021 05:09:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55564) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1livhQ-00085o-WA for qemu-devel@nongnu.org; Tue, 18 May 2021 05:07:37 -0400 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]:38838) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1livhM-0005UX-S0 for qemu-devel@nongnu.org; Tue, 18 May 2021 05:07:36 -0400 Received: by mail-wr1-x433.google.com with SMTP id j14so7587737wrq.5 for ; Tue, 18 May 2021 02:07:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Vc8LrTg4vVRcCUK0lAtqysrbfC1yfp+yZGcfve2xqWo=; b=NofdYuN1UIyVr2MKvADN1ap9i5m88RB4wXIrUFdo5rqI1tdKBG7j+vsDaNVxtOm2iu jiO8RyFaqmUSXwNI4LymqSjwp1CG/7aycnICIXmOUwdckqFX86CHkyReOyAcxqFVxPwL gjj83+saf4aegVXI3FnKRI5ky1HKzAgDdHv4A62bv0EEFzQCyVOc+NKWDFgj7CWnIMSF M4Lu7m/4QQqRa98/cXpKeEceTfrjrcY+yz+IbcuK/Oy5fYCVZNlzO/u9sxn+T/3izekA vx17sHPCv1jABgncshtt58QbAt6vens70HzA9n1NFO7cpeo/OI8REVnK33QDzm+4opG4 0yAQ== 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=Vc8LrTg4vVRcCUK0lAtqysrbfC1yfp+yZGcfve2xqWo=; b=blZAjV3spXDon6Jbpn60bgEiZFyxPSKPPmS84PCRAUVLCfKPrjfJ7Sdl0cfK++Qelr u4lXyS54FO+j7PKGgBgBIsBQv+Dq4SjsUnJCElOVmlZzYV6NkKU/5iWChUFHCSRQv/bR kdh1ijYUCO82yFZgMDvRIOid48PiJLL9AcB4zrbSbgXsOcbz9+dSUilM2Rgt2BmvjDkI O1+hNww0CuIig2F1VeR9GxCP+25uv/3PxCpyEtUNl1MnYH00gdqjzx/bbooy+QVu62sk +IC9CQvT138DotujTU1So1YZiccLgjxizbV6bE+vcqUZQIoHVtf+BFuU29Z3DJumy66q EREQ== X-Gm-Message-State: AOAM531EExkkcYc/eMN9vbdjPtZuJVFOc7imzYTykfBcd1Bp9g0cOmqF pmIcudve8hvqfiENHBVrGB30N2Wk5aBuwg== X-Google-Smtp-Source: ABdhPJxKU31PyhUdvtdpmAdvUgjiVr+AB6zHGhS4sCFvYO7utyV1PeY7+8CVP5NBSCTo3mz9fu5mfQ== X-Received: by 2002:a05:6000:1c1:: with SMTP id t1mr5432842wrx.421.1621328851451; Tue, 18 May 2021 02:07:31 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id f8sm16184927wmg.43.2021.05.18.02.07.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 May 2021 02:07:26 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id A93B71FF96; Tue, 18 May 2021 10:07:21 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL v2 08/29] tests/tcg: don't iterate through other arch compilers Date: Tue, 18 May 2021 10:06:59 +0100 Message-Id: <20210518090720.21915-9-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210518090720.21915-1-alex.bennee@linaro.org> References: <20210518090720.21915-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::433; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x433.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" There should only be one compiler per architecture. Those cases where the same compiler can deal with a different architecture should be explicitly set for both cross_cc and docker configurations. Otherwise you get strangeness like: --cross-cc-aarch64=/bin/false causing the logic to attempt to use a locally available arm-linux-gnueabihf-gcc rather than forcing the use of the docker image which is what is implied by the command line option. Signed-off-by: Alex Bennée Message-Id: <20210512102051.12134-10-alex.bennee@linaro.org> diff --git a/tests/tcg/configure.sh b/tests/tcg/configure.sh index cf6062a15f..e6c1be5450 100755 --- a/tests/tcg/configure.sh +++ b/tests/tcg/configure.sh @@ -74,35 +74,6 @@ fi for target in $target_list; do arch=${target%%-*} - case $arch in - arm|armeb) - arches=arm - ;; - aarch64|aarch64_be) - arches="aarch64 arm" - ;; - mips*) - arches=mips - ;; - ppc*) - arches=ppc - ;; - sh4|sh4eb) - arches=sh4 - ;; - x86_64) - arches="x86_64 i386" - ;; - xtensa|xtensaeb) - arches=xtensa - ;; - alpha|cris|hexagon|hppa|i386|microblaze|microblazeel|m68k|openrisc|riscv64|s390x|sh4|sparc64) - arches=$target - ;; - *) - continue - ;; - esac container_image= case $target in @@ -236,70 +207,69 @@ for target in $target_list; do echo "CROSS_CC_GUEST_CFLAGS=$target_compiler_cflags" >> $config_target_mak got_cross_cc=no - for i in $arch $arches; do - if eval test "x\${cross_cc_$i+yes}" != xyes; then - continue - fi - eval "target_compiler=\${cross_cc_$i}" - if ! has $target_compiler; then - continue - fi - write_c_skeleton - if ! do_compiler "$target_compiler" $target_compiler_cflags -o $TMPE $TMPC -static ; then - # For host systems we might get away with building without -static - if ! do_compiler "$target_compiler" $target_compiler_cflags -o $TMPE $TMPC ; then - continue - fi - echo "CROSS_CC_GUEST_STATIC=y" >> $config_target_mak - else - echo "CROSS_CC_GUEST_STATIC=y" >> $config_target_mak - fi - echo "CROSS_CC_GUEST=$target_compiler" >> $config_target_mak + if eval test "x\${cross_cc_$arch}" != xyes; then + eval "target_compiler=\${cross_cc_$arch}" - # Test for compiler features for optional tests. We only do this - # for cross compilers because ensuring the docker containers based - # compilers is a requirememt for adding a new test that needs a - # compiler feature. - case $target in - aarch64-*) - if do_compiler "$target_compiler" $target_compiler_cflags \ - -march=armv8.1-a+sve -o $TMPE $TMPC; then - echo "CROSS_CC_HAS_SVE=y" >> $config_target_mak - fi - if do_compiler "$target_compiler" $target_compiler_cflags \ - -march=armv8.3-a -o $TMPE $TMPC; then - echo "CROSS_CC_HAS_ARMV8_3=y" >> $config_target_mak - fi - if do_compiler "$target_compiler" $target_compiler_cflags \ - -mbranch-protection=standard -o $TMPE $TMPC; then - echo "CROSS_CC_HAS_ARMV8_BTI=y" >> $config_target_mak - fi - if do_compiler "$target_compiler" $target_compiler_cflags \ - -march=armv8.5-a+memtag -o $TMPE $TMPC; then - echo "CROSS_CC_HAS_ARMV8_MTE=y" >> $config_target_mak - fi - ;; - ppc*) - if do_compiler "$target_compiler" $target_compiler_cflags \ - -mpower8-vector -o $TMPE $TMPC; then - echo "CROSS_CC_HAS_POWER8_VECTOR=y" >> $config_target_mak - fi - ;; - i386-linux-user) - if do_compiler "$target_compiler" $target_compiler_cflags \ - -Werror -fno-pie -o $TMPE $TMPC; then - echo "CROSS_CC_HAS_I386_NOPIE=y" >> $config_target_mak - fi - ;; - esac + if has $target_compiler; then + write_c_skeleton + if ! do_compiler "$target_compiler" $target_compiler_cflags \ + -o $TMPE $TMPC -static ; then + # For host systems we might get away with building without -static + if do_compiler "$target_compiler" $target_compiler_cflags \ + -o $TMPE $TMPC ; then + got_cross_cc=yes + echo "CROSS_CC_GUEST_STATIC=y" >> $config_target_mak + echo "CROSS_CC_GUEST=$target_compiler" >> $config_target_mak + fi + else + got_cross_cc=yes + echo "CROSS_CC_GUEST_STATIC=y" >> $config_target_mak + echo "CROSS_CC_GUEST=$target_compiler" >> $config_target_mak + fi + fi + fi - enabled_cross_compilers="$enabled_cross_compilers $target_compiler" - got_cross_cc=yes - break - done + if test $got_cross_cc = yes; then + # Test for compiler features for optional tests. We only do this + # for cross compilers because ensuring the docker containers based + # compilers is a requirememt for adding a new test that needs a + # compiler feature. - if test $got_cross_cc = no && test "$container" != no && test -n "$container_image"; then + case $target in + aarch64-*) + if do_compiler "$target_compiler" $target_compiler_cflags \ + -march=armv8.1-a+sve -o $TMPE $TMPC; then + echo "CROSS_CC_HAS_SVE=y" >> $config_target_mak + fi + if do_compiler "$target_compiler" $target_compiler_cflags \ + -march=armv8.3-a -o $TMPE $TMPC; then + echo "CROSS_CC_HAS_ARMV8_3=y" >> $config_target_mak + fi + if do_compiler "$target_compiler" $target_compiler_cflags \ + -mbranch-protection=standard -o $TMPE $TMPC; then + echo "CROSS_CC_HAS_ARMV8_BTI=y" >> $config_target_mak + fi + if do_compiler "$target_compiler" $target_compiler_cflags \ + -march=armv8.5-a+memtag -o $TMPE $TMPC; then + echo "CROSS_CC_HAS_ARMV8_MTE=y" >> $config_target_mak + fi + ;; + ppc*) + if do_compiler "$target_compiler" $target_compiler_cflags \ + -mpower8-vector -o $TMPE $TMPC; then + echo "CROSS_CC_HAS_POWER8_VECTOR=y" >> $config_target_mak + fi + ;; + i386-linux-user) + if do_compiler "$target_compiler" $target_compiler_cflags \ + -Werror -fno-pie -o $TMPE $TMPC; then + echo "CROSS_CC_HAS_I386_NOPIE=y" >> $config_target_mak + fi + ;; + esac + elif test $got_cross_cc = no && test "$container" != no && \ + test -n "$container_image"; then for host in $container_hosts; do if test "$host" = "$ARCH"; then echo "DOCKER_IMAGE=$container_image" >> $config_target_mak From patchwork Tue May 18 09:07:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 12264287 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0286DC433ED for ; Tue, 18 May 2021 09:13:31 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A4C9961285 for ; Tue, 18 May 2021 09:13:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A4C9961285 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:45550 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1livn7-0008SA-Jx for qemu-devel@archiver.kernel.org; Tue, 18 May 2021 05:13:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55604) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1livhU-0008Ao-6z for qemu-devel@nongnu.org; Tue, 18 May 2021 05:07:40 -0400 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]:42683) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1livhP-0005WX-HG for qemu-devel@nongnu.org; Tue, 18 May 2021 05:07:39 -0400 Received: by mail-wm1-x335.google.com with SMTP id f75-20020a1c1f4e0000b0290171001e7329so1041396wmf.1 for ; Tue, 18 May 2021 02:07:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=PiPNYXgOmLbPMws4gHtVxogCzpWnu6jZf/k608Pm9yg=; b=DOGTgzm7Y4hsbIU1hD0KVBngRhaWqzYDFWORwZsjYwFYaY8LbArbWWqzdCbtrBCS9V 0CdgzhoKTdzzvFkwy4daYWS8YdXsNjEXcvDZSUQgqU7CYgpTk0stW35DR8z76yquns02 1qpskA1qU1yLSCvy2s1R+RBc7P7cTZwScmvl//CES+rzjZ+OXwITWNJnASqLqrMsL5T0 ZkreJt4Ph6mjZ+JIpqIOPDeiyiV+hpGWfuyIEhFz+QKgrSTvE4lxVQs11k43naVolBGH FxBfCY5LrY7Qs4W+2+IbbOk1i2b8+2brFEUoOAZbYEVuNhC04vPSf+sQ71PlRodzBQvT 2VJw== 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=dmZUQT68By2kh6fO9YUfXbv5/GJVFpCu1Shi/tM0T0mB3Hsx3DUOb66a5Uh/Z6FJJf SPw8q/eERZPsA43iDT7s5+p/8NUn++ilTGP0oO1+RWN5FfKKXuFcM6puArJem90fl2Bl gohkuNHDauCk8B9xqgT1w9/gKoQb67XKju3XVC7UMIk1FM71j6FUzcB+zhVGMBCPzlL8 Ulq0sXebUJ7Mmp5as0PWPtFUUi1HzgYYrwQR5MdIWkzGqlxMapoqEcsmO+KbGinCag/Z FEI5d1TSJtyLaQbU9zz0hO9oG7bt9+8lbfWC19N4j8zH0+qvNgs2Eaa3Z1vDGQwijj41 diAg== X-Gm-Message-State: AOAM530HC81P+6+ta8rGN3DUl6wyq+Lp4VcxbgBHS5on97nHFfXXOITc o5miNjNqAOcBRrTzm/dwWVKJKg== X-Google-Smtp-Source: ABdhPJxYM1BnPzTEqom2Q3BCQ/sMozGzwqNHSvXQzE0ZuZpRHcpBQO+p+JlgaSd35lKMnqyRoyBsJQ== X-Received: by 2002:a7b:cc8e:: with SMTP id p14mr3797361wma.74.1621328853965; Tue, 18 May 2021 02:07:33 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id x10sm18521315wrt.65.2021.05.18.02.07.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 May 2021 02:07:28 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id C0B6B1FF98; Tue, 18 May 2021 10:07:21 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL v2 09/29] tests/docker: Added libbpf library to the docker files. Date: Tue, 18 May 2021 10:07:00 +0100 Message-Id: <20210518090720.21915-10-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210518090720.21915-1-alex.bennee@linaro.org> References: <20210518090720.21915-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x335.google.com X-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: Andrew Melnychenko , qemu-devel@nongnu.org, Wainer dos Santos Moschetta , =?utf-8?q?Philippe_Mathi?= =?utf-8?q?eu-Daud=C3=A9?= , Willian Rampazzo , Thomas Huth , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Andrew Melnychenko The series of patches for eBPF RSS adds libbpf dependency for qemu. https://lists.gnu.org/archive/html/qemu-devel/2021-03/msg08887.html With this patch, libbpf added: Alpine - added libbpf-dev Centos 8 - added libbpf-devel Fedora - added libbpf-devel Signed-off-by: Andrew Melnychenko Signed-off-by: Alex Bennée Reviewed-by: Willian Rampazzo Reviewed-by: Philippe Mathieu-Daudé 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/dockerfiles/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/dockerfiles/centos8.docker index a8c6c528b0..efc1349cc8 100644 --- a/tests/docker/dockerfiles/centos8.docker +++ b/tests/docker/dockerfiles/centos8.docker @@ -14,6 +14,7 @@ ENV PACKAGES \ git \ glib2-devel \ libaio-devel \ + libbpf-devel \ libepoxy-devel \ libfdt-devel \ libgcrypt-devel \ diff --git a/tests/docker/dockerfiles/fedora.docker b/tests/docker/dockerfiles/fedora.docker index 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 \ From patchwork Tue May 18 09:07:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 12264297 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CA689C433B4 for ; Tue, 18 May 2021 09:17:52 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 571606135D for ; Tue, 18 May 2021 09:17:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 571606135D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:56474 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1livrL-0007Uk-9Q for qemu-devel@archiver.kernel.org; Tue, 18 May 2021 05:17:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55618) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1livhW-0008CX-4h for qemu-devel@nongnu.org; Tue, 18 May 2021 05:07:42 -0400 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]:37548) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1livhU-0005YO-0b for qemu-devel@nongnu.org; Tue, 18 May 2021 05:07:41 -0400 Received: by mail-wm1-x32a.google.com with SMTP id f19-20020a05600c1553b02901794fafcfefso431231wmg.2 for ; Tue, 18 May 2021 02:07:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=iHzMEhvW9dXILlz4dLRzWbxJpqXqkKl8FediKZsJZFo=; b=Ds4KNmCHRrLcxIkfVVM2ypn/EPGCzXiEJXDSGTddrTfqonltnZFKbUse1ICx8tT8tx A8KJCllqjDv1Caw8R1llzTlGeHTw5diiy0dD+cbthTxpEHLqsXGdfVvvC6u6ccg3i3yM OUv3qGDMQO3Hm4djCQqbfas3U4BuBlr1+dZenPTmMSneHk4E4LorZGFTwWW8GXft9Htr ZX9dymjw2gZnYjZ9Q9QM4bbWB9UsMChBzhXUSHKXiNw9zF/82xD1wvlFRc0Am0Q8qR+r z1paMEX5OfLJLY6vD2QBea9S76MJ4o5et5yiKHvSu+KGuT5onP4AUDm5MQ68zW9ZTY6k o70g== 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=iHzMEhvW9dXILlz4dLRzWbxJpqXqkKl8FediKZsJZFo=; b=TcAXhaZodnQpvEmwosGCypecl9cFc/x6nJuweyrw/6FNFmjIILR+w7o+zYdbiQmGOD JH9yKSX2mk7T3uvDnJvZWUk9b9IMdJAGlX5tYR+PTcQCXB8SPkSsRJlf6l2sA5S5wuxj U2ApX0n8v/JAb+0IBJrw7DVSXRyOa/gZxmk6RCpPCbcvlsMCIYuSCvqE+mBkpFZTxvsQ g2U8QkTUSbzPQP+ynrHNQ/d/u7Cnbka0arVmH7FL1FMNcUijM7fhwKeKMyDF1pfjYqjj ETeBggkwL0m8W1PpMeQ4cg/B0Js3UjSJP82vzoRdc5p2cCqpKdKeyMLfCg7wtu5SoY2T Tuvw== X-Gm-Message-State: AOAM533POFEEQESh7sX1QBXcf5lhEu/5F8OV175KlUy048135FssRyJh nrn1RtO/VO3ID3ISHDkY8LCIKQ== X-Google-Smtp-Source: ABdhPJzKiWKHeaHjelps711hjQ6Ta6JeECfVTObN0Po4t8hoZuzwW20wQz47ctrYpq8v8SzNGvSkFw== X-Received: by 2002:a1c:988f:: with SMTP id a137mr3806607wme.110.1621328858035; Tue, 18 May 2021 02:07:38 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id k11sm1952241wmj.1.2021.05.18.02.07.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 May 2021 02:07:28 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id D72DF1FF99; Tue, 18 May 2021 10:07:21 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL v2 10/29] tests/tcg: Add docker_as and docker_ld cmds Date: Tue, 18 May 2021 10:07:01 +0100 Message-Id: <20210518090720.21915-11-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210518090720.21915-1-alex.bennee@linaro.org> References: <20210518090720.21915-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32a.google.com X-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_Benn?= =?utf-8?q?=C3=A9e?= , qemu-devel@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Bastian Koppelmann At least for the TriCore target no easily available c compiler exists. Thus we need to rely on "as" and "ld". This allows us to run them through the docker image. We don't test the generation capabilities of docker images as they are assumed to work. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Bastian Koppelmann [AJB: fix quoting, only handle docker & clear, test -n, tweak commit msg] Signed-off-by: Alex Bennée Message-Id: <20210512102051.12134-12-alex.bennee@linaro.org> diff --git a/tests/tcg/Makefile.qemu b/tests/tcg/Makefile.qemu index a56564660c..84c8543878 100644 --- a/tests/tcg/Makefile.qemu +++ b/tests/tcg/Makefile.qemu @@ -22,6 +22,8 @@ quiet-@ = $(if $(V),,@) quiet-command = $(quiet-@)$(call quiet-command-run,$1,$2,$3) CROSS_CC_GUEST:= +CROSS_AS_GUEST:= +CROSS_LD_GUEST:= DOCKER_IMAGE:= -include tests/tcg/config-$(TARGET).mak @@ -42,6 +44,8 @@ cross-build-guest-tests: $(call quiet-command, \ (mkdir -p tests/tcg/$(TARGET) && cd tests/tcg/$(TARGET) && \ $(MAKE) -f $(TCG_MAKE) TARGET="$(TARGET)" CC="$(CROSS_CC_GUEST)" \ + $(if $(CROSS_AS_GUEST),AS="$(CROSS_AS_GUEST)") \ + $(if $(CROSS_LD_GUEST),LD="$(CROSS_LD_GUEST)") \ SRC_PATH="$(SRC_PATH)" BUILD_STATIC=$(CROSS_CC_GUEST_STATIC) \ EXTRA_CFLAGS="$(CROSS_CC_GUEST_CFLAGS)"), \ "BUILD","$(TARGET) guest-tests with $(CROSS_CC_GUEST)") @@ -59,11 +63,24 @@ DOCKER_COMPILE_CMD="$(DOCKER_SCRIPT) cc \ -i qemu/$(DOCKER_IMAGE) \ -s $(SRC_PATH) -- " +DOCKER_AS_CMD=$(if $(DOCKER_CROSS_AS_GUEST),"$(DOCKER_SCRIPT) cc \ + --cc $(DOCKER_CROSS_AS_GUEST) \ + -i qemu/$(DOCKER_IMAGE) \ + -s $(SRC_PATH) -- ") + +DOCKER_LD_CMD=$(if $(DOCKER_CROSS_LD_GUEST),"$(DOCKER_SCRIPT) cc \ + --cc $(DOCKER_CROSS_LD_GUEST) \ + -i qemu/$(DOCKER_IMAGE) \ + -s $(SRC_PATH) -- ") + + .PHONY: docker-build-guest-tests docker-build-guest-tests: docker-image-$(DOCKER_IMAGE) $(call quiet-command, \ (mkdir -p tests/tcg/$(TARGET) && cd tests/tcg/$(TARGET) && \ $(MAKE) -f $(TCG_MAKE) TARGET="$(TARGET)" CC=$(DOCKER_COMPILE_CMD) \ + $(if $(DOCKER_AS_CMD),AS=$(DOCKER_AS_CMD)) \ + $(if $(DOCKER_LD_CMD),LD=$(DOCKER_LD_CMD)) \ SRC_PATH="$(SRC_PATH)" BUILD_STATIC=y \ EXTRA_CFLAGS="$(CROSS_CC_GUEST_CFLAGS)"), \ "BUILD","$(TARGET) guest-tests with docker qemu/$(DOCKER_IMAGE)") diff --git a/tests/tcg/configure.sh b/tests/tcg/configure.sh index e6c1be5450..ed378e7840 100755 --- a/tests/tcg/configure.sh +++ b/tests/tcg/configure.sh @@ -75,7 +75,13 @@ fi for target in $target_list; do arch=${target%%-*} + # reset all container fields container_image= + container_hosts= + container_cross_cc= + container_cross_as= + container_cross_ld= + case $target in aarch64-*) # We don't have any bigendian build tools so we only use this for AArch64 @@ -273,7 +279,16 @@ for target in $target_list; do for host in $container_hosts; do if test "$host" = "$ARCH"; then echo "DOCKER_IMAGE=$container_image" >> $config_target_mak - echo "DOCKER_CROSS_CC_GUEST=$container_cross_cc" >> $config_target_mak + echo "DOCKER_CROSS_CC_GUEST=$container_cross_cc" >> \ + $config_target_mak + if test -n "$container_cross_as"; then + echo "DOCKER_CROSS_AS_GUEST=$container_cross_as" >> \ + $config_target_mak + fi + if test -n "$container_cross_ld"; then + echo "DOCKER_CROSS_LD_GUEST=$container_cross_ld" >> \ + $config_target_mak + fi fi done fi From patchwork Tue May 18 09:07:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 12264293 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.3 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,NORMAL_HTTP_TO_IP,NUMERIC_HTTP_ADDR,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D4063C433B4 for ; Tue, 18 May 2021 09:16:37 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6BB1661042 for ; Tue, 18 May 2021 09:16:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6BB1661042 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:53276 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1livq8-0005IV-Hk for qemu-devel@archiver.kernel.org; Tue, 18 May 2021 05:16:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55656) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1livhc-0008E2-A1 for qemu-devel@nongnu.org; Tue, 18 May 2021 05:07:48 -0400 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]:54855) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1livhR-0005Wk-44 for qemu-devel@nongnu.org; Tue, 18 May 2021 05:07:46 -0400 Received: by mail-wm1-x32c.google.com with SMTP id o127so4979797wmo.4 for ; Tue, 18 May 2021 02:07:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=SOwWByj9Hv79uAoR3pk2Na/zMM2B+Ft68GAsD76YMDs=; b=QOi6OYdySSZFH1c6NtjIs9km37rlQRRi7NNAQc0seBUZIhPP/3FuoH7oVbGJ6im+27 t12lJTZjebh8Yy0h6et6bGUdNAZIFfcF+nK9LR6tF3q6AKW78nsoZNAsymHIOarzwcfF Ms27qWnNLjtCvz5+kyGof25pNj4aoe/bz+jc9A5hN6wARME8PbwAk02/jINvkcnf927a 7N5di5qtu0TmiBg1KydPkXfqDm1QijdxKi71HmHU25VC+ZsWuUVNQ/gOOIin9CAgNTIU UIaHNed2qpba/YItLtEN6Ijx7ilQztmLfrSoFrH2Cf0zhTet6dPRt+FT2zh8JycQDS3j UhdA== 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=iPOr/pr2hh9wFwGNEMIGCKlb5Kgye7o/pnOViwc0MKH/Bo93Kk/sEF1Y/MIGxoGGEv b8LkS0ipj4ggvmMVQTtks59MScNL+CaVqdN9qW9vU2K8DrnBbcZitJIuc4mhV1s2vOC3 s1Nn4QdiK92V2YF0hnLvCf/xGE0uKNKHtqW5SAE0KVKDKV6i/1QZxxpY9SKclZTfJrGw 3BR6deljEPjS3dFJILgFWsoFD9DmnXFKRIDiRtLfE2rzwhE7pZ+4VP4Upwil0/wxg6E6 83xsQ7NI/uw17EiGjD2rZy3aDSXxcanxBYAFqG8RX/Lo3x0yE+EyNuGgtCrgv4eZYJzS ZnaQ== X-Gm-Message-State: AOAM533DABSGVUwyMRvDfBeIfyhjRWfQFLzFjyBwwc5WZfg8+hjObW+T CLNdOVVfG9zrSTYhMZnWhWMvGA== X-Google-Smtp-Source: ABdhPJx3YBLfFp5z9cRjhWx1iJC6SPTx8G6d6ZV/Tu8FGpIunC/kdE+tV7tON8w1Kw/3XILbU/gxlA== X-Received: by 2002:a05:600c:2948:: with SMTP id n8mr3740468wmd.95.1621328855811; Tue, 18 May 2021 02:07:35 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id p7sm20501159wrt.24.2021.05.18.02.07.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 May 2021 02:07:28 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id EBEC21FF9A; Tue, 18 May 2021 10:07:21 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL v2 11/29] tests/tcg: Run timeout cmds using --foreground Date: Tue, 18 May 2021 10:07:02 +0100 Message-Id: <20210518090720.21915-12-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210518090720.21915-1-alex.bennee@linaro.org> References: <20210518090720.21915-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=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_Benn?= =?utf-8?q?=C3=A9e?= , qemu-devel@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Bastian Koppelmann when trying to run successful short tests from the Makefile timeout would not terminate. Rather it would wait until the time runs out. Excerpt from the manpage: --foreground when not running timeout directly from a shell prompt, allow COMMAND to read from the TTY and get TTY signals; in this mode, chil‐ dren of COMMAND will not be timed out Signed-off-by: Bastian Koppelmann Signed-off-by: Alex Bennée Message-Id: <20210305170045.869437-3-kbastian@mail.uni-paderborn.de> 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 = $(if $(V),$1,$(if $(2),@printf " %-7s %s\n" $2 $3 && $1, @$1)) # $1 = test name, $2 = cmd, $3 = desc ifdef CONFIG_USER_ONLY -run-test = $(call quiet-command, timeout $(TIMEOUT) $2 > $1.out,"TEST",$3) +run-test = $(call quiet-command, timeout --foreground $(TIMEOUT) $2 > $1.out, \ + "TEST",$3) else -run-test = $(call quiet-command, timeout $(TIMEOUT) $2,"TEST",$3) +run-test = $(call quiet-command, timeout --foreground $(TIMEOUT) $2,"TEST",$3) endif # $1 = test name, $2 = reference From patchwork Tue May 18 09:07:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 12264307 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D5546C433B4 for ; Tue, 18 May 2021 09:23:00 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 53A5C61285 for ; Tue, 18 May 2021 09:23:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 53A5C61285 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:42202 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1livwJ-0008Qd-8e for qemu-devel@archiver.kernel.org; Tue, 18 May 2021 05:22:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55636) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1livhY-0008DU-5t for qemu-devel@nongnu.org; Tue, 18 May 2021 05:07:48 -0400 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]:46867) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1livhR-0005XW-Sa for qemu-devel@nongnu.org; Tue, 18 May 2021 05:07:43 -0400 Received: by mail-wm1-x334.google.com with SMTP id h3-20020a05600c3503b0290176f13c7715so1037646wmq.5 for ; Tue, 18 May 2021 02:07:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=f8I2LQNseKoGPZewhMtDjK2bewdbq9EHrD7Ih+hewKo=; b=WIBfawg2xQoOhPkSSFR9WNNt8eFkEdh3jIMo/blk9yXARgLzih+Kc1yieVdsmRvSyZ oXsHL+m5qxcbTGFoFQlB5DTcsdmtZdeUOWR3FB4k9APMrnuEi5DC0E2gPFcFnP/783HV yFOKRab/2Dw55Ke+0Kcs3L1XHya7uiG/7sRC5d0AIe+/CFbnXUK97kBz7u6wN8SGC5kb 4b3Txmw7mmVSEa4DG5yIeL1HWkTKHdOxsBfAu/hot40WDKTafODVLnEBwobivO5Xg5QA xbgC497SO6q/6QIYpfogydnIq4sd6ETC6U6BIuCIljiFWG3L/t16SY/8dyDm+RgdTMi+ fU+A== 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=f8I2LQNseKoGPZewhMtDjK2bewdbq9EHrD7Ih+hewKo=; b=mO/oALqXukqIEismN7ChuxeV1LEb312ZHU0uPxva0TesZXX+B0SlXviAgBEKW5AQ9Y B37uU8tuztWB8xZ85OfIWphRc7zfHgsBqYHHo7gkNhqojarGtog0WIvUK3oG8dNMwmqH 3AjTE071O1kL95u7LDUsuAZu1I3D+GP3efCLbJILyd1udaISoZy3qELsyKdjuqJlLSAk ppe6UP/Q70fkYuWlkyWkR7N8z7+vlsljxPNYQ5IL4QfP44vtz4Q3M9QSRveUtmdX7jN8 ODPnr+qZTOdMeODjxoHyB2Ua7kxso2iLmIAlfouy/uRb0DolflR1nOlblO1OikCJItjH nHHA== X-Gm-Message-State: AOAM531dPlG/UMnH1Fk2fBR8bpHCcA3EGgoAl3AsWDh9h6BdsR/IoUYC 0sihFs8EX/+vogWRbANUcJxOaA== X-Google-Smtp-Source: ABdhPJw5Ser2wL07y9M2+uynJzswNT+mW8MhiEbKFgkQUZEgR/kPVj1NORowOe4+u2Bv7f3EIUgncw== X-Received: by 2002:a1c:7515:: with SMTP id o21mr4331855wmc.90.1621328856469; Tue, 18 May 2021 02:07:36 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id s199sm1965381wme.43.2021.05.18.02.07.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 May 2021 02:07:28 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 11B831FF9B; Tue, 18 May 2021 10:07:22 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL v2 12/29] hw/tricore: Add testdevice for tests in tests/tcg/ Date: Tue, 18 May 2021 10:07:03 +0100 Message-Id: <20210518090720.21915-13-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210518090720.21915-1-alex.bennee@linaro.org> References: <20210518090720.21915-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x334.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Bastian Koppelmann , =?utf-8?q?Alex_Benn?= =?utf-8?q?=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Bastian Koppelmann this device is used to verify the correctness of regression tests by allowing guests to write their exit status to this device. This is then used by qemu to exit using the written status. Reviewed-by: Alex Bennée Signed-off-by: Bastian Koppelmann Signed-off-by: Alex Bennée Message-Id: <20210305170045.869437-4-kbastian@mail.uni-paderborn.de> Message-Id: <20210512102051.12134-14-alex.bennee@linaro.org> diff --git a/include/hw/tricore/tricore_testdevice.h b/include/hw/tricore/tricore_testdevice.h new file mode 100644 index 0000000000..2c56c51bcb --- /dev/null +++ b/include/hw/tricore/tricore_testdevice.h @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2018-2021 Bastian Koppelmann Paderborn University + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + */ + + +#ifndef HW_TRICORE_TESTDEV_H +#define HW_TRICORE_TESTDEV_H + +#include "hw/sysbus.h" +#include "hw/hw.h" + +#define TYPE_TRICORE_TESTDEVICE "tricore_testdevice" +#define TRICORE_TESTDEVICE(obj) \ + OBJECT_CHECK(TriCoreTestDeviceState, (obj), TYPE_TRICORE_TESTDEVICE) + +typedef struct { + /* */ + SysBusDevice parent_obj; + + /* */ + MemoryRegion iomem; + +} TriCoreTestDeviceState; + +#endif diff --git a/hw/tricore/tricore_testboard.c b/hw/tricore/tricore_testboard.c index 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" @@ -56,6 +57,7 @@ static void tricore_testboard_init(MachineState *machine, int board_id) { TriCoreCPU *cpu; CPUTriCoreState *env; + TriCoreTestDeviceState *test_dev; MemoryRegion *sysmem = get_system_memory(); MemoryRegion *ext_cram = g_new(MemoryRegion, 1); @@ -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); + test_dev = g_new(TriCoreTestDeviceState, 1); + object_initialize(test_dev, sizeof(TriCoreTestDeviceState), + TYPE_TRICORE_TESTDEVICE); + memory_region_add_subregion(sysmem, 0xf0000000, &test_dev->iomem); + + tricoretb_binfo.ram_size = machine->ram_size; tricoretb_binfo.kernel_filename = machine->kernel_filename; diff --git a/hw/tricore/tricore_testdevice.c b/hw/tricore/tricore_testdevice.c new file mode 100644 index 0000000000..a1563aa568 --- /dev/null +++ b/hw/tricore/tricore_testdevice.c @@ -0,0 +1,82 @@ +/* + * Copyright (c) 2018-2021 Bastian Koppelmann Paderborn University + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + */ + +#include "qemu/osdep.h" +#include "hw/sysbus.h" +#include "hw/qdev-properties.h" +#include "hw/tricore/tricore_testdevice.h" + +static void tricore_testdevice_write(void *opaque, hwaddr offset, + uint64_t value, unsigned size) +{ + exit(value); +} + +static uint64_t tricore_testdevice_read(void *opaque, hwaddr offset, + unsigned size) +{ + return 0xdeadbeef; +} + +static void tricore_testdevice_reset(DeviceState *dev) +{ +} + +static const MemoryRegionOps tricore_testdevice_ops = { + .read = tricore_testdevice_read, + .write = tricore_testdevice_write, + .valid = { + .min_access_size = 4, + .max_access_size = 4, + }, + .endianness = DEVICE_NATIVE_ENDIAN, +}; + +static void tricore_testdevice_init(Object *obj) +{ + TriCoreTestDeviceState *s = TRICORE_TESTDEVICE(obj); + /* map memory */ + memory_region_init_io(&s->iomem, OBJECT(s), &tricore_testdevice_ops, s, + "tricore_testdevice", 0x4); +} + +static Property tricore_testdevice_properties[] = { + DEFINE_PROP_END_OF_LIST() +}; + +static void tricore_testdevice_class_init(ObjectClass *klass, void *data) +{ + DeviceClass *dc = DEVICE_CLASS(klass); + + device_class_set_props(dc, tricore_testdevice_properties); + dc->reset = tricore_testdevice_reset; +} + +static const TypeInfo tricore_testdevice_info = { + .name = TYPE_TRICORE_TESTDEVICE, + .parent = TYPE_SYS_BUS_DEVICE, + .instance_size = sizeof(TriCoreTestDeviceState), + .instance_init = tricore_testdevice_init, + .class_init = tricore_testdevice_class_init, +}; + +static void tricore_testdevice_register_types(void) +{ + type_register_static(&tricore_testdevice_info); +} + +type_init(tricore_testdevice_register_types) diff --git a/hw/tricore/meson.build b/hw/tricore/meson.build index 77ff6fd137..47e36bb077 100644 --- a/hw/tricore/meson.build +++ b/hw/tricore/meson.build @@ -1,5 +1,6 @@ tricore_ss = ss.source_set() tricore_ss.add(when: 'CONFIG_TRICORE', if_true: files('tricore_testboard.c')) +tricore_ss.add(when: 'CONFIG_TRICORE', if_true: files('tricore_testdevice.c')) tricore_ss.add(when: 'CONFIG_TRIBOARD', if_true: files('triboard.c')) tricore_ss.add(when: 'CONFIG_TC27X_SOC', if_true: files('tc27x_soc.c')) From patchwork Tue May 18 09:07:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 12264301 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0BC0CC43460 for ; Tue, 18 May 2021 09:20:19 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8656261285 for ; Tue, 18 May 2021 09:20:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8656261285 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:33716 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1livth-0002hl-JD for qemu-devel@archiver.kernel.org; Tue, 18 May 2021 05:20:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55664) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1livhc-0008EQ-Di for qemu-devel@nongnu.org; Tue, 18 May 2021 05:07:48 -0400 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]:37579) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1livhV-0005Yf-S9 for qemu-devel@nongnu.org; Tue, 18 May 2021 05:07:48 -0400 Received: by mail-wr1-x42a.google.com with SMTP id q5so9331240wrs.4 for ; Tue, 18 May 2021 02:07:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=7ixk657I5//cYk7jh7CcKVpBQwY+q/L7bzigPvOyEwc=; b=Ms7rXcqRG5LKylAj/ep4M2EqRMQFTtztBnVgVUlG6/GFL88cFNn3uN8CkB9mh7upi2 Vrd+U/svLvwcTrInZ7ESRS8k9nf6ovcCeXRS0OMNSZzQZS+knMwF0AGhAePfDzScqkt9 cdUng4VVZHURNDCmyMhjsi+YZH24ASw0AnyMsLynfjO/QBre2KaMYgqgY304MLf+Ww6a bAdQNvWoNwFhauf6SGwcwl2FtYYKJ03/ReJBwVIOzuKrXZGjH6rETGfzU/90TXUUlBl8 7KJZv0YQwTxJ3jsYtcV8OKnyrGVj9nF0AQHClxc3wov/Bpd8KpGpKunxNheOjpydmAuq hbmg== 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=7ixk657I5//cYk7jh7CcKVpBQwY+q/L7bzigPvOyEwc=; b=Yxdz1gfnxciSO6yWbWxd37ZeT2sNN3vz/siT+MHR2bcOlj6V52ZzT8ER7o75VNcrXy ziux/hWyljaHhXNHrsnt+9zdEn3xJWE0f+TGQqblVwqOEvT1IrJTmOLwCwb01yEFPdTv 5wuDgc9uZBQD7t4gu34vvZBNAYFExf7hA2K+3qcxi3CguPcoDAVSmX09ZFw/5R8KRs84 UbBAAmfnuFoUMCtP7fKLaG1VItzeRLIvg7D18TuPkD1a5BpqMquuaEcHMTkkq8Z5rA0Q wvLXIflxmhiFN4m4BSE21jt/eOE33IfHR2VRgD35pM+qPo87YzQSgPeRWoXtBMP+z3bN kEsg== X-Gm-Message-State: AOAM533NmZBaFv7ypjBmeMmmpW05QzQD280GI31KOiuy7OkAEFh+/spO 1j165qGXeBXP6fvvbeLXwszaNQ== X-Google-Smtp-Source: ABdhPJy/1WHFqX1WUc2uVJKbqBYpwMtRH/GyKgqi5stHnOarq5iFjjgSo34ydpkCUUPgWY6lSx1EnQ== X-Received: by 2002:adf:e40b:: with SMTP id g11mr5482888wrm.174.1621328860102; Tue, 18 May 2021 02:07:40 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id f188sm1954354wmf.24.2021.05.18.02.07.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 May 2021 02:07:38 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 297F21FF9C; Tue, 18 May 2021 10:07:22 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL v2 13/29] tests/tcg/tricore: Add build infrastructure Date: Tue, 18 May 2021 10:07:04 +0100 Message-Id: <20210518090720.21915-14-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210518090720.21915-1-alex.bennee@linaro.org> References: <20210518090720.21915-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42a; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Bastian Koppelmann , =?utf-8?q?Alex_Benn?= =?utf-8?q?=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Bastian Koppelmann this includes the Makefile and linker script to build all the tests. Reviewed-by: Alex Bennée Signed-off-by: Bastian Koppelmann Signed-off-by: Alex Bennée Message-Id: <20210305170045.869437-5-kbastian@mail.uni-paderborn.de> 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/ Multiarch Linux User Tests M: Alex Bennée diff --git a/tests/tcg/tricore/Makefile.softmmu-target b/tests/tcg/tricore/Makefile.softmmu-target new file mode 100644 index 0000000000..d64a99b95f --- /dev/null +++ b/tests/tcg/tricore/Makefile.softmmu-target @@ -0,0 +1,15 @@ +TESTS_PATH = $(SRC_PATH)/tests/tcg/tricore + +LDFLAGS = -T$(TESTS_PATH)/link.ld +ASFLAGS = + +QEMU_OPTS += -M tricore_testboard -nographic -kernel + +%.pS: $(TESTS_PATH)/%.S + $(HOST_CC) -E -o $@ $< + +%.o: %.pS + $(AS) $(ASFLAGS) -o $@ $< + +%.tst: %.o + $(LD) $(LDFLAGS) $< -o $@ diff --git a/tests/tcg/tricore/link.ld b/tests/tcg/tricore/link.ld new file mode 100644 index 0000000000..364bcdc00a --- /dev/null +++ b/tests/tcg/tricore/link.ld @@ -0,0 +1,60 @@ +/* Default linker script, for normal executables */ +OUTPUT_FORMAT("elf32-tricore") +OUTPUT_ARCH(tricore) +ENTRY(_start) + +/* the internal ram description */ +MEMORY +{ + text_ram (rx!p): org = 0x80000000, len = 15K + data_ram (w!xp): org = 0xd0000000, len = 130K +} +/* + * Define the sizes of the user and system stacks. + */ +__USTACK_SIZE = DEFINED (__USTACK_SIZE) ? __USTACK_SIZE : 1K ; +/* + * Define the start address and the size of the context save area. + */ +__CSA_BEGIN = 0xd0000000 ; +__CSA_SIZE = 8k ; +__CSA_END = __CSA_BEGIN + __CSA_SIZE ; + +SECTIONS +{ + .text : + { + *(.text) + . = ALIGN(8); + } > text_ram + + .rodata : + { + *(.rodata) + *(.rodata1) + } > data_ram + + .data : + { + . = ALIGN(8) ; + *(.data) + *(.data.*) + . = ALIGN(8) ; + __USTACK = . + __USTACK_SIZE -768; + + } > data_ram + /* + * Allocate space for BSS sections. + */ + .bss : + { + BSS_BASE = . ; + *(.bss) + *(COMMON) + . = ALIGN(8) ; + } > data_ram + /* Make sure CSA, stack and heap addresses are properly aligned. */ + _. = ASSERT ((__CSA_BEGIN & 0x3f) == 0 , "illegal CSA start address") ; + _. = ASSERT ((__CSA_SIZE & 0x3f) == 0 , "illegal CSA size") ; + +} From patchwork Tue May 18 09:07:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 12264333 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 29BF4C433ED for ; Tue, 18 May 2021 09:36:08 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E0FCE61350 for ; Tue, 18 May 2021 09:36:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E0FCE61350 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:49840 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1liw90-0007Jq-WC for qemu-devel@archiver.kernel.org; Tue, 18 May 2021 05:36:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57648) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1livpC-00057d-MD for qemu-devel@nongnu.org; Tue, 18 May 2021 05:15:39 -0400 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]:41497) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1livow-00012M-66 for qemu-devel@nongnu.org; Tue, 18 May 2021 05:15:37 -0400 Received: by mail-wr1-x430.google.com with SMTP id d11so9344579wrw.8 for ; Tue, 18 May 2021 02:15:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Agdx3G/Ci/HmPNt/TIfwdrNu8lRgFz7owXgkXOV3/r0=; b=sC7DO1SCnSM9+8djo2q80o2jS2TVj4z/hoWtUbIgQrqdHFIrmqfRzAKw174EvSE2Fc MkPlCLtCSFE7MKuopDYHgc9/rN8wpJyskvWTwUDTekLvv8MGVj4kg+amaSIn3269t9Or LztXsX7kzVzOq3EhCiNgb0baW0EFwJITF1dtS8qHcvsFWRuzq9abCvUt5EZcRXgmh2Od LmGUaDL1gFJPKxVubF3CmQtHzQxlAcRCXG7Eu8qZ5YioLkAyQPNqAaFuPgqkTTTTn6yM 1tLA706/1cN1v2kIaH9kKt9KWVk/zmaI9q93t6ZuwgJlm1zGziPbkqIvnFGzvhMftqt1 Hr4A== 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=IcFsqdKLYtPfDLsBRdBCaq8Myt4pkbVJ1hor/WxgwihXnE3XgK9CEd5KmQWxTrYBhW uy76KFR02MEsxZPYEcbO11jpw0hxfTHHDGEVbFbv+WThLNUaQ+9eqMPArWqBXvZNG5H7 BbfQVHquDM6bm1yQaW7jaz0s1ivHXXYjjiPRjP4CbGjLvoja1ZBm3spuzpyMEAR7rOVo lxJqL3uqBqTHjGMw2m4MTDpmA1D7rQzuOfo4nK1mAq8G92G0yDHXBM2RFGwy5CFfOx/r CBpADVSZjg/DRUikOh4rOWQk92z76UtmfY4X5YkEOokELVD+422DQV0Qfv8zEoKWXSAm O4jA== X-Gm-Message-State: AOAM530cvg8nM+Eg6cFAJYTwKyUmUNQhD1ypyCu6sEWlkEIn7L41P5zn hXVWBqCIujdLfHtqo7fXD9dGFw== X-Google-Smtp-Source: ABdhPJzw7UQo8QsuaN14klaqAFMHr5zUz5wJ/12dEO6ea6A8gCimWF2NWdL3+hkjl6rJKVmuevuRLQ== X-Received: by 2002:adf:faca:: with SMTP id a10mr5610502wrs.9.1621329319796; Tue, 18 May 2021 02:15:19 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id y14sm1908548wmj.37.2021.05.18.02.15.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 May 2021 02:15:18 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 3DC8D1FF9D; Tue, 18 May 2021 10:07:22 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL v2 14/29] configure: Emit HOST_CC to config-host.mak Date: Tue, 18 May 2021 10:07:05 +0100 Message-Id: <20210518090720.21915-15-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210518090720.21915-1-alex.bennee@linaro.org> References: <20210518090720.21915-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x430.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Bastian Koppelmann , =?utf-8?q?Alex_Benn?= =?utf-8?q?=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Bastian Koppelmann this is needed by the tricore-tcg-tests as tricore-gcc is not easily available. Thus we rely on the HOST_CC to do the preprocessing of the tricore assembly files. Signed-off-by: Bastian Koppelmann Signed-off-by: Alex Bennée Message-Id: <20210305170045.869437-6-kbastian@mail.uni-paderborn.de> 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=$genisoimage" >> $config_host_mak echo "MESON=$meson" >> $config_host_mak echo "NINJA=$ninja" >> $config_host_mak echo "CC=$cc" >> $config_host_mak +echo "HOST_CC=$host_cc" >> $config_host_mak if $iasl -h > /dev/null 2>&1; then echo "CONFIG_IASL=$iasl" >> $config_host_mak fi From patchwork Tue May 18 09:07:06 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 12264311 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 148EBC433ED for ; Tue, 18 May 2021 09:26:00 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9FC596135C for ; Tue, 18 May 2021 09:25:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9FC596135C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:50974 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1livzC-0005nk-Jo for qemu-devel@archiver.kernel.org; Tue, 18 May 2021 05:25:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55696) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1livhe-0008LO-6t for qemu-devel@nongnu.org; Tue, 18 May 2021 05:07:50 -0400 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]:41911) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1livhX-0005Yk-TX for qemu-devel@nongnu.org; Tue, 18 May 2021 05:07:49 -0400 Received: by mail-wr1-x42f.google.com with SMTP id d11so9318037wrw.8 for ; Tue, 18 May 2021 02:07:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=EzXXbVWjMVcY3zDKSvBfL0opTxc0lCuHUosFONzdvYg=; b=zAAyE9BuOhhQrlGNhClzR8plVrO6rWdx2iTBDAfoHendAqYmcept4Q2GHw0G4D/JJY ZLwHyGxaScivHLdlQ7s0mI4Bl6JstBrfqDPJ2C/1hwZ4vDo5uSwYQzibwn6DQ1zmGYRY L7wZ96vYxWug6hbGvORVqVQZYvnPUSPlziFYu1Lyju7CWXA/mqyn5MwJlpWkhYzwI6lP AVkMPv6mO9F+eviden0UXuQYZcSeXh5I7Nu7evDIhz5NCtctebAGcb4AnNo9wpnfk7ow eS0dgIOXtRDr/77ddC4FVda7J9SH3JN6/HS+AlG1RU1J55SIdhmishp9DJs3aWXNkYzQ GaUA== 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=EzXXbVWjMVcY3zDKSvBfL0opTxc0lCuHUosFONzdvYg=; b=I0gxbpSaWoNxlhJ7L0pm1/sR7qsXW8sHV/qHkfMH74gODpIVi2kkCKazisCk/f38/U zNeSZYVIw67HJVicdjBFaBQrzDmTXs84yODqPqyJZQ0nKi1BfM2k1SKTyBGvC3xpCpGP w+HNJauOpsDW+MyxGVtSDKNGpLz2pekxzC09lwzDzyl6SHCoXWIbCEwK01GwfaD1xBNa XE5z/lwNmg/3NPaKiByvaDULCwfrvx5HFT7GFAzy1qmbi/LNUPxr4TlfmEvXiJQsSVpC c+eMn9fxxEjvQ47hNyNzLK9p9mbghBa9zXWV2HrNrympTi6n3ENBbU4dt0ShJ9RsKTJl NETw== X-Gm-Message-State: AOAM532IvUtMbBzaEEOOKFrPb7anS9+yNME1GYNPea/QxTrzzyMjRORs B0czQ0uRWdmvNXOZDmSf7SsyzDrgSj/akg== X-Google-Smtp-Source: ABdhPJzen+D5aFR4WGNZuzDJQI9C1hbHHpOhTAV3k0Ry+sHZt/+yy8xqPPgXsx+Sq3nx5Ig39Ys1Vw== X-Received: by 2002:adf:fa45:: with SMTP id y5mr5578439wrr.311.1621328860939; Tue, 18 May 2021 02:07:40 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id v15sm1924726wmj.39.2021.05.18.02.07.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 May 2021 02:07:38 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 56EA81FF9E; Tue, 18 May 2021 10:07:22 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL v2 15/29] tests/tcg/tricore: Add macros to create tests and first test 'abs' Date: Tue, 18 May 2021 10:07:06 +0100 Message-Id: <20210518090720.21915-16-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210518090720.21915-1-alex.bennee@linaro.org> References: <20210518090720.21915-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42f.google.com X-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_Benn?= =?utf-8?q?=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Bastian Koppelmann This kind of tests is inspired by the riscv-tests repository. This adds macros that makes it easy to create single instruction self containing tests. It is achieved by macros that create a test sequence for an instruction and check for a supplied correct value. If the value is correct the next instruction is tested. Otherwise we jump to fail handler that writes is test number as a status code back to qemu that then exits on that status code. If all tests pass we write back 0 as a status code and exit. Reviewed-by: Alex Bennée Signed-off-by: Bastian Koppelmann Message-Id: <20210305170045.869437-7-kbastian@mail.uni-paderborn.de> [AJB: add container_hosts] Signed-off-by: Alex Bennée 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 ed378e7840..11009fe433 100755 --- a/tests/tcg/configure.sh +++ b/tests/tcg/configure.sh @@ -180,6 +180,12 @@ for target in $target_list; do container_image=debian-sparc64-cross container_cross_cc=sparc64-linux-gnu-gcc ;; + tricore-softmmu) + container_hosts=x86_64 + container_image=debian-tricore-cross + container_cross_as=tricore-as + container_cross_ld=tricore-ld + ;; x86_64-*) container_hosts="aarch64 ppc64el x86_64" container_image=debian-amd64-cross diff --git a/tests/tcg/tricore/Makefile.softmmu-target b/tests/tcg/tricore/Makefile.softmmu-target index d64a99b95f..3b048e49fa 100644 --- a/tests/tcg/tricore/Makefile.softmmu-target +++ b/tests/tcg/tricore/Makefile.softmmu-target @@ -3,6 +3,8 @@ TESTS_PATH = $(SRC_PATH)/tests/tcg/tricore LDFLAGS = -T$(TESTS_PATH)/link.ld ASFLAGS = +TESTS += test_abs.tst + QEMU_OPTS += -M tricore_testboard -nographic -kernel %.pS: $(TESTS_PATH)/%.S diff --git a/tests/tcg/tricore/test_abs.S b/tests/tcg/tricore/test_abs.S new file mode 100644 index 0000000000..e42240159a --- /dev/null +++ b/tests/tcg/tricore/test_abs.S @@ -0,0 +1,7 @@ +#include "macros.h" +.text +.global _start +_start: + TEST_D_D(abs, 1, 0, 0) + + TEST_PASSFAIL From patchwork Tue May 18 09:07:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 12264295 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B81DDC433ED for ; Tue, 18 May 2021 09:17:01 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4B9AC6135C for ; Tue, 18 May 2021 09:17:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4B9AC6135C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:54160 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1livqW-0005wK-Cq for qemu-devel@archiver.kernel.org; Tue, 18 May 2021 05:17:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55684) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1livhc-0008GS-TI for qemu-devel@nongnu.org; Tue, 18 May 2021 05:07:48 -0400 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]:46674) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1livhY-0005ZS-2Q for qemu-devel@nongnu.org; Tue, 18 May 2021 05:07:48 -0400 Received: by mail-wr1-x431.google.com with SMTP id y14so7242030wrm.13 for ; Tue, 18 May 2021 02:07:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=KjZ2XX0/mEu1lfy1D32TpTcB0SCk0bY9PontMklLOBw=; b=xHu8kJhwWpIOpJqouXDdPS7H4y1pdIyJUp+a8v4l+8LlrPU9EbV56RsWmBAc+DwbS3 COftDckQYe936aHPLg+0z8J2Mr5Ui210QEb43T38GSV0G8oAurGN8fKVd+yZL9LIqlYc EqyHWJT0lbnoUE7xFjVNgkBGZR4ubXK7U40JO1FRsGJpFjX/tmOErclUtooUvQJN0pNP 4qlQuqH3xVze/P+cryaOkpt4w9oyzGzgv0V/Epg6tCdGAxKCka+5YwBA9KEeITV0t4rS +h9cm8YWU4jLzjzTXFRqE7f2Vj5bmK1auFNpYyb6zRMSZP2UMcPkUHiirj1V3VO3bLGr d5Tw== 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=KjZ2XX0/mEu1lfy1D32TpTcB0SCk0bY9PontMklLOBw=; b=LAtZV98lNK1b/K3ZgWa4q0T2SL/VN1apTXBOAWj61j0UHAFr2oVE5A1y0wUBrj2xy9 kbgLYCWjA2BC4rtZgR+hhO44jo1Wal84pKpp1s9LGCS9Em0bT/UkIx/IhGH1Ap3cxXQi 0CzhX5DPCryDLZhafFFrVC28X1kg+7gwXxHoAhu53orz9ZRHkapEdXbS/gnarbk38R2z I1HHo3E4CC8rlnW+cTEwsEFOTNqQEqW8Su3AHropFVrmEe7T5/WiCw11q/ThK8YB2Hsp twdR/sGXfXUM1KdaJndG9RyEKwM6f5bKYcHMGyG3axyc5JaXGRF6azWYiLeGmD8ZRf9G oqRw== X-Gm-Message-State: AOAM531B483phd0e2X5LXFcomkKz43TgZkj6lgmZrM4NAcRB9gnkE3Gi S9X2D3YqXmbh0FtLmCqoSwShIgDFoMOhYg== X-Google-Smtp-Source: ABdhPJxas54KIUeXJ5QeY5w4vfMn+0pwIK0AQYkRq8XVXrCyrG5QQJuSO9F0vO21mToh7JUj1m8otg== X-Received: by 2002:a5d:6804:: with SMTP id w4mr5618549wru.363.1621328862726; Tue, 18 May 2021 02:07:42 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id h14sm2596552wmb.1.2021.05.18.02.07.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 May 2021 02:07:38 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 6E6E01FF9F; Tue, 18 May 2021 10:07:22 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL v2 16/29] tests/tcg/tricore: Add bmerge test Date: Tue, 18 May 2021 10:07:07 +0100 Message-Id: <20210518090720.21915-17-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210518090720.21915-1-alex.bennee@linaro.org> References: <20210518090720.21915-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::431; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x431.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Bastian Koppelmann , =?utf-8?q?Alex_Benn?= =?utf-8?q?=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Bastian Koppelmann Tested-by: Alex Bennée Signed-off-by: Bastian Koppelmann Signed-off-by: Alex Bennée Message-Id: <20210305170045.869437-8-kbastian@mail.uni-paderborn.de> 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 \ +#define TEST_CASE_PSW(num, testreg, correct, correct_psw, code...) \ +test_ ## num: \ + code; \ + LI(DREG_CORRECT_RESULT, correct) \ + mov DREG_TEST_NUM, num; \ + jne testreg, DREG_CORRECT_RESULT, fail; \ + mfcr DREG_CALC_PSW, $psw; \ + LI(DREG_CORRECT_PSW, correct_psw) \ + mov DREG_TEST_NUM, num; \ + jne DREG_CALC_PSW, DREG_CORRECT_PSW, fail; + /* Actual test case type * e.g inst %dX, %dY -> TEST_D_D * inst %dX, %dY, %dZ -> TEST_D_DD @@ -35,6 +49,16 @@ test_ ## num: \ insn DREG_CALC_RESULT, DREG_RS1; \ ) +#define TEST_D_DD_PSW(insn, num, result, psw, rs1, rs2) \ + TEST_CASE_PSW(num, DREG_CALC_RESULT, result, psw, \ + LI(DREG_RS1, rs1); \ + LI(DREG_RS2, rs2); \ + rstv; \ + insn DREG_CALC_RESULT, DREG_RS1, DREG_RS2; \ + ) + + + /* Pass/Fail handling part */ #define TEST_PASSFAIL \ j pass; \ diff --git a/tests/tcg/tricore/Makefile.softmmu-target b/tests/tcg/tricore/Makefile.softmmu-target index 3b048e49fa..de6a2cc88e 100644 --- a/tests/tcg/tricore/Makefile.softmmu-target +++ b/tests/tcg/tricore/Makefile.softmmu-target @@ -4,6 +4,7 @@ LDFLAGS = -T$(TESTS_PATH)/link.ld ASFLAGS = TESTS += test_abs.tst +TESTS += test_bmerge.tst QEMU_OPTS += -M tricore_testboard -nographic -kernel diff --git a/tests/tcg/tricore/test_bmerge.S b/tests/tcg/tricore/test_bmerge.S new file mode 100644 index 0000000000..8a0fa6d3f6 --- /dev/null +++ b/tests/tcg/tricore/test_bmerge.S @@ -0,0 +1,8 @@ +#include "macros.h" +.text +.global _start +_start: + TEST_D_DD_PSW(bmerge, 1, 0x555557f7, 0x00000b80, 0x0000001d, 0x0000ffff) + + TEST_PASSFAIL + From patchwork Tue May 18 09:07:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 12264355 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 10B46C433B4 for ; Tue, 18 May 2021 09:41:28 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C6BD46109E for ; Tue, 18 May 2021 09:41:27 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C6BD46109E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:38386 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1liwEA-0001uo-T2 for qemu-devel@archiver.kernel.org; Tue, 18 May 2021 05:41:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57722) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1livpH-0005IL-BR for qemu-devel@nongnu.org; Tue, 18 May 2021 05:15:46 -0400 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]:41500) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1livp3-00014f-OC for qemu-devel@nongnu.org; Tue, 18 May 2021 05:15:42 -0400 Received: by mail-wr1-x432.google.com with SMTP id d11so9345020wrw.8 for ; Tue, 18 May 2021 02:15:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=PdmEAT7DEu3lG1EeiXD5I5CWzOVFj+yeKWzonpH0EaM=; b=IrROKLW1x0JEZN6bLLel6CpBS7kYVpeUwgv0wfvxeqjDQVBLLLsljczfv4LU2L5KL+ 4Nvs9IXe0hUjWHARRXjTOLiFMqN99Bxwhonx6Sb+elj8otw+4FC8Ns6HDhNaBuF1T/Gn hEgQuKW4Ugr9KBIOyFO4NUFPk2HEC7Kx8r5NYZSZ8e2nfDIaadtICCCOTid1zLh040mI zPdf+908qcIG/Ukvm5AX/e1pHBaQKvRoAQ99Ocvl1Zq2D1xOByHUlsmVu5ZXpoPWfLwh o6qjAMqW7owDBvs+4fYMIEGRC7r9bvKpF4rOU5SjedukpErIDgzi798VFmSIf/UmVPta xgZA== 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=PdmEAT7DEu3lG1EeiXD5I5CWzOVFj+yeKWzonpH0EaM=; b=ICN27YyhWPmGs4PehXFORseM5d+wOdKi6U+yUz2eBaK3uZCNWvwgaA8r4CxjBkMHbm 21AYtznPvCdKnA99YhMaHfSs59Vvao+8BJHqHFUr5+eYameE/VMHY8+w73xlOV+uZiol XdPQzoqFG6YkNU6orKUN0+YQN3FS6i/pO6VZAsQBOKQajdDmt1L5LeAQiZVeDcHbr3n+ UHA6RrISqDiRn81rtmI9EwezDzKS7VQI3OFw1CuUmnVhVmU2v9AB8bpuIBhr15Y4sH1y E9sgjIaU0eOip9arDkzfzYsFwPS7rbF8iZGFhXwCfwyCK4515yBv+4ywLh28KdjkTCAL 0CNA== X-Gm-Message-State: AOAM532dxCgiNo1sfzrtffO+Yxy3qWtSxyz8ithI0xP1gaMWIwH4o0ou US+fwJ8le2lEbda40fyhG21FvkgPGN6Uhg== X-Google-Smtp-Source: ABdhPJx3WT/W9rty6CoKXZe5egMQitTIVM4PO9cHzTI14metAi0+jTktHuli9viBlE9mLcwk4b9t2Q== X-Received: by 2002:a5d:64aa:: with SMTP id m10mr5612210wrp.291.1621329327329; Tue, 18 May 2021 02:15:27 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id l3sm948363wmh.2.2021.05.18.02.15.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 May 2021 02:15:18 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 850101FFA5; Tue, 18 May 2021 10:07:22 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL v2 17/29] tests/tcg/tricore: Add clz test Date: Tue, 18 May 2021 10:07:08 +0100 Message-Id: <20210518090720.21915-18-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210518090720.21915-1-alex.bennee@linaro.org> References: <20210518090720.21915-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::432; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x432.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Bastian Koppelmann , =?utf-8?q?Alex_Benn?= =?utf-8?q?=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Bastian Koppelmann Tested-by: Alex Bennée Signed-off-by: Bastian Koppelmann [AJB: dropped duplicate Makefile] Signed-off-by: Alex Bennée 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 = TESTS += test_abs.tst TESTS += test_bmerge.tst +TESTS += test_clz.tst QEMU_OPTS += -M tricore_testboard -nographic -kernel diff --git a/tests/tcg/tricore/test_clz.S b/tests/tcg/tricore/test_clz.S new file mode 100644 index 0000000000..e03835f123 --- /dev/null +++ b/tests/tcg/tricore/test_clz.S @@ -0,0 +1,9 @@ +#include "macros.h" +.text +.global _start +_start: + TEST_D_D(cls.h, 1, 0x0, 0x6db17976) + TEST_D_D(cls.h, 2, 0x000f000f, 0x0) + + TEST_PASSFAIL + From patchwork Tue May 18 09:07:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 12264319 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4F44FC433ED for ; Tue, 18 May 2021 09:27:50 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E294361042 for ; Tue, 18 May 2021 09:27:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E294361042 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:56914 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1liw0y-0001Qp-VR for qemu-devel@archiver.kernel.org; Tue, 18 May 2021 05:27:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57598) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1livp2-00054F-Pg for qemu-devel@nongnu.org; Tue, 18 May 2021 05:15:29 -0400 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]:39490) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1livop-0000zo-Ud for qemu-devel@nongnu.org; Tue, 18 May 2021 05:15:27 -0400 Received: by mail-wm1-x32d.google.com with SMTP id l18-20020a1ced120000b029014c1adff1edso1059070wmh.4 for ; Tue, 18 May 2021 02:15:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=gsF0TlqIKHgI5XTG+7/s+PUC7Yv/S8qNsIgGgG42ddk=; b=p1peGg3vKQUYV/MCVs4ASqBy3vZsEmt6Bd/NWJDqvl3lM4Ic+i/nFt49pCbFnuMZEB lVhU19A1gDNNb7g65jxQ8pav+nsg6vxup/bhv3tYuCcmY8AIxmISz+0Zj/TcoQ327qtb WgNu1lV+WZ7SEX3fJQfzRbF7LwJv7CilO9cB29r1HoD77k59PoDq07RXue0mOIUNBa7F zkbdZQCOdWv06QS0N0+M7TAYr4D0AGoD3NSsUfwkrEJs3Gw2zRJyS71tUgYQ5ND3HBAc c012ZLFgR45y/qr/mZQYuneOnJ1qWktQvpU7emYCF/47uUDnsV8z/I1nJA2xfVpZjTyF W8NA== 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=gsF0TlqIKHgI5XTG+7/s+PUC7Yv/S8qNsIgGgG42ddk=; b=s4d02dYj2rfm06IHVduPgzmXrCUHb8Mcj9vJGkZqRJkMs/eMeHVjRjXsMQacfG2Utx 4MikJfabL1BHalAJOUfCyQzOGiqEw20muUz55JCrzxo85QrUNvpGd52oFyeDj2qXbOgY Jl0H8Ahci54V5kqbgzz3Iuv+dR06oZMHnEs+MeKkkgXoS8hOykKJ5Vom42y0ydIoBoBI EtZ4/OyYOWGpm9Ew6UeKe46r6ot1/rRR2rpqxtD0jfcTx3kZlcIZU8xRCBQEX+Qxk8nc 4F+MCgauWEqsYSulnnvNIsiTbxZI3EDcAtZxh77aeYAwOuBj+cknQMAcAGicPit/Qh50 o1lw== X-Gm-Message-State: AOAM530PZ/XyuBj3thGDPOPg/RSrL2oDvEVITsX+4VjFF5Fs5J5r8lYP zeK8h7Av/OR3a0n7A/yoVxyduA== X-Google-Smtp-Source: ABdhPJy07HkBNbz3yd6fnyq0WntwSj2GyjodSBnBNFh9s8MysMcpnnzZEJE8Kc6rguqz12ksQwfaMw== X-Received: by 2002:a1c:ed0a:: with SMTP id l10mr4303435wmh.151.1621329313164; Tue, 18 May 2021 02:15:13 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id p14sm20632854wrm.70.2021.05.18.02.15.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 May 2021 02:15:12 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 9D65D1FFA6; Tue, 18 May 2021 10:07:22 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL v2 18/29] tests/tcg/tricore: Add dvstep test Date: Tue, 18 May 2021 10:07:09 +0100 Message-Id: <20210518090720.21915-19-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210518090720.21915-1-alex.bennee@linaro.org> References: <20210518090720.21915-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=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_Benn?= =?utf-8?q?=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Bastian Koppelmann Tested-by: Alex Bennée Signed-off-by: Bastian Koppelmann Signed-off-by: Alex Bennée Message-Id: <20210305170045.869437-10-kbastian@mail.uni-paderborn.de> 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 @@ #define DREG_DEV_ADDR %a15 +#define EREG_RS1 %e6 +#define EREG_RS1_LO %d6 +#define EREG_RS1_HI %d7 +#define EREG_RS2 %e8 +#define EREG_RS2_LO %d8 +#define EREG_RS2_HI %d9 +#define EREG_CALC_RESULT %e8 +#define EREG_CALC_RESULT_HI %d9 +#define EREG_CALC_RESULT_LO %d8 +#define EREG_CORRECT_RESULT_LO %d0 +#define EREG_CORRECT_RESULT_HI %d1 + /* Test case wrappers */ #define TEST_CASE(num, testreg, correct, code...) \ test_ ## num: \ @@ -27,6 +39,15 @@ test_ ## num: \ mov DREG_TEST_NUM, num; \ jne testreg, DREG_CORRECT_RESULT, fail \ +#define TEST_CASE_E(num, correct_lo, correct_hi, code...) \ +test_ ## num: \ + code; \ + mov DREG_TEST_NUM, num; \ + LI(EREG_CORRECT_RESULT_LO, correct_lo) \ + jne EREG_CALC_RESULT_LO, EREG_CORRECT_RESULT_LO, fail; \ + LI(EREG_CORRECT_RESULT_HI, correct_hi) \ + jne EREG_CALC_RESULT_HI, EREG_CORRECT_RESULT_HI, fail; + #define TEST_CASE_PSW(num, testreg, correct, correct_psw, code...) \ test_ ## num: \ code; \ @@ -57,7 +78,13 @@ test_ ## num: \ insn DREG_CALC_RESULT, DREG_RS1, DREG_RS2; \ ) - +#define TEST_E_ED(insn, num, res_hi, res_lo, rs1_hi, rs1_lo, rs2) \ + TEST_CASE_E(num, res_lo, res_hi, \ + LI(EREG_RS1_LO, rs1_lo); \ + LI(EREG_RS1_HI, rs1_hi); \ + LI(DREG_RS2, rs2); \ + insn EREG_CALC_RESULT, EREG_RS1, DREG_RS2; \ + ) /* Pass/Fail handling part */ #define TEST_PASSFAIL \ diff --git a/tests/tcg/tricore/Makefile.softmmu-target b/tests/tcg/tricore/Makefile.softmmu-target index a9b81545e2..799b51191e 100644 --- a/tests/tcg/tricore/Makefile.softmmu-target +++ b/tests/tcg/tricore/Makefile.softmmu-target @@ -6,6 +6,7 @@ ASFLAGS = TESTS += test_abs.tst TESTS += test_bmerge.tst TESTS += test_clz.tst +TESTS += test_dvstep.tst QEMU_OPTS += -M tricore_testboard -nographic -kernel diff --git a/tests/tcg/tricore/test_dvstep.S b/tests/tcg/tricore/test_dvstep.S new file mode 100644 index 0000000000..858dbc62dd --- /dev/null +++ b/tests/tcg/tricore/test_dvstep.S @@ -0,0 +1,15 @@ +#include "macros.h" +.text +.global _start +_start: + # Result RS1 RS2 + TEST_E_ED(dvstep, 1, 0x000001ff, 0xfffe5cff, 0x00000001, 0xfffffe5c, 0x0) + TEST_E_ED(dvstep, 2, 0x00000000, 0x000000ff, 0x00000000, 0x00000000, 0x0) + TEST_E_ED(dvstep, 3, 0x0000f000, 0x000000fd, 0x010000f0, 0x00000000, 0x0) + TEST_E_ED(dvstep, 4, 0xfffff000, 0x00000000, 0x7ffffff0, 0x00000000, 0x0) + TEST_E_ED(dvstep.u, 5, 0xffffff00, 0x100008ff, 0xffffffff, 0x00100008, 0x0) + TEST_E_ED(dvstep.u, 6, 0x00000100, 0x00000000, 0x08000001, 0x00000000, \ + 0xffffff2d) + + TEST_PASSFAIL + From patchwork Tue May 18 09:07:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 12264303 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 823DDC433ED for ; Tue, 18 May 2021 09:20:33 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 459F761285 for ; Tue, 18 May 2021 09:20:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 459F761285 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:34648 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1livtw-0003Jq-5X for qemu-devel@archiver.kernel.org; Tue, 18 May 2021 05:20:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55698) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1livhe-0008Nf-Mi for qemu-devel@nongnu.org; Tue, 18 May 2021 05:07:50 -0400 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]:38835) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1livhc-0005Zh-6c for qemu-devel@nongnu.org; Tue, 18 May 2021 05:07:50 -0400 Received: by mail-wr1-x42d.google.com with SMTP id j14so7588536wrq.5 for ; Tue, 18 May 2021 02:07:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=LXn6aPVAVt/bVyPUARbsnNGDxpKekSthuNr53hK5qyQ=; b=GyoWwF+XO8HTInltMoa+RABt6hmJD9fHppPCM0KbM/6f/aMAEfZaF0pfuVdMjrjpSe XZhEmk8zt0CagbqAyOjWaZRaQgpfIozjB43NIMMhWGHtnrJkaVpdFXcUzRwyZcpDRgWu w307TqAmrVa5EqVJfWjNbDILgjKfg/nsoY1jxCHX5jfGBAAWRfME92XCnL0Z2koVA+TA qhWjdzPHPF7u8ni0b8naYZEtRvn+EYOaXHciRQEDsPSoVkBV/whfL8mFVj5A/RDsYGbQ f1anmNpCyPr1IU0Ah11BEeQl+BZCnE3rv/KPOdd5Ybf3sm4VqnlxmPm8liw0vXaQeEM/ 6hug== 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=LXn6aPVAVt/bVyPUARbsnNGDxpKekSthuNr53hK5qyQ=; b=HTBlXztVrgmpXxq9TiST3J7W61hagvYo5Xp4BA/tS+8D31EamyazsXm3S2V3e9I1hU Rypjau3kboXKuwIr6pXjC4uNW7DX+/QkQgmDvb43V4QC2VuIZ6m/PXYL/xxRrSIMlU/A z1jhQU9p+kgk04W8dEXOFGVm4R9plHUsUBbcbj2cWu4HzRTlDzBXikVo9zYymQFWT4Iq QxYaim9LNei1M2UQijhdhRsiz8dDPRHb1ORnPYdWwN2iNJUcc49ncY0VLxLiqzzEf8rg JInbPaH1PvgZD8S6qZpNoWleFfXm+w4bhPBM+H29OhUUBFEsodMZWVgkhcuY6KUtKRS5 49bA== X-Gm-Message-State: AOAM532+OwtDf6TZlEJuLhe8kOd5V4hwJy3NTbGcxD6NMM+JnHk31sNV x2dp1Ymx4yIDIHNuDgSNeBuGVA== X-Google-Smtp-Source: ABdhPJzwigjKAyOEJ6iB6JXLA49Ee6rNWImUQnH2VQLdr4bqAMgMywJuur40NA/FGlmZcObUrYKuMQ== X-Received: by 2002:a5d:6b43:: with SMTP id x3mr5508455wrw.263.1621328864591; Tue, 18 May 2021 02:07:44 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id v18sm24759598wro.18.2021.05.18.02.07.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 May 2021 02:07:42 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id B64041FF7E; Tue, 18 May 2021 10:07:22 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL v2 19/29] tests/tcg/tricore: Add fadd test Date: Tue, 18 May 2021 10:07:10 +0100 Message-Id: <20210518090720.21915-20-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210518090720.21915-1-alex.bennee@linaro.org> References: <20210518090720.21915-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42d; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Bastian Koppelmann , =?utf-8?q?Alex_Benn?= =?utf-8?q?=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Bastian Koppelmann Tested-by: Alex Bennée Signed-off-by: Bastian Koppelmann Signed-off-by: Alex Bennée Message-Id: <20210305170045.869437-11-kbastian@mail.uni-paderborn.de> 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 += test_abs.tst TESTS += test_bmerge.tst TESTS += test_clz.tst TESTS += test_dvstep.tst +TESTS += test_fadd.tst QEMU_OPTS += -M tricore_testboard -nographic -kernel diff --git a/tests/tcg/tricore/test_fadd.S b/tests/tcg/tricore/test_fadd.S new file mode 100644 index 0000000000..1a65054803 --- /dev/null +++ b/tests/tcg/tricore/test_fadd.S @@ -0,0 +1,16 @@ +#include "macros.h" +.text +.global _start +_start: + TEST_D_DD_PSW(add.f, 1, 0x7fc00000, 0x00000b80, 0xffffff85, 0x00001234) + TEST_D_DD_PSW(add.f, 2, 0xf9c00000, 0x00000b80, 0xf9400000, 0xf9400000) + TEST_D_DD_PSW(add.f, 3, 0x8bb858ca, 0x00000b80, 0x8b3858ca, 0x8b3858ca) + TEST_D_DD_PSW(add.f, 4, 0x00000000, 0x00000b80, 0x000000ff, 0x00000000) + TEST_D_DD_PSW(add.f, 5, 0x7fc00000, 0x00000b80, 0xfffffe52, 0x0a4cf70c) + TEST_D_DD_PSW(add.f, 6, 0x9e6d5076, 0x84000b80, 0x9ded50ec, 0x9ded4fff) + TEST_D_DD_PSW(add.f, 7, 0x00000000, 0x04000b80, 0x0000e8bd, 0x00000000) + TEST_D_DD_PSW(add.f, 8, 0x7fc00000, 0xc4000b80, 0xffad546e, 0xffad546e) + TEST_D_DD_PSW(add.f, 9, 0x7fc00000, 0x04000b80, 0xfffe0000, 0x08130000) + + TEST_PASSFAIL + From patchwork Tue May 18 09:07:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 12264313 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A8BAFC433ED for ; Tue, 18 May 2021 09:26:05 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5EDFC61376 for ; Tue, 18 May 2021 09:26:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5EDFC61376 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:51034 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1livzI-0005pv-E9 for qemu-devel@archiver.kernel.org; Tue, 18 May 2021 05:26:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57664) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1livpE-000589-1v for qemu-devel@nongnu.org; Tue, 18 May 2021 05:15:40 -0400 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]:35547) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1livp0-00013m-Pb for qemu-devel@nongnu.org; Tue, 18 May 2021 05:15:38 -0400 Received: by mail-wr1-x42d.google.com with SMTP id a4so9388006wrr.2 for ; Tue, 18 May 2021 02:15:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=P1AgBab+lMSlJGHVyOYf4zT34+22+JEN9xYs+u+KKMU=; b=AdrIBDezCwJg/1CKtDIkyxDE/KP1v0IUlQqiAqfgqR9vwLjcIa5zoMs20PPC5IfdOm h+MU1pBs3WTcIfa8mhp6N5Q+TRau9O/ilQT9qfODldMryTIYCL5X3u5wG4kq4ecAlFjb 86N7UQ959eZ9mQRmNAzhWQA5AFMfLSR6tNbI+zAOxgha3MdvbOF6N6qTAX1rN8CERZVI PV06wKwqMSr9ML1nKYAvnO8MeY2UcchvU42l7YbPUdkgbByHV0zSpUg5vznKaII7/XP4 f8QFVfbhT2kwAyIANAVvkwmItRU2QnQwES/6DZkcfGQisSii/AHel2o6jvRFxOhKpDj4 OFKg== 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=P1AgBab+lMSlJGHVyOYf4zT34+22+JEN9xYs+u+KKMU=; b=Aj1naGP51kidXoSYHR3HfGzuN5HqJqBRzzlQI+WoPqP9hQqhQSRsl6TufWHcAlXzD9 3F8SDy7+Az2OD7keFqVHEH1NfuL4ku8V35qrX/fgg8Ezm8YISgp5AwKjfPf0iFHfGq7Z qM2hiZ3meGzU4hk7VQULwNL7h9+AOpvfUV1HSzhocqV5x9MzCUcBr7oeP9jxHKDU02vp gCmJPK60OdgzbrtDKUk2A+md+tUUsraiCAKN2yzF4pVZ3dOqOhldbCwqfTatQm7gxthq Lmo1fW5iHh0mnIQWi9HHKzT3SWAoN5+qOFTep9B2InkYUrCmaiX+GnmiA6Tc/g358eM0 pM2A== X-Gm-Message-State: AOAM532zEdTyDhwx0KsGdyUxXpMpW9hozqTT1McgKAuAD3n30O5L6zKc RC9kf3Opf9wbS/CrwqcCtCwd7A== X-Google-Smtp-Source: ABdhPJy0SGonDPhl2OOJI7+kgrRyImTut8xINzq3vYitl3PVrUS/ASO8yAtB3KXO9U+s1UF2IYJuww== X-Received: by 2002:adf:fe8e:: with SMTP id l14mr5566893wrr.305.1621329323210; Tue, 18 May 2021 02:15:23 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id c7sm11551004wrs.23.2021.05.18.02.15.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 May 2021 02:15:18 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id CC3411FFA9; Tue, 18 May 2021 10:07:22 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL v2 20/29] tests/tcg/tricore: Add fmul test Date: Tue, 18 May 2021 10:07:11 +0100 Message-Id: <20210518090720.21915-21-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210518090720.21915-1-alex.bennee@linaro.org> References: <20210518090720.21915-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42d; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=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_Benn?= =?utf-8?q?=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Bastian Koppelmann Tested-by: Alex Bennée Signed-off-by: Bastian Koppelmann Signed-off-by: Alex Bennée Message-Id: <20210305170045.869437-12-kbastian@mail.uni-paderborn.de> 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 += test_bmerge.tst TESTS += test_clz.tst TESTS += test_dvstep.tst TESTS += test_fadd.tst +TESTS += test_fmul.tst QEMU_OPTS += -M tricore_testboard -nographic -kernel diff --git a/tests/tcg/tricore/test_fmul.S b/tests/tcg/tricore/test_fmul.S new file mode 100644 index 0000000000..fb1f634b2d --- /dev/null +++ b/tests/tcg/tricore/test_fmul.S @@ -0,0 +1,8 @@ +#include "macros.h" +.text +.global _start +_start: + TEST_D_DD_PSW(mul.f, 1, 0x974f4f0a, 0x84000b80, 0x1a0b1980, 0xbcbec42d) + + TEST_PASSFAIL + From patchwork Tue May 18 09:07:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 12264389 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 13610C433ED for ; Tue, 18 May 2021 09:51:14 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B909C613E3 for ; Tue, 18 May 2021 09:51:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B909C613E3 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:45252 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1liwNc-0000ah-Rw for qemu-devel@archiver.kernel.org; Tue, 18 May 2021 05:51:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59768) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1livyY-00066y-MO for qemu-devel@nongnu.org; Tue, 18 May 2021 05:25:18 -0400 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]:39559) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1livyV-0006OV-Cp for qemu-devel@nongnu.org; Tue, 18 May 2021 05:25:18 -0400 Received: by mail-wm1-x334.google.com with SMTP id l18-20020a1ced120000b029014c1adff1edso1077429wmh.4 for ; Tue, 18 May 2021 02:25:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=aNUdS1dWgsWlgWbZA5C7g7zNJF/kpztMMPeqJW24014=; b=NldA/rvLL2v+DvbvGGf+HlPpkSdYMH1OkvExgNFpY+hIwMW0jq22Siy+yLt6DHITqw 80L4CfXacKJhErId4gemtPEiKOuPA6yGR/2bwJuqJ+NgY54PFKP26PNzbxNFff+fZTBg yMZNWVkP2rF1f6oOutpbW8sA/tneq9uxtNiiIftGRtdgI1HyGyj6ilz4/4RiQ1ep/BZW XNmyMUSw0pHkJ4iXZnMsbFUU2jikppondPcNf4t7IQlhcRCLpgRUYk3PkIchUUiCvcTH ECA7yWwxKiuABElM7YjO1VK2mb9iRKnm7a01L3QoKYz4LTNz6knC7j93RfmJc9SHlma+ b2OA== 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=aNUdS1dWgsWlgWbZA5C7g7zNJF/kpztMMPeqJW24014=; b=UWrA9b+2p0ed/zx23TzdA0B5Q5dWD48A2cYEoEHd5iz2ocLoUVsu+GrYAfKIAjd73Q +HN6iesNNj02qFJWCQzXpFnhzIKyFOcYRe22a4/9isYi+JecasTpRjWCA1/Y/B7RHP1y M73bVGOURmleLgIKFw/cnjHsmnvkIugGglUUCRaCtPPl962pkm4byTPQAeOI5nWQZYMN VPRQrpMAMA4aT6T+uGrAn3cTQvwgS69X7zFpGOALJQYfo0ywVI1ZP1seNxeX/Vxq0UuK Ugplq8qjsojyoSfpSsRHbaRvyCBOlenpZBCG6+8k0hayuvnelkLIYdEfDq5WKPcQ1/lc OTmw== X-Gm-Message-State: AOAM531Vf67xJDmWw5RFrKiUhk8zdD56qY9iMJ3DfX8X62gN4S08Flt7 TgNyEn6pCoRl8SmyQVXiko2JwA== X-Google-Smtp-Source: ABdhPJyYbO3E9vWBhSYXDTYDFuz3wFmvOBDCWgQSjNx3K62K3infXZhkvKZWoyNBvsPb0ApTfk4hLw== X-Received: by 2002:a1c:f614:: with SMTP id w20mr4379490wmc.70.1621329913376; Tue, 18 May 2021 02:25:13 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id f12sm14386049wre.88.2021.05.18.02.25.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 May 2021 02:25:12 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id E38AA1FFAA; Tue, 18 May 2021 10:07:22 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL v2 21/29] tests/tcg/tricore: Add ftoi test Date: Tue, 18 May 2021 10:07:12 +0100 Message-Id: <20210518090720.21915-22-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210518090720.21915-1-alex.bennee@linaro.org> References: <20210518090720.21915-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x334.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Bastian Koppelmann , =?utf-8?q?Alex_Benn?= =?utf-8?q?=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Bastian Koppelmann Tested-by: Alex Bennée Signed-off-by: Bastian Koppelmann Signed-off-by: Alex Bennée Message-Id: <20210305170045.869437-13-kbastian@mail.uni-paderborn.de> 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; \ ) +#define TEST_D_D_PSW(insn, num, result, psw, rs1) \ + TEST_CASE_PSW(num, DREG_CALC_RESULT, result, psw, \ + LI(DREG_RS1, rs1); \ + rstv; \ + insn DREG_CORRECT_RESULT, DREG_RS1; \ + ) + #define TEST_D_DD_PSW(insn, num, result, psw, rs1, rs2) \ TEST_CASE_PSW(num, DREG_CALC_RESULT, result, psw, \ LI(DREG_RS1, rs1); \ diff --git a/tests/tcg/tricore/Makefile.softmmu-target b/tests/tcg/tricore/Makefile.softmmu-target index 34da1f37de..fcc7b6c1c9 100644 --- a/tests/tcg/tricore/Makefile.softmmu-target +++ b/tests/tcg/tricore/Makefile.softmmu-target @@ -9,6 +9,7 @@ TESTS += test_clz.tst TESTS += test_dvstep.tst TESTS += test_fadd.tst TESTS += test_fmul.tst +TESTS += test_ftoi.tst QEMU_OPTS += -M tricore_testboard -nographic -kernel diff --git a/tests/tcg/tricore/test_ftoi.S b/tests/tcg/tricore/test_ftoi.S new file mode 100644 index 0000000000..fb4af6b5aa --- /dev/null +++ b/tests/tcg/tricore/test_ftoi.S @@ -0,0 +1,10 @@ +#include "macros.h" +.text +.global _start +_start: + TEST_D_D_PSW(ftoi, 1, 0x0, 0x84000b80, 0x05f6e605) + TEST_D_D_PSW(ftoi, 2, 0x0, 0x04000b80, 0x00012200) + TEST_D_D_PSW(ftoi, 3, 0x0, 0xc4000b80, 0xffffffff) + + TEST_PASSFAIL + From patchwork Tue May 18 09:07:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 12264351 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_NONE,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4C99BC433ED for ; Tue, 18 May 2021 09:37:20 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id F1480610A8 for ; Tue, 18 May 2021 09:37:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F1480610A8 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:54924 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1liwAB-0002G0-2n for qemu-devel@archiver.kernel.org; Tue, 18 May 2021 05:37:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57698) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1livpF-0005DH-EH for qemu-devel@nongnu.org; Tue, 18 May 2021 05:15:41 -0400 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]:39730) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1livp0-00013s-QV for qemu-devel@nongnu.org; Tue, 18 May 2021 05:15:41 -0400 Received: by mail-wr1-x435.google.com with SMTP id v12so9358875wrq.6 for ; Tue, 18 May 2021 02:15:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=t8UuEZj2MtU/t2ayU7Vg0m6MuJkBOt7allBeNrJsAek=; b=XO+GYugoApvjZK80yNsP39obaP+dfI6/GlfcwHQxW4peotsr4MLToauLslH27Q+jIu on25WKdHN2KwQvEFl0dvI847QyG5XWR2VYSQ0D4CzkBJL8EwAyKvvTluc52tGNpcSz1l bjyzYn3ZqzN5wy7BsN++vup2YQsWWoTChG11J71ZJj77Q/URwqHSIhkfx5iKX+MgWV8E xSWKZPgJa1xggW4EeOwO5DMsvRSJsi9B86IczlSEGMyiohbUwBjCKKhlDGMnkaVWT1Hu abZUMcsaSw3j/L4j6h4o2e4+UGS9fZINhNlGdCPEDJdwgkjHCwHtL0Cx6B2m3EMykcPw 2e5g== 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=t8UuEZj2MtU/t2ayU7Vg0m6MuJkBOt7allBeNrJsAek=; b=fCk2vrI0TpIXnUD7ytEDK7A851ou5UD3iPWWakj3BEFNJUMlgHvShOv+LtvftCFsTS ksm0s8Y3M/2cxcwLVe4yQc+NaSe+ANe+Px/uotv/I+wAvqsMLELPbKQOo2kQU6Lpw9yg mrRcB9XBgjrOwdxrLdmi6ZTEFBTS6MjUTcSM5+jT83Brc2LR0f/Z8yLO1wugl+0Nkc1t QJZd0pk1BcsMQbQFGVaXX6V5e4h5DhgBSxR5r5kqFfv4xOqawvXenQTJGkw+50N52E3r X7ZvY9/KhLrWubwiHtGJwPEu17VDS8GP0BXbLKJBK1B2Own6uFl1TSJ0jvDnXnvCDpOy peJQ== X-Gm-Message-State: AOAM533p8xSn73AnbiDHvgj96qtKzrRLXHGeAKZLyevH2cHxfyii6jXp XBWQ02XQ4BeA75LgwCIalaYoEQ== X-Google-Smtp-Source: ABdhPJzowHeXI7XaYziLn6uhLYJvU7/YbmUxDaP2Jz8R4mSxWogFGy3mrhxMGPdIBb9o66hNyXv38Q== X-Received: by 2002:a05:6000:180e:: with SMTP id m14mr5564572wrh.229.1621329325229; Tue, 18 May 2021 02:15:25 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id i11sm20979372wrq.26.2021.05.18.02.15.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 May 2021 02:15:18 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 081081FFAB; Tue, 18 May 2021 10:07:23 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL v2 22/29] tests/tcg/tricore: Add madd test Date: Tue, 18 May 2021 10:07:13 +0100 Message-Id: <20210518090720.21915-23-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210518090720.21915-1-alex.bennee@linaro.org> References: <20210518090720.21915-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::435; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x435.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Bastian Koppelmann , =?utf-8?q?Alex_Benn?= =?utf-8?q?=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Bastian Koppelmann Tested-by: Alex Bennée Signed-off-by: Bastian Koppelmann Signed-off-by: Alex Bennée Message-Id: <20210305170045.869437-14-kbastian@mail.uni-paderborn.de> 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; \ ) +#define TEST_D_DDD_PSW(insn, num, result, psw, rs1, rs2, rs3) \ + TEST_CASE_PSW(num, DREG_CALC_RESULT, result, psw, \ + LI(DREG_RS1, rs1); \ + LI(DREG_RS2, rs2); \ + LI(DREG_RS3, rs3); \ + rstv; \ + insn DREG_CALC_RESULT, DREG_RS1, DREG_RS2, DREG_RS3; \ + ) + +#define TEST_D_DDI_PSW(insn, num, result, psw, rs1, rs2, imm) \ + TEST_CASE_PSW(num, DREG_CALC_RESULT, result, psw, \ + LI(DREG_RS1, rs1); \ + LI(DREG_RS2, rs2); \ + rstv; \ + insn DREG_CALC_RESULT, DREG_RS1, DREG_RS2, imm; \ + ) + #define TEST_E_ED(insn, num, res_hi, res_lo, rs1_hi, rs1_lo, rs2) \ TEST_CASE_E(num, res_lo, res_hi, \ LI(EREG_RS1_LO, rs1_lo); \ diff --git a/tests/tcg/tricore/Makefile.softmmu-target b/tests/tcg/tricore/Makefile.softmmu-target index fcc7b6c1c9..8de005523e 100644 --- a/tests/tcg/tricore/Makefile.softmmu-target +++ b/tests/tcg/tricore/Makefile.softmmu-target @@ -10,6 +10,7 @@ TESTS += test_dvstep.tst TESTS += test_fadd.tst TESTS += test_fmul.tst TESTS += test_ftoi.tst +TESTS += test_madd.tst QEMU_OPTS += -M tricore_testboard -nographic -kernel diff --git a/tests/tcg/tricore/test_madd.S b/tests/tcg/tricore/test_madd.S new file mode 100644 index 0000000000..5d839772bb --- /dev/null +++ b/tests/tcg/tricore/test_madd.S @@ -0,0 +1,11 @@ +#include "macros.h" +.text +.global _start +_start: + TEST_D_DDI_PSW(madd, 1, 0x0000fffd, 0x60000b80, 0x0000ffff, 0x7fffffff,2) + TEST_D_DDI_PSW(madd, 2, 0xffff7fff, 0x60000b80, 0xffff8001, 0x7fffffff,2) + TEST_D_DDD_PSW(madds.u, 3, 0xffffffff, 0x60000b80, 0x00000000, 0x80000000, \ + 0x80000000) + + TEST_PASSFAIL + From patchwork Tue May 18 09:07:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 12264349 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_NONE,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4B79BC433B4 for ; Tue, 18 May 2021 09:37:10 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B7F1E6109E for ; Tue, 18 May 2021 09:37:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B7F1E6109E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:54232 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1liwA0-0001nr-Qx for qemu-devel@archiver.kernel.org; Tue, 18 May 2021 05:37:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57670) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1livpE-00059G-9M for qemu-devel@nongnu.org; Tue, 18 May 2021 05:15:40 -0400 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]:42740) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1livp0-00012U-Qb for qemu-devel@nongnu.org; Tue, 18 May 2021 05:15:39 -0400 Received: by mail-wr1-x42d.google.com with SMTP id x8so9345190wrq.9 for ; Tue, 18 May 2021 02:15:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=jcmdAYe0KwSyd2gVv/xFHxAZ2fE+u7+DYM1mPJLmcY8=; b=NCUfcYSJFkk8Depp/8l85q6h2DiYVdhtrudpmslvVsYOI3te5XlzU+nh4Tphy2JPMS gfzX8iNER/jW0wPUfinOLbEJMefyqPOPw0TxT7st1giEHI+AJiwy83tDWG84kx+T60GC PQClv1jDzmK25v4gd96n3lifzTb9FSSpwkyKHtD8I/wx7vBgs97VKN7YEvFy89mJxvAL Moe173RPiM5GiiA9bkHX3ISOye0rzp0AXYIiU9qhKo4CT7icaqEQgsUcOxD/+S3hLG/w VvVDRL8FPaJObQ7dx7DMiC3xWQ4XfkEUJbMK6yCw793/dpphr1F7A+gf7td4NPHclwJv w+gw== 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=jcmdAYe0KwSyd2gVv/xFHxAZ2fE+u7+DYM1mPJLmcY8=; b=FXeusEVEDJuD8niG08GE1uSFualVz4OqLGzGxsiwP+/zTMFeTdEA1nfhpw1LUQ8est NYwHN6eRvAcJ7sjbmA7LR3mWB5RQOoB2GTTct1a1U8cw/dQH+4pElBR25vOQtOcPpwdB /DLqSfEC2Tn/zslvr5uCPhOv49jeAs5boMnBlW0GssdV7/7X+XxaBOEndCcaIns+Fu7A iX4XZCzpoEugBgxXblVtImBmNN09r5m1Hj/DsOI8ZLcRURpjRsOj+A+4LApAe56I9vvt 7z91sVO5dLUF+ArQQpwSrtrLvomoTXJZcSD9Wyc+We++L3wLSNcJVdbMKCKe3NGLUD46 KmlQ== X-Gm-Message-State: AOAM533qtMiHK6yZYye7z5+BhZUCe9PiG5nVBp38loHio/qC16XqwDp7 grrc8RclCiVsAaR0QyH9oXKIe/jxcV5Aww== X-Google-Smtp-Source: ABdhPJyKITUxemROFjFvCDAs9UU0YaZ4iVPaoiXWS+hG76W6TOWSzClpR4t8JHmOQnDRQDixR97HeQ== X-Received: by 2002:adf:d081:: with SMTP id y1mr5428333wrh.179.1621329320689; Tue, 18 May 2021 02:15:20 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id l8sm1838716wry.55.2021.05.18.02.15.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 May 2021 02:15:18 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 1F9F01FFAC; Tue, 18 May 2021 10:07:23 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL v2 23/29] tests/tcg/tricore: Add msub test Date: Tue, 18 May 2021 10:07:14 +0100 Message-Id: <20210518090720.21915-24-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210518090720.21915-1-alex.bennee@linaro.org> References: <20210518090720.21915-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42d; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Bastian Koppelmann , =?utf-8?q?Alex_Benn?= =?utf-8?q?=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Bastian Koppelmann Tested-by: Alex Bennée Signed-off-by: Bastian Koppelmann Signed-off-by: Alex Bennée Message-Id: <20210305170045.869437-15-kbastian@mail.uni-paderborn.de> 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 += test_fadd.tst TESTS += test_fmul.tst TESTS += test_ftoi.tst TESTS += test_madd.tst +TESTS += test_msub.tst QEMU_OPTS += -M tricore_testboard -nographic -kernel diff --git a/tests/tcg/tricore/test_msub.S b/tests/tcg/tricore/test_msub.S new file mode 100644 index 0000000000..6dee87d99c --- /dev/null +++ b/tests/tcg/tricore/test_msub.S @@ -0,0 +1,9 @@ +#include "macros.h" +.text +.global _start +_start: + TEST_D_DDI_PSW(msub, 1, 0xd2fbe5e0, 0x00000b80,0x64003300, 0xff5420d4, -216) + TEST_D_DDI_PSW(msub, 2, 0xfffffc10, 0x00000b80,0xfffffe68, 0xfffffffd, -200) + TEST_D_DDD_PSW(msubs.u, 3, 0x0, 0x60000b80, 0x1, 0xffffffff, 0xffffffdb) + TEST_PASSFAIL + From patchwork Tue May 18 09:07:15 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 12264331 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AAE76C433B4 for ; Tue, 18 May 2021 09:34:48 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3BCC061042 for ; Tue, 18 May 2021 09:34:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3BCC061042 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:45746 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1liw7j-0004YZ-A2 for qemu-devel@archiver.kernel.org; Tue, 18 May 2021 05:34:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57622) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1livp6-00055g-Iz for qemu-devel@nongnu.org; Tue, 18 May 2021 05:15:34 -0400 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]:36653) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1livot-00011P-69 for qemu-devel@nongnu.org; Tue, 18 May 2021 05:15:29 -0400 Received: by mail-wm1-x336.google.com with SMTP id n17-20020a7bc5d10000b0290169edfadac9so1075273wmk.1 for ; Tue, 18 May 2021 02:15:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=wlStNeaFvQ478PYv8M76ZBXcwfFSAnqrSyKXAIim/UE=; b=M5qpUg/MLcgPNsOqoT27fE+HBVx92emyYubvG7m6o3782oEEDUrgJLEOXDEXENA5jf dOMpIb9Rbs5PgVQ7Uj272YLfEXQ4XyzGUXI3pVF4VIf1Xucwzs4aeRKVMv3sZCVu5wbP vfjpJwWYVSqHLuu9rkHLCmeqAC2YKdeTlHqGD2DRwTfSxo0znmoK5mm3z/mA/C0zJ11v YOkbgkTbJEJHzN1S4WmK2LuYuT3bfsTVnM4XV0jS4gRGccAN1lkuZ1qD5AocYC/8nWsH 6s8YdcKt5zNB221i7ib/7H0AyOxpIXkDylab614aMqdzPXcuszlrE3BpYT41rKhnSTdu Wk6Q== 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=wlStNeaFvQ478PYv8M76ZBXcwfFSAnqrSyKXAIim/UE=; b=dSBPpVxy/l7RMpodj/LPZTy2I8C24K1ViimqcGIDDEbI+qloSaGcN922C/aH5FtGm5 Q5uM9LFT+Ux511tSZOyaOdCKJMuC3FAkaLrdsmmOtEiuZSBo+wL/UB1v3oclWuvEcvYD Y+1QoYEfXtPVBl+Odd06qDIQEsNBcRRrYEvwUGyyYiciH3vluxVXe7x2xdrVOyofrZAB OayMXDhi3B+qHfl0QXlWhxhFyJKaHuCdOhSodU/yFoigRrOb+QYIHJHrY0RDJtKlX807 g5+1rRxNWJaKEfFtFS6UbVn3qS8fr9MrwucHbqwYOFqsBT7R5CxZFoGTIw+PfyoCxJPv IFSg== X-Gm-Message-State: AOAM532ETKzuLeW5QF4ZJOxFT+YhV7sqtMz0RjRluvRjqWbMWg1/5kDo 7Y+2RWmmQedTwkQa4VwT+jcj5qr5SSAltw== X-Google-Smtp-Source: ABdhPJxc6PaHvwuBzwvtRFAuXF7acQXp9BzgjgjJu+nn3IafuwupBKerUs6WdkdSCXGIJ+SKrLS5Yg== X-Received: by 2002:a7b:c1c5:: with SMTP id a5mr3801125wmj.63.1621329316576; Tue, 18 May 2021 02:15:16 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id p7sm20526800wrt.24.2021.05.18.02.15.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 May 2021 02:15:12 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 37C191FFAE; Tue, 18 May 2021 10:07:23 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL v2 24/29] tests/tcg/tricore: Add muls test Date: Tue, 18 May 2021 10:07:15 +0100 Message-Id: <20210518090720.21915-25-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210518090720.21915-1-alex.bennee@linaro.org> References: <20210518090720.21915-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::336; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x336.google.com X-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_Benn?= =?utf-8?q?=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Bastian Koppelmann Tested-by: Alex Bennée Signed-off-by: Bastian Koppelmann Signed-off-by: Alex Bennée Message-Id: <20210305170045.869437-16-kbastian@mail.uni-paderborn.de> 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 += test_fmul.tst TESTS += test_ftoi.tst TESTS += test_madd.tst TESTS += test_msub.tst +TESTS += test_muls.tst QEMU_OPTS += -M tricore_testboard -nographic -kernel diff --git a/tests/tcg/tricore/test_muls.S b/tests/tcg/tricore/test_muls.S new file mode 100644 index 0000000000..ca517556bc --- /dev/null +++ b/tests/tcg/tricore/test_muls.S @@ -0,0 +1,9 @@ +#include "macros.h" +.text +.global _start +_start: + TEST_D_DD_PSW(muls.u, 1, 0xffffffff, 0x78000b80, 0x80000001, 0xffffffff) + TEST_D_DD_PSW(muls.u, 2, 0xffffffff, 0x60000b80, 0xfffffffe, 0xffffffff) + + TEST_PASSFAIL + From patchwork Tue May 18 09:07:16 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 12264321 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7BE06C433B4 for ; Tue, 18 May 2021 09:28:24 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0699D613AA for ; Tue, 18 May 2021 09:28:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0699D613AA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:57538 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1liw1X-0001pV-1q for qemu-devel@archiver.kernel.org; Tue, 18 May 2021 05:28:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57620) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1livp6-00055f-JM for qemu-devel@nongnu.org; Tue, 18 May 2021 05:15:33 -0400 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]:42748) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1livov-00011j-C7 for qemu-devel@nongnu.org; Tue, 18 May 2021 05:15:31 -0400 Received: by mail-wr1-x436.google.com with SMTP id x8so9345052wrq.9 for ; Tue, 18 May 2021 02:15:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=IGgZbb9d6fn4RiL5h44cOddbHHPfM8GnVy6ohfR4kOw=; b=r1R/FLrZoIJ+K3TXh1k5E3oKH+hVcdKbQMiPd3yCTcn/Y9ij5sarwK5fPdjEwZDg/g WybpN0B51VaIMfAeDavg6jssJ5iI9bW0D6NkLkyX/xy/b1/XBpg9JzEwv/nCXahlHbPc 66sg0Io5BsIMDMoH4caB+vB+ZH3ahKFO0iYvkJaO86Q+8fKRXJ8eMYZFAvUcBZr/kIqa P6YZ8R6yvAlXpY9bHcEpkvMbOf0JK0fpYKLmMi6SRQ8+ibuMP+YltTRWJerFzuNFKx1o CmCIJZ22SmJgnMq+NePO++mQ0hOc7ddMw/XawQ2i8TArh/qqGSCZwfr7GpceKC/MV2Fr RxTw== 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=IGgZbb9d6fn4RiL5h44cOddbHHPfM8GnVy6ohfR4kOw=; b=eaoIqrAllphXtgcIR84JNJW5V+sav9WiqgmpvLoRzDQKwWEejmaqJ3daqbxZNOD3Y6 DUlnnOx2KPPdY94iwOIsNYiSLV3VNKAumG/HEVpIbRs47PNltleaM1K0eEf/p/ZRdRVN ZHHAl6MC4VYzKk9iSPBVyE+LZSiNSBiuUlEVn8U0xfL3DYySsSRx/BQoimTv6mkRF1Xg 4cUevuGXYdZAlWn4iizuSGU+427yx/rPATM+anyxP20zTsi0yBxwnSToZw1+3RCLzw8e 17B+BLekTLxl5KKavXPZ3A78iMpllonW0n82v6FUf5b9bArd+C7L0nXNwLQdiGA9x4ox uHLg== X-Gm-Message-State: AOAM531ZR8Ls48onvyRl9YtuFA3wXoo+vKVXT3JW3slsiCIFhGEp9JtU jiZRVFHBgcdQhs6Gz9jy/Na7Ln3xvTQPzw== X-Google-Smtp-Source: ABdhPJyb0xx4uXXEf8eWdnRnqaKqvAaCrr4hvlK7UhmFRsly2H6NDGjPKDCEygSNrIjgfsy8/hgeEw== X-Received: by 2002:a5d:448b:: with SMTP id j11mr5467358wrq.93.1621329318447; Tue, 18 May 2021 02:15:18 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id u16sm2320077wmj.27.2021.05.18.02.15.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 May 2021 02:15:12 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 554F81FFAF; Tue, 18 May 2021 10:07:23 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL v2 25/29] tests/docker: gcc-10 based images for ppc64{, le} tests Date: Tue, 18 May 2021 10:07:16 +0100 Message-Id: <20210518090720.21915-26-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210518090720.21915-1-alex.bennee@linaro.org> References: <20210518090720.21915-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::436; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x436.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=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: Thomas Huth , Matheus Ferst , qemu-devel@nongnu.org, Wainer dos Santos Moschetta , =?utf-8?q?Philippe_Mathi?= =?utf-8?q?eu-Daud=C3=A9?= , Willian Rampazzo , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Matheus Ferst A newer compiler is needed to build tests for Power10 instructions. As done for arm64 on c729a99d2701, a new '-test-cross' image is created for ppc64 and ppc64le. As done on 936fda4d771f, a test for compiler support is added to verify that the toolchain in use has '-mpower10'. Finally, Unused images (docker-power-cross and docker-ppc64-cross) are removed. Signed-off-by: Matheus Ferst Signed-off-by: Alex Bennée Message-Id: <20210423205757.1752480-2-matheus.ferst@eldorado.org.br> Message-Id: <20210512102051.12134-27-alex.bennee@linaro.org> diff --git a/.gitlab-ci.d/containers.yml b/.gitlab-ci.d/containers.yml index 4ef76d1f54..765408ae27 100644 --- a/.gitlab-ci.d/containers.yml +++ b/.gitlab-ci.d/containers.yml @@ -144,19 +144,12 @@ mipsel-debian-cross-container: variables: NAME: debian-mipsel-cross -powerpc-debian-cross-container: +powerpc-test-cross-container: extends: .container_job_template stage: containers-layer2 - needs: ['amd64-debian10-container'] - variables: - NAME: debian-powerpc-cross - -ppc64-debian-cross-container: - extends: .container_job_template - stage: containers-layer2 - needs: ['amd64-debian10-container'] + needs: ['amd64-debian11-container'] variables: - NAME: debian-ppc64-cross + NAME: debian-powerpc-test-cross ppc64el-debian-cross-container: extends: .container_job_template diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include index 8967ecf118..ff5d732889 100644 --- a/tests/docker/Makefile.include +++ b/tests/docker/Makefile.include @@ -140,8 +140,6 @@ docker-image-debian-mips-cross: docker-image-debian10 docker-image-debian-mips64-cross: docker-image-debian10 docker-image-debian-mips64el-cross: docker-image-debian10 docker-image-debian-mipsel-cross: docker-image-debian10 -docker-image-debian-powerpc-cross: docker-image-debian10 -docker-image-debian-ppc64-cross: docker-image-debian10 docker-image-debian-ppc64el-cross: docker-image-debian10 docker-image-debian-riscv64-cross: docker-image-debian10 docker-image-debian-s390x-cross: docker-image-debian10 @@ -174,13 +172,14 @@ docker-image-debian-hexagon-cross: $(DOCKER_FILES_DIR)/debian-hexagon-cross.dock docker-image-debian-tricore-cross: docker-image-debian10 docker-image-debian-all-test-cross: docker-image-debian10 docker-image-debian-arm64-test-cross: docker-image-debian11 +docker-image-debian-powerpc-test-cross: docker-image-debian11 # These images may be good enough for building tests but not for test builds DOCKER_PARTIAL_IMAGES += debian-alpha-cross DOCKER_PARTIAL_IMAGES += debian-arm64-test-cross +DOCKER_PARTIAL_IMAGES += debian-powerpc-test-cross DOCKER_PARTIAL_IMAGES += debian-hppa-cross DOCKER_PARTIAL_IMAGES += debian-m68k-cross debian-mips64-cross -DOCKER_PARTIAL_IMAGES += debian-powerpc-cross debian-ppc64-cross DOCKER_PARTIAL_IMAGES += debian-riscv64-cross DOCKER_PARTIAL_IMAGES += debian-sh4-cross debian-sparc64-cross DOCKER_PARTIAL_IMAGES += debian-tricore-cross diff --git a/tests/docker/dockerfiles/debian-powerpc-cross.docker b/tests/docker/dockerfiles/debian-powerpc-cross.docker deleted file mode 100644 index 07e1789650..0000000000 --- a/tests/docker/dockerfiles/debian-powerpc-cross.docker +++ /dev/null @@ -1,12 +0,0 @@ -# -# Docker powerpc cross-compiler target -# -# This docker target builds on the debian Buster base image. -# -FROM qemu/debian10 - -RUN apt update && \ - DEBIAN_FRONTEND=noninteractive eatmydata \ - apt install -y --no-install-recommends \ - gcc-powerpc-linux-gnu \ - libc6-dev-powerpc-cross diff --git a/tests/docker/dockerfiles/debian-powerpc-test-cross.docker b/tests/docker/dockerfiles/debian-powerpc-test-cross.docker new file mode 100644 index 0000000000..36b336f709 --- /dev/null +++ b/tests/docker/dockerfiles/debian-powerpc-test-cross.docker @@ -0,0 +1,17 @@ +# +# Docker powerpc/ppc64/ppc64le cross-compiler target +# +# This docker target builds on the debian Bullseye base image. +# +FROM qemu/debian11 + +RUN apt update && \ + DEBIAN_FRONTEND=noninteractive eatmydata \ + apt install -y --no-install-recommends \ + gcc-powerpc-linux-gnu \ + libc6-dev-powerpc-cross \ + gcc-10-powerpc64-linux-gnu \ + libc6-dev-ppc64-cross \ + gcc-10-powerpc64le-linux-gnu \ + libc6-dev-ppc64el-cross + diff --git a/tests/docker/dockerfiles/debian-ppc64-cross.docker b/tests/docker/dockerfiles/debian-ppc64-cross.docker deleted file mode 100644 index 8efe68874e..0000000000 --- a/tests/docker/dockerfiles/debian-ppc64-cross.docker +++ /dev/null @@ -1,11 +0,0 @@ -# -# Docker ppc64 cross-compiler target -# -# This docker target builds on the debian Buster base image. -FROM qemu/debian10 - -RUN apt update && \ - DEBIAN_FRONTEND=noninteractive eatmydata \ - apt install -y --no-install-recommends \ - gcc-powerpc64-linux-gnu \ - libc6-dev-ppc64-cross diff --git a/tests/tcg/configure.sh b/tests/tcg/configure.sh index 11009fe433..6627318adf 100755 --- a/tests/tcg/configure.sh +++ b/tests/tcg/configure.sh @@ -147,18 +147,14 @@ for target in $target_list; do ;; ppc-*|ppc64abi32-*) container_hosts=x86_64 - container_image=debian-powerpc-cross - container_cross_cc=powerpc-linux-gnu-gcc + container_image=debian-powerpc-test-cross + container_cross_cc=powerpc-linux-gnu-gcc-10 ;; - ppc64-*) + ppc64-*|ppc64le-*) container_hosts=x86_64 - container_image=debian-ppc64-cross - container_cross_cc=powerpc64-linux-gnu-gcc - ;; - ppc64le-*) - container_hosts=x86_64 - container_image=debian-ppc64el-cross - container_cross_cc=powerpc64le-linux-gnu-gcc + container_image=debian-powerpc-test-cross + container_cross_cc=${target%%-*}-linux-gnu-gcc-10 + container_cross_cc=powerpc${container_cross_cc#ppc} ;; riscv64-*) container_hosts=x86_64 @@ -272,6 +268,10 @@ for target in $target_list; do -mpower8-vector -o $TMPE $TMPC; then echo "CROSS_CC_HAS_POWER8_VECTOR=y" >> $config_target_mak fi + if do_compiler "$target_compiler" $target_compiler_cflags \ + -mpower10 -o $TMPE $TMPC; then + echo "CROSS_CC_HAS_POWER10=y" >> $config_target_mak + fi ;; i386-linux-user) if do_compiler "$target_compiler" $target_compiler_cflags \ From patchwork Tue May 18 09:07:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 12264309 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4C6C6C433ED for ; Tue, 18 May 2021 09:23:03 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 04F696112F for ; Tue, 18 May 2021 09:23:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 04F696112F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:42400 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1livwM-00006d-5B for qemu-devel@archiver.kernel.org; Tue, 18 May 2021 05:23:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57552) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1livp0-00052x-8l for qemu-devel@nongnu.org; Tue, 18 May 2021 05:15:27 -0400 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]:34376) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1livop-0000zx-VL for qemu-devel@nongnu.org; Tue, 18 May 2021 05:15:22 -0400 Received: by mail-wr1-x435.google.com with SMTP id r12so9380152wrp.1 for ; Tue, 18 May 2021 02:15:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=yfPAdLfj0mM5DpZOWJa8eVcwUNU1MGcAXsLejhIC64A=; b=bBMw+xDT3Ah6nYcYB/dMvR+UQ/MD2FTO+cQNAE/91ZROQ2MZy3CxfeJWA+onRykNjB hw6Wr7sFCnxg8H9gr/KsPsiZgQR/x1Xkzx2LbBWeb7jEv6gidxtTyGMpxQZ4FmkYfqCJ w0bjGErqfGg36bdNZBHOIuj9MgSWzb6JHpFggrzi6zc+WEIkclJrRmtPzvB68Tik9bnD IXfLk5tBXHWxvFdhqc1afjjOgsOJsiu4YNOtoT+7Zhq2G2gZivaUtRlMhoRaGB8gdKJq nKios1Ur066HLWrhFeIsY3LHBSC45WrR288jpuKBKk/oe+clS2RaowG/44V+WE5eD4L1 Pm2A== 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=yfPAdLfj0mM5DpZOWJa8eVcwUNU1MGcAXsLejhIC64A=; b=TDWO0y89mADE5UFZ2ndhtnosuxUUaNHS+2Y4rV6RfW4cKCDsZxd6xsoJChy05V0ogH tKe+2Bm9QluoW2Q4s0JKsaf4mDe7wDNERUW+Cr89IHn6xQ/gZXc7BSPEo05GC2EnP3+T VGIT3Z847H7q5ykFznpImj2fRS/CYdo5OQhLWb2ubBcw3KFDCRL+51MYhG6+KszCTBeR X9Kc7ckxoLU3HeuhpHYKl4jzjP1Km4ZP8InA0N2yC3h1clvrJRDGiAobPtEjzsDzOUjm 3cOH1WyGMlUlZ3CsNq+LP7nc+iYi49pn9s8YW7vxvazc0cvtEnp0fHY1Njr1YNXdLFKl KV1w== X-Gm-Message-State: AOAM532lqPW1NyJu3bkt3Qu/b+qYG5cYmC/dc4qO4N599OP1N1sDTKJH b52+aUohXW1AGoegNqun0Q/NLl9/PB078w== X-Google-Smtp-Source: ABdhPJynagX1hiNcmIySEhWIVbT3kInL9iZdLxPjz2i1S5cT+xT2D4jRExuoDdERhRLvmpQBuM+AVw== X-Received: by 2002:adf:f50f:: with SMTP id q15mr5378833wro.279.1621329314027; Tue, 18 May 2021 02:15:14 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id p10sm19063326wrr.58.2021.05.18.02.15.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 May 2021 02:15:12 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 6F82D1FFB1; Tue, 18 May 2021 10:07:23 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL v2 26/29] tests/tcg/ppc64le: tests for brh/brw/brd Date: Tue, 18 May 2021 10:07:17 +0100 Message-Id: <20210518090720.21915-27-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210518090720.21915-1-alex.bennee@linaro.org> References: <20210518090720.21915-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::435; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x435.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Matheus Ferst , qemu-devel@nongnu.org, Fabiano Rosas Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Matheus Ferst Tests for Byte-Reverse Halfword, Word and Doubleword Signed-off-by: Matheus Ferst Tested-by: Fabiano Rosas [AJB: tweak to make rules for skip/plugins] Signed-off-by: Alex Bennée 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_reverse.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 = 0xFEDCBA9876543210; + asm("brh %0, %0" : "+r"(var)); + assert(var == 0xDCFE98BA54761032); + + var = 0xFEDCBA9876543210; + asm("brw %0, %0" : "+r"(var)); + assert(var == 0x98BADCFE10325476); + + var = 0xFEDCBA9876543210; + asm("brd %0, %0" : "+r"(var)); + assert(var == 0x1032547698BADCFE); + + return 0; +} + diff --git a/tests/tcg/ppc64/Makefile.target b/tests/tcg/ppc64/Makefile.target index 0c6a4585fc..a6a4ddaeca 100644 --- a/tests/tcg/ppc64/Makefile.target +++ b/tests/tcg/ppc64/Makefile.target @@ -10,4 +10,17 @@ PPC64_TESTS=bcdsub endif bcdsub: CFLAGS += -mpower8-vector +PPC64_TESTS += byte_reverse +ifneq ($(DOCKER_IMAGE)$(CROSS_CC_HAS_POWER10),) +run-byte_reverse: QEMU_OPTS+=-cpu POWER10 +run-plugin-byte_reverse-with-%: QEMU_OPTS+=-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 += $(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=bcdsub endif bcdsub: CFLAGS += -mpower8-vector +PPC64LE_TESTS += byte_reverse +ifneq ($(DOCKER_IMAGE)$(CROSS_CC_HAS_POWER10),) +run-byte_reverse: QEMU_OPTS+=-cpu POWER10 +run-plugin-byte_reverse-with-%: QEMU_OPTS+=-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 += $(PPC64LE_TESTS) From patchwork Tue May 18 09:07:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 12264353 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9DC48C433B4 for ; Tue, 18 May 2021 09:38:38 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 55953610A8 for ; Tue, 18 May 2021 09:38:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 55953610A8 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:58342 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1liwBR-0004Zc-EN for qemu-devel@archiver.kernel.org; Tue, 18 May 2021 05:38:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57666) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1livpE-00058N-2G for qemu-devel@nongnu.org; Tue, 18 May 2021 05:15:40 -0400 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]:42716) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1livp2-00014H-AT for qemu-devel@nongnu.org; Tue, 18 May 2021 05:15:39 -0400 Received: by mail-wm1-x32c.google.com with SMTP id f75-20020a1c1f4e0000b0290171001e7329so1053865wmf.1 for ; Tue, 18 May 2021 02:15:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=D5Inb5L/9oK+/2nTuHYzlDm1Dd5BgSxGl3J/R/np3c0=; b=yThcQAjHPXzskrS/7h8G3qn4/jTFlwwzQAMB9Tw3YFMSZxXIGowYlCEUxe9W/NZxww IdHfkM3WeJUcnxbEgbQ1qeFC8XJPyxAsHmpJy6lrTV/ITL4BLXbQ0iWZIc5DiQuXIGU/ Wy3eTnUS6SnDW+EcJguq98/he2fAqlChypLQSaAzZ44qRRTfPDAgre+LNdUIWaawxdEm 5cfqo1pl4zIvEhIdDs1RP27c7HwTunJZRVCo0iWVfDprozAYBZcFHZmVOxJ1Ew9NvNSA N6A1EedvcOjiyzwbfneuk7o28HWhDi+l/5QuHJSTGIiFdKQIIPCLEiMl5dzYAy5gbzJm Balg== 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=D5Inb5L/9oK+/2nTuHYzlDm1Dd5BgSxGl3J/R/np3c0=; b=jy+krfAWMFXl5T8ElpubKa1jx/1y6oh09k8I+axrbJVCgfzg4xyuJSryNNypJFDJFu WXapOQsctiYUrImV4H8cnIVlMaVQErT72Q+I1UBdAVbFW02M4o6FBIS+QGf0rVLYCZdv z4w8cGW54DeI6ak3EcTIOrvrP/mrmgrbS1d+WXl8mqpSrvj1FhUOE5ZItI1ExrknmZ6j Ihhh+E2Sz03+xfehP7fy8d19iwaqekWGCIeZz/ACZra5sVNhMCztOj3mrzpeAHTH39iG Lz+YXmBsqKARJey3wGv7BeRiMuxsiGxaFiSsCP2euW+93QN6Uro4pGv2se/vLfUZ/R46 pG8g== X-Gm-Message-State: AOAM532rP8MY3Tv3FKO63iOaI1woyWsLUyOzCIPegATUX26hZEAJiH7+ eUXos324EGm7+cY7n/8Nu1t6UA== X-Google-Smtp-Source: ABdhPJwyBye6Z5JlL9/bC3d9uS6jb3q8rQE6wWmZa8OgMd1e7H+VzdKCp0FllMCGc6GJdYM6SdBBhw== X-Received: by 2002:a1c:638b:: with SMTP id x133mr3854378wmb.182.1621329325818; Tue, 18 May 2021 02:15:25 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id a16sm8843047wrw.62.2021.05.18.02.15.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 May 2021 02:15:18 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 84B761FFB3; Tue, 18 May 2021 10:07:23 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL v2 27/29] tests/tcg: fix missing return Date: Tue, 18 May 2021 10:07:18 +0100 Message-Id: <20210518090720.21915-28-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210518090720.21915-1-alex.bennee@linaro.org> References: <20210518090720.21915-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" This was picked up when clang built the test. Signed-off-by: Alex Bennée Message-Id: <20210512102051.12134-30-alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé diff --git a/tests/tcg/multiarch/system/memory.c b/tests/tcg/multiarch/system/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 = do_unsigned_reads(i); } + return ok; #else fn(0); return do_unsigned_reads(0); From patchwork Tue May 18 09:07:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 12264323 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 697FBC433ED for ; Tue, 18 May 2021 09:31:22 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C812361073 for ; Tue, 18 May 2021 09:31:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C812361073 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:37138 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1liw4O-00074t-Qk for qemu-devel@archiver.kernel.org; Tue, 18 May 2021 05:31:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57600) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1livp2-00054G-Qi for qemu-devel@nongnu.org; Tue, 18 May 2021 05:15:29 -0400 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]:46906) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1livor-00010l-7g for qemu-devel@nongnu.org; Tue, 18 May 2021 05:15:27 -0400 Received: by mail-wm1-x32c.google.com with SMTP id h3-20020a05600c3503b0290176f13c7715so1050236wmq.5 for ; Tue, 18 May 2021 02:15:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Mn6SaZ8plyB0/DLAD6T6WLKOaxQYkXa/tSd0uVFivYE=; b=T/NAnNMQMtJuJqPGnOvZM9pMZP6qu16G/dwEQ6BUVu1nR3Vrr0ypq/9VjnUL7AKKRS ZExWwOuiN7+JpcxMdlODVM8IKjJCuKUCqQpySj4fS27i/LAE7tLwUkROWtBoyDkyf7hH 1l0WPsib1xqPSo1BjzcJ9dr33Pjg0S3T09zNPzIleq1HPBD2CU5H56d0GHOTgDuMZ9ki /yivzFVUwjvYOwg2dkGrLiVM7zdaM2cJCHPViyp0lAFx2chLC39SNcHyM/8ZANlaA1Hy XHnc9REZiP61BczUikhk9UJz1aioos5O6SuO6ccVqKYdG2uiQSBrOt8Wq8HepmiX4us7 CpVw== 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=Mn6SaZ8plyB0/DLAD6T6WLKOaxQYkXa/tSd0uVFivYE=; b=nlRHgJ2fIzI8LRwqy+86V/DnjDtCCL9dHmUjoO2ar3EACig99zMspxKSW/XqP5p0xl QdtxDfjJSCFhd6JMWiKeZe2EjRj56J8CpUuBLxSkOgo2KMHYI0EgVjHUKtJX0gsF+Eo+ a6UJbvuZZbF/Vz6W34sdO70J8ltwRlxRt1s35+R8nYqOG06Jz8IT+08Nlv/dDlpkA9cU WIG4cV4mX4WjyXpMgmaL8Cv39TUIyssjywX3AYvYHwT3cljyBJbxJUWKrSzch02xQdsL 02bkkdQLtfYNOS3esmjx/6BH5i8oJ4GKbhQAUJ5rIxlJsUUinqyssb7NIQolSXFYDtrF zcGw== X-Gm-Message-State: AOAM531JtT/ETXwA8b/SO3YyKRGfsxJN1Ygo32+lHgX2/RSoey+a4Wdy cvVHjPJGtPamwTAs6A5s3wElvw== X-Google-Smtp-Source: ABdhPJyDcm2w1Jb/lQzFxY60RBRkAF5LXE/U/X7Sbm3EDAkakxJyvqYM690GIdwDIfkzbk++0tCRIw== X-Received: by 2002:a7b:c093:: with SMTP id r19mr4319577wmh.35.1621329315938; Tue, 18 May 2021 02:15:15 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id f188sm1977697wmf.24.2021.05.18.02.15.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 May 2021 02:15:12 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 98E431FFB4; Tue, 18 May 2021 10:07:23 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL v2 28/29] tests/tcg: don't allow clang as a cross compiler Date: Tue, 18 May 2021 10:07:19 +0100 Message-Id: <20210518090720.21915-29-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210518090720.21915-1-alex.bennee@linaro.org> References: <20210518090720.21915-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=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: =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" 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ée Message-Id: <20210512102051.12134-31-alex.bennee@linaro.org> diff --git a/tests/tcg/configure.sh b/tests/tcg/configure.sh index 6627318adf..ed6492ce59 100755 --- a/tests/tcg/configure.sh +++ b/tests/tcg/configure.sh @@ -82,6 +82,9 @@ for target in $target_list; do container_cross_as= container_cross_ld= + # suppress clang + supress_clang= + case $target in aarch64-*) # We don't have any bigendian build tools so we only use this for AArch64 @@ -119,6 +122,7 @@ for target in $target_list; do container_hosts=x86_64 container_image=fedora-i386-cross container_cross_cc=gcc + supress_clang=yes ;; m68k-*) container_hosts=x86_64 @@ -186,6 +190,7 @@ for target in $target_list; do container_hosts="aarch64 ppc64el x86_64" container_image=debian-amd64-cross container_cross_cc=x86_64-linux-gnu-gcc + supress_clang=yes ;; xtensa*-softmmu) container_hosts=x86_64 @@ -200,6 +205,7 @@ for target in $target_list; do echo "# Automatically generated by configure - do not modify" > $config_target_mak echo "TARGET_NAME=$arch" >> $config_target_mak + echo "target=$target" >> $config_target_mak case $target in *-linux-user | *-bsd-user) echo "CONFIG_USER_ONLY=y" >> $config_target_mak @@ -219,21 +225,26 @@ for target in $target_list; do if eval test "x\${cross_cc_$arch}" != xyes; then eval "target_compiler=\${cross_cc_$arch}" - if has $target_compiler; then - write_c_skeleton - if ! do_compiler "$target_compiler" $target_compiler_cflags \ - -o $TMPE $TMPC -static ; then - # For host systems we might get away with building without -static - if do_compiler "$target_compiler" $target_compiler_cflags \ - -o $TMPE $TMPC ; then + if has "$target_compiler"; then + if test "$supress_clang" = yes && + $target_compiler --version | grep -qi "clang"; then + got_cross_cc=no + 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=yes + echo "CROSS_CC_GUEST_STATIC=y" >> $config_target_mak + echo "CROSS_CC_GUEST=$target_compiler" >> $config_target_mak + fi + else got_cross_cc=yes echo "CROSS_CC_GUEST_STATIC=y" >> $config_target_mak echo "CROSS_CC_GUEST=$target_compiler" >> $config_target_mak fi - else - got_cross_cc=yes - echo "CROSS_CC_GUEST_STATIC=y" >> $config_target_mak - echo "CROSS_CC_GUEST=$target_compiler" >> $config_target_mak fi fi fi From patchwork Tue May 18 09:07:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 12264325 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E0F94C433ED for ; Tue, 18 May 2021 09:31:29 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 959C061042 for ; Tue, 18 May 2021 09:31:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 959C061042 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:37848 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1liw4W-0007Xx-Ju for qemu-devel@archiver.kernel.org; Tue, 18 May 2021 05:31:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57638) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1livp9-00056w-GK for qemu-devel@nongnu.org; Tue, 18 May 2021 05:15:35 -0400 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]:55852) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1livoz-00013i-NW for qemu-devel@nongnu.org; Tue, 18 May 2021 05:15:32 -0400 Received: by mail-wm1-x329.google.com with SMTP id b7so4403240wmh.5 for ; Tue, 18 May 2021 02:15:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ZOEe6cez6SEgngPy3li6Y4fZAWFWB0XRBjyTyqxtFds=; b=DOx608YGH1geHMpq1CWoN8aclQUGU02rm6CZbGHRD+d4Fu/6TyNZbDHCAp4yG9GxFf UU6j7xob04VeTAZSFVcvvspEhVjMSvIwp0iXbP6517W2mGWaSM1wsaMxGSK4ADey1tKY 6oECEdfAsGi/+T8XV2BSRbG9EEY6GbBzDO0tWFcDkw5WktnwO3IBKzbkmXP01YSakUxP rIKcwGK9CYyF1YCKSCm9OYGbRNmY4N3U+QKCTCMY/i6GP3V55gCxtkXF2JtRXQ5lCx8g nNxJuPWgf1Hb8/s1nRh+Bx+Ki5MHctkayp6xQiK3oUcqpT9TXhyfMx2Mk93R76v1BeMZ ylpQ== 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=ZOEe6cez6SEgngPy3li6Y4fZAWFWB0XRBjyTyqxtFds=; b=IhBjlPqyrlEqmRgmA2mDD7+1+Eojof/aJGaYkQPJpG1NIe/nXDr8OG3q75TaFRcnMt hquvDwfbs+QkGz2I0dvQXjKt1ksm34LC2+qDAkl0Bk0nd1uf9OZ4QVTnZw1+2pXSZJNk HGFZhTJfjoelPercGM/VhmJGTYblQQQZNTmByvF+8CWvWT6pAQnxq+/apu7BdrpNclDa nRkJznBGYUe59DnwnfzZ1ES8csUpcHxREyKHpT21aLM1pfq42symj8uL3tSodjAAoj0V omONaQh4o9S0+Ky6STCws/doiD+ycvyGwwtjlnKZq19yL1bMKZxuMAJ5WLTW2hEwIMXl Pz1A== X-Gm-Message-State: AOAM533W3sox2OjtCDmtxai9f5Shf0jMcbb896so1l+s2t/mqzVNoBLZ Vda3NHNAS2bhlScFQoCuMAkU8A== X-Google-Smtp-Source: ABdhPJzzQl4ixKj58/6a4YLZchvsQz2t6hVA2kIU74JcH+6/uDDmnwvI9umd+ezQh4lC/C0k0dZI6A== X-Received: by 2002:a1c:4482:: with SMTP id r124mr3827256wma.42.1621329322369; Tue, 18 May 2021 02:15:22 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id r2sm21822189wrv.39.2021.05.18.02.15.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 May 2021 02:15:18 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id AD8951FF87; Tue, 18 May 2021 10:07:23 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL v2 29/29] configure: use cc, not host_cc to set cross_cc for build arch Date: Tue, 18 May 2021 10:07:20 +0100 Message-Id: <20210518090720.21915-30-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210518090720.21915-1-alex.bennee@linaro.org> References: <20210518090720.21915-1-alex.bennee@linaro.org> MIME-Version: 1.0 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: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?A?= =?utf-8?q?lex_Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" 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. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée 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 -eval "cross_cc_${cpu}=\$host_cc" +eval "cross_cc_${cpu}=\$cc" cross_cc_vars="$cross_cc_vars cross_cc_${cpu}" QEMU_CFLAGS="$CPU_CFLAGS $QEMU_CFLAGS"