From patchwork Tue Mar 1 09:46:58 2022 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: 547240 Delivered-To: patch@linaro.org Received: by 2002:ac0:9f50:0:0:0:0:0 with SMTP id l16csp3517786imf; Tue, 1 Mar 2022 01:50:59 -0800 (PST) X-Google-Smtp-Source: ABdhPJz4M2ncylVdohuNyXAIIz4JPVgt1hebOglim0c8qFjBU9tvvWsJDXGt3Mn34hzSW8pBlvrV X-Received: by 2002:a37:688d:0:b0:47c:c739:d14 with SMTP id d135-20020a37688d000000b0047cc7390d14mr13373455qkc.781.1646128259414; Tue, 01 Mar 2022 01:50:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646128259; cv=none; d=google.com; s=arc-20160816; b=yGIMiqQRj2deinlNW62w0E20a/tgg+dhbmILYyxApFllvGdZZEzz2EtZkFO3dQaarH S9BeFjsYWYRV+h0D7yF4BrnaVBKFgpMFYK4Hd7MUhZOgIjO2CRtgcsW2oyU2QTSbA2Sr RDmEZy/I3eJc8TCWv/xuec2LXE77rv1DvreplMS4I7RQNOG+LBa0gsJkJhkrZnEvzAoM tSXrbyX6hdnIrm1/s6MHHCITlpID6oaijNIaEx292g7nN9Q25hLo6J4jq3hSrFFyToye 5fHFK99nuRcx/ZTa0zaUK0YbZ2l1UbylCM1IIxoZjx5lVecn2VUtkSp1P3y+uFJa2osf nyTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=Oo9DRbZoIDPeCuEDR0VO57zAdlBhs+L621CLCEIHwtk=; b=z5tK94UJ3kqVc/2Z5zSz8vZL7v+BaJAhYPRcNs/X55oUx9ML4sdLl6lQJ+xIvRHKqw zTzeSn9cut0VqMPyh7ORfgISY6g9GGoUGY2fqaayZ4UtbIqSZzU9qj7IFdS649zu1R0V wR5YHe+Lx6Cyu9pOTiRaTSCDpZ22Nv4Yz88fmfklAytp9wnfeWF4q2L10UXgCxuZB0Yu itCtzsocB2KQ9KWBxtNTvUKex953mh7HYrQy8lf6o7h+cVrWItICnPCcOgSbmN2fYHX5 zxwNv5dK2s9kmF0fIgnAl75Jt7LahwmrxuQtkc8I1a23X5rFsYyXesBu0dr7bdUl55Fh 5aPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="Zk/T2sOC"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id bj6-20020a05620a190600b0047bbbc9ab27si4383402qkb.350.2022.03.01.01.50.59 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 01 Mar 2022 01:50:59 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="Zk/T2sOC"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:47300 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nOz9m-0004iz-UE for patch@linaro.org; Tue, 01 Mar 2022 04:50:58 -0500 Received: from eggs.gnu.org ([209.51.188.92]:46162) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nOz6G-00037B-GL for qemu-devel@nongnu.org; Tue, 01 Mar 2022 04:47:21 -0500 Received: from [2a00:1450:4864:20::42c] (port=42619 helo=mail-wr1-x42c.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nOz6E-00073k-Pl for qemu-devel@nongnu.org; Tue, 01 Mar 2022 04:47:20 -0500 Received: by mail-wr1-x42c.google.com with SMTP id d17so19490802wrc.9 for ; Tue, 01 Mar 2022 01:47:18 -0800 (PST) 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=Oo9DRbZoIDPeCuEDR0VO57zAdlBhs+L621CLCEIHwtk=; b=Zk/T2sOCmJeYjBQgaYl7QNnepvHwkPOjWTdH3D3/YYRZDZ/kIeMArU5gLLZkEM5l40 WCmfbOrPZLEJ6AW/usb56+6C9nZPaQV9OtdQfFcuAf4696htt9wjMt0CazpVDF1biQln 71GKaTfy74AwaBtGygDRTltKisThhjxXd0jexFRQXdpVlNbQWXDgNE0LkHiCrV52Em9F MjvnfadcximuS9zqDkeSlwRw4UPJVpzeRKU+Z9BESqC1CZ5ewXi4ASILswgfTQwJktdy eMvnkmRkeXAW0ih+9GBgJg7mRt0IFTvEecMmB1ajDGUENI4OCJa3sIux9+7MYFc7AsA1 U7ug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Oo9DRbZoIDPeCuEDR0VO57zAdlBhs+L621CLCEIHwtk=; b=xunLTl6VXwpYTsKTs1vxNogUgKgJY7fZdGNtNP5d0vRGVQ3476o1+dIeWNVV1ndGhF HQOgeQFqB6BKDcbBZK19S/wuQmA0gJJi981TtMbI/lXk6FYKIMCpE/rViVcG13t14j21 Pr237+krWQ7MkhMkiZGcUacLnqmkq9T/GTxaEh8PByev+i/8ugI+rN93H/U+KCJZI076 IsAxZwPwWlWu6XOp0HNPMZpTCudjdUVazLGWBj2N32ymFfgt/zTDGjX74zRJ8WBwUtRH pxozWQmdnIdXez4Emepa7tRxy6sYIf+rvx0tzoz6A57r/uPu66L84cc8HwKs2twdL2P5 XbIw== X-Gm-Message-State: AOAM532QJ5o2MyMJ9ldGY4Y4FfNCgYh6L3lC0VgstVPd5WYcN2RBjkzt jC2HlEiOGxcRHw2voZnB3odWTg== X-Received: by 2002:adf:d84e:0:b0:1ef:9517:c7da with SMTP id k14-20020adfd84e000000b001ef9517c7damr9546762wrl.588.1646128037123; Tue, 01 Mar 2022 01:47:17 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id g6-20020a05600c4ec600b0037bf934bca3sm2350448wmq.17.2022.03.01.01.47.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Mar 2022 01:47:16 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 612AF1FFB8; Tue, 1 Mar 2022 09:47:15 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 01/18] tests/docker: restore TESTS/IMAGES filtering Date: Tue, 1 Mar 2022 09:46:58 +0000 Message-Id: <20220301094715.550871-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220301094715.550871-1-alex.bennee@linaro.org> References: <20220301094715.550871-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::42c (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42c.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 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, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Huth , Beraldo Leal , Richard Henderson , qemu-devel@nongnu.org, Wainer dos Santos Moschetta , =?utf-8?q?Philippe_Mathi?= =?utf-8?q?eu-Daud=C3=A9?= , Alex Williamson , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" This was broken in the re-factor: e86c9a64f4 ("tests/docker/Makefile.include: add a generic docker-run target") Rather than unwind the changes just apply the filters to the total set of available images and tests. That way we don't inadvertently build images only not to use them later. Signed-off-by: Alex Bennée Reported-by: Alex Williamson Reviewed-by: Richard Henderson Message-Id: <20220225172021.3493923-2-alex.bennee@linaro.org> diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include index f1a0c5db7a..0ec59b2193 100644 --- a/tests/docker/Makefile.include +++ b/tests/docker/Makefile.include @@ -8,13 +8,19 @@ COMMA := , HOST_ARCH = $(if $(ARCH),$(ARCH),$(shell uname -m)) +# These variables can be set by the user to limit the set of docker +# images and tests to a more restricted subset +TESTS ?= % +IMAGES ?= % + DOCKER_SUFFIX := .docker DOCKER_FILES_DIR := $(SRC_PATH)/tests/docker/dockerfiles # we don't run tests on intermediate images (used as base by another image) DOCKER_PARTIAL_IMAGES := debian10 debian11 # we don't directly build virtual images (they are used to build other images) DOCKER_VIRTUAL_IMAGES := debian-bootstrap debian-toolchain empty -DOCKER_IMAGES := $(sort $(filter-out $(DOCKER_VIRTUAL_IMAGES), $(notdir $(basename $(wildcard $(DOCKER_FILES_DIR)/*.docker))))) +__IMAGES := $(sort $(filter-out $(DOCKER_VIRTUAL_IMAGES), $(notdir $(basename $(wildcard $(DOCKER_FILES_DIR)/*.docker))))) +DOCKER_IMAGES := $(if $(IMAGES), $(filter $(IMAGES), $(__IMAGES)), $(__IMAGES)) DOCKER_TARGETS := $(patsubst %,docker-image-%,$(DOCKER_IMAGES)) # Use a global constant ccache directory to speed up repetitive builds DOCKER_CCACHE_DIR := $$HOME/.cache/qemu-docker-ccache @@ -23,16 +29,14 @@ DOCKER_DEFAULT_REGISTRY := registry.gitlab.com/qemu-project/qemu endif DOCKER_REGISTRY := $(if $(REGISTRY),$(REGISTRY),$(DOCKER_DEFAULT_REGISTRY)) -DOCKER_TESTS := $(notdir $(shell \ - find $(SRC_PATH)/tests/docker/ -name 'test-*' -type f)) +__TESTS := $(notdir $(shell \ + find $(SRC_PATH)/tests/docker/ -name 'test-*' -type f)) +DOCKER_TESTS := $(if $(TESTS), $(filter $(TESTS), $(__TESTS)), $(__TESTS)) ENGINE := auto DOCKER_SCRIPT=$(SRC_PATH)/tests/docker/docker.py --engine $(ENGINE) -TESTS ?= % -IMAGES ?= % - CUR_TIME := $(shell date +%Y-%m-%d-%H.%M.%S.$$$$) DOCKER_SRC_COPY := $(BUILD_DIR)/docker-src.$(CUR_TIME) @@ -274,8 +278,8 @@ endif @echo ' TARGET_LIST=a,b,c Override target list in builds.' @echo ' EXTRA_CONFIGURE_OPTS="..."' @echo ' Extra configure options.' - @echo ' IMAGES="a b c ..": Filters which images to build or run.' - @echo ' TESTS="x y z .." Filters which tests to run (for docker-test).' + @echo ' IMAGES="a b c ..": Restrict available images to subset.' + @echo ' TESTS="x y z .." Restrict available tests to subset.' @echo ' J=[0..9]* Overrides the -jN parameter for make commands' @echo ' (default is 1)' @echo ' DEBUG=1 Stop and drop to shell in the created container' From patchwork Tue Mar 1 09:46:59 2022 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: 547243 Delivered-To: patch@linaro.org Received: by 2002:ac0:9f50:0:0:0:0:0 with SMTP id l16csp3520605imf; Tue, 1 Mar 2022 01:56:12 -0800 (PST) X-Google-Smtp-Source: ABdhPJyXsNwSIYFqbKHLI9yl2LRPYEUUPMDAgKzUT8Cdhje2HL36JRs4DnvUqFIadYETE1FByxwi X-Received: by 2002:ad4:4490:0:b0:432:fe1b:6e66 with SMTP id m16-20020ad44490000000b00432fe1b6e66mr8217739qvt.122.1646128572866; Tue, 01 Mar 2022 01:56:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646128572; cv=none; d=google.com; s=arc-20160816; b=E2Yt/ThAIV2jcPcFDJpofcSY3UaGhKUIXbr70YTFAB+MOEerGIZqaa3n1VEGtWGduB VW+/vsvVsgT4RWE2vBgPY/Ur306A0UeoxJL1BPFvZlQWefc2W8f0Akre5tZ/wR3JD24+ 5BMlkcYEricTfDDkxicHHkAzEgEpjUh9Pko3u0KYRIbwfeamGTDvde/iGZI4GbCEkxDS Umsw61ptGaxC3KEJ5xVHjGgMHaCNGQRAmsKLC8WNFaOz9jZXKnLzRVEWFFp2XMdV86V2 ncf+lE2BcnlnMIFqkxfsTt4/EPXdD/O7Z7sJ+xC23h6CwVG4MWHExQOKongtdUP4B/FB /yeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=u81EJy7XqBdByVSMZLAh8b/eyJK89yLSXUUVQK5TqdE=; b=IopIkQ2HOiScM5qmqkjbyVWajnVE/sBk8nJzo5GC8vOm40/DKGqTP7L2iNxe17lt+C 3GHlIkbXKFSlezruKO/00m2HPbjlosRJV3PtaN+bSK6Nhgv2Suts6crHYw/Yf37VFbiZ HBvRH7TGH4i7bqC9VXLA9mOs4+9DvKHnSn+VZLREdC1mMKDArBFcyKTbOKuOrBPZDRIj EMZ52WMOGAoXeNV0LAuKwC1/gPZolf9xKYI1N50reOWEt+rKFQcJxuyQZb7lAILWx9/Y tGIXlNWJF3yo4O/pzbjvZ8X85WtTxetsZOB0gn6/PYN7Nw2/UGVgP1KUXkyVkWPBYp3n ZNuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=i9FK7mMn; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id g4-20020ac870c4000000b002de37cb9806si4175130qtp.96.2022.03.01.01.56.12 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 01 Mar 2022 01:56:12 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=i9FK7mMn; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:59706 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nOzEq-00059Q-E6 for patch@linaro.org; Tue, 01 Mar 2022 04:56:12 -0500 Received: from eggs.gnu.org ([209.51.188.92]:46188) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nOz6J-00037w-1X for qemu-devel@nongnu.org; Tue, 01 Mar 2022 04:47:23 -0500 Received: from [2a00:1450:4864:20::433] (port=42626 helo=mail-wr1-x433.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nOz6H-00075b-Ks for qemu-devel@nongnu.org; Tue, 01 Mar 2022 04:47:22 -0500 Received: by mail-wr1-x433.google.com with SMTP id d17so19491056wrc.9 for ; Tue, 01 Mar 2022 01:47:21 -0800 (PST) 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=u81EJy7XqBdByVSMZLAh8b/eyJK89yLSXUUVQK5TqdE=; b=i9FK7mMnSMttA1UOy+ZrBE8E7Dv7hSIR+YAh6aJ/Qy0MEhlcN8N2rik9syB0cRDrI6 /wFLAtEaBgIhbvR0zcb+KLWjJbVS8QIoTmr6K2OLls2MRuNcfhzgcp9G7ts4ic+BORL8 8ZmE3NSaAt6EeLLCooJbD5iMxFTJZVwUG/R7/cjJgBWQGsYnYIh3yg+OmV5IoX2JO1LQ mh7/NQiwjafQONYS0TfIbIiGYHQ21NxxB8lPZ03uNgL5YXgaKPiZqeeH73k63rse0qYt YK43GiG/qjvwoP8c13L51TF9tokM5cWTadELLH1h9NGzsmw4kUEWBaynOPvjfzQ9HJxf 6XzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=u81EJy7XqBdByVSMZLAh8b/eyJK89yLSXUUVQK5TqdE=; b=l1Mnv5gucqMpgd2Ui1QS6jUh7xd9xiqbfhBnUQn66wGM58SDYmzh8fy7zZPPaur5RA ac9zXrNYgvk6lluI2jUAqh20/nHcl24iGGSvNDBK9xA9b6r2XdHaBkbluxBGLed4ijTP +IeWnlQWk0ZRk9hcsmTUf+RDda3zhCV7MAXGFB4wQB0Uv8bklooAMHuDulNBWdDod7HF Ik605x4T8J6p8xdSbqAa/XorEJvSGFUSU5C/5tkcwZHip8Dd984EOC+Qtya3H6Rp7f7y 9vmtiqauH3VCMBOSlrFHt7+lbcVr7T9q+cbzAw6G9nTehmyjZ7o2ox1etdsHWQ2Qf3yV koJA== X-Gm-Message-State: AOAM530wzNNl2PJ0MWnxwJtbOjMCfQkpmFrIJGENfXYisdsVlEkPsIUN fUcchTHDpg69XCpM1s3W6sclaA== X-Received: by 2002:adf:f04f:0:b0:1ef:7e8b:2c34 with SMTP id t15-20020adff04f000000b001ef7e8b2c34mr12198098wro.325.1646128040362; Tue, 01 Mar 2022 01:47:20 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id p4-20020a1c7404000000b0038140136ff6sm2636310wmc.5.2022.03.01.01.47.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Mar 2022 01:47:16 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 797CF1FFBA; Tue, 1 Mar 2022 09:47:15 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 02/18] tests/docker: add NOUSER for alpine image Date: Tue, 1 Mar 2022 09:46:59 +0000 Message-Id: <20220301094715.550871-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220301094715.550871-1-alex.bennee@linaro.org> References: <20220301094715.550871-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::433 (failed) 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: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 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, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Huth , =?utf-8?q?Daniel_P_=2E_Berrang=C3=A9?= , Beraldo Leal , Richard Henderson , qemu-devel@nongnu.org, Wainer dos Santos Moschetta , =?utf-8?q?Philippe_Mathi?= =?utf-8?q?eu-Daud=C3=A9?= , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" The alpine image doesn't have a standard useradd binary so disable this convenience feature for it. Signed-off-by: Alex Bennée Reviewed-by: Daniel P. Berrangé Reviewed-by: Richard Henderson Message-Id: <20220225172021.3493923-3-alex.bennee@linaro.org> diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include index 0ec59b2193..286f0ac5b5 100644 --- a/tests/docker/Makefile.include +++ b/tests/docker/Makefile.include @@ -158,6 +158,9 @@ docker-image-debian-native: DOCKER_REGISTRY= docker-image-debian10: NOUSER=1 docker-image-debian11: NOUSER=1 +# alpine has no adduser +docker-image-alpine: NOUSER=1 + # # 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 From patchwork Tue Mar 1 09:47:00 2022 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: 547242 Delivered-To: patch@linaro.org Received: by 2002:ac0:9f50:0:0:0:0:0 with SMTP id l16csp3519586imf; Tue, 1 Mar 2022 01:54:11 -0800 (PST) X-Google-Smtp-Source: ABdhPJz5t/SO6WtryaylwU55AqWiAxOb+lNq9EIrekibpO1k0R+TXfw+Llpr28oS6zg8ImBfogxF X-Received: by 2002:a05:6214:da7:b0:433:848:b482 with SMTP id h7-20020a0562140da700b004330848b482mr7649814qvh.17.1646128451604; Tue, 01 Mar 2022 01:54:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646128451; cv=none; d=google.com; s=arc-20160816; b=GOcuutkEcQvGosoArztN6AKcfagiJsx851DZycyhCqbN6kx3U9KSWVBr3WLtzidk5a DJob8/gOak7g9AGXUFYyiqontNBWu0E4XgON6/9wNNCIho8spSmQa7/5xPqbvfliWs86 TO9nwRp41TSlO+5nnwDMBTE87a5ortCuIuKF5flqxLupJMeKiV8D5gVsQKNRnUzQWPgh xMxMWgPqiyWtdQhSGXYcbx8l4m+kbAs0ZaumhpLSeWHWMELzPb8U2NV+pyR3AYhZWkE2 77EO5NjuldRSIfuU0gyFBx4br0HMAwItF4dfVURD5QtBcb3Ru0XbW3WsY5c9U9MKck4S OVDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=Ijoyl5KiCr5Pn3m+N0bQKO6NKwJLDb084jCvcakMpbk=; b=Ur+R7+j0bdCQ5uL8EtyD2ooQ7A77kISQedDaTowyGqq1cUxGPxhrSjwkdQw9vWrLFu y9NibKey5GDUP+EvhiC99PV/fAwfhjlGhsT/MxnQ9WwyRLBOYc7zbU4RDrE2DLc8G5YV 0UF40Y3KdVmtkCXMmkNrheQA43aGLllP4/cgTuUsKyNlI+knopis7VjM7QLxofrX9ZPZ OEXgojmWEftKjNVwkeRtFGt5QipYY2w6NT88LSaOaMsU2ZW0CA++/2RamPO5irp4XHrF T6+W4GUcw27fs4wGT59z0LSdvTmEuI4fRFKFbwtIX5Zfkq6x5ww2g/QCOTFhAmMajRRO UHww== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=IAVYe2V8; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id u12-20020a05622a17cc00b002e00ea5c5ebsi1737540qtk.118.2022.03.01.01.54.11 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 01 Mar 2022 01:54:11 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=IAVYe2V8; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:55586 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nOzCt-0002E3-6R for patch@linaro.org; Tue, 01 Mar 2022 04:54:11 -0500 Received: from eggs.gnu.org ([209.51.188.92]:46202) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nOz6J-00037x-S6 for qemu-devel@nongnu.org; Tue, 01 Mar 2022 04:47:23 -0500 Received: from [2a00:1450:4864:20::434] (port=36588 helo=mail-wr1-x434.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nOz6I-00075h-Be for qemu-devel@nongnu.org; Tue, 01 Mar 2022 04:47:23 -0500 Received: by mail-wr1-x434.google.com with SMTP id r10so19546616wrp.3 for ; Tue, 01 Mar 2022 01:47:21 -0800 (PST) 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=Ijoyl5KiCr5Pn3m+N0bQKO6NKwJLDb084jCvcakMpbk=; b=IAVYe2V8o6fpZ4lBdf2O3oFSyWHG1oXT4vz8GWxDnG/ZxC3D56eAnK1auzNjGgKCZ8 2LBXuceEJz6k7Dzagb4UGLExB+EdI96CjGvi3XZ4oJFKQ0DfJ6QGNdnnVdp4A25Fkfat kWRGZnLCRN/hV9bqAA90m3Kbv3HZ1oKVAgYJD6NbvRByyA/5FdboLw1DSTtDn4OYsuZB vyT+4sXWIbKsZhY6QXDz3HzPnhVpqkKpVavGMyfFjAYbT9ZeTz8ZDJRllfoUg5A374+Y Tr+DBxkeIgGof9LwTWVcd4Y7yFvQvu1au6e0UaLEt5MFgUbaOYDyr/VVoLLsidS/EzzN cANA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Ijoyl5KiCr5Pn3m+N0bQKO6NKwJLDb084jCvcakMpbk=; b=KU5TSXl+AEZd4rTNZn9r8n2UAHDH0pUrogqkysr65JLbajj15ygyWUq3WPa63z6RVo mauhIlVHHZaJub810ynA63LRXElCx76qWpb7A4Jqs2l94gxgIUi1oFoget2vS71C8aEX pHjxbFiw29H2BzbMwYterq2pAVOXiG+tVElNByePMi3K0CqZ9/w9FNv4Wc3xYh+ygop4 bqa+t47EmUG+wYqlzSHseD+ht0wbtxUxlF7ZGBptkbPLrLRCIL80e1kAo9vKxokI0lYT O36SJEV5a8J60hV2yORk6ZWr3z0/oV6sBLEb5muo3U/gj7SZRCeaC8d5MtUmcK1Brf10 Hutw== X-Gm-Message-State: AOAM531tG+hUBKQAc8mPhvIImsuZZpS0QDKUvZTMjYobiPY/rTmCmnQb P2yCYcChSdEoyQOUdu1s4RvOag== X-Received: by 2002:a5d:540a:0:b0:1f0:1ee:d2c5 with SMTP id g10-20020a5d540a000000b001f001eed2c5mr2352634wrv.492.1646128041051; Tue, 01 Mar 2022 01:47:21 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id m6-20020a5d56c6000000b001edb64e69cdsm13099326wrw.15.2022.03.01.01.47.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Mar 2022 01:47:16 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 972AF1FFBB; Tue, 1 Mar 2022 09:47:15 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 03/18] tests/lcitool: update to latest version Date: Tue, 1 Mar 2022 09:47:00 +0000 Message-Id: <20220301094715.550871-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220301094715.550871-1-alex.bennee@linaro.org> References: <20220301094715.550871-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::434 (failed) 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: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 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, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Huth , Beraldo Leal , qemu-devel@nongnu.org, Wainer dos Santos Moschetta , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Alex_B?= =?utf-8?q?enn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" We will need an update shortly for some new images. Signed-off-by: Alex Bennée Message-Id: <20220225172021.3493923-4-alex.bennee@linaro.org> diff --git a/tests/docker/dockerfiles/opensuse-leap.docker b/tests/docker/dockerfiles/opensuse-leap.docker index 1b78d8369a..e1ad9434a3 100644 --- a/tests/docker/dockerfiles/opensuse-leap.docker +++ b/tests/docker/dockerfiles/opensuse-leap.docker @@ -127,8 +127,7 @@ RUN zypper update -y && \ ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/g++ && \ ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/gcc -RUN pip3 install \ - meson==0.56.0 +RUN pip3 install meson==0.56.0 ENV LANG "en_US.UTF-8" ENV MAKE "/usr/bin/make" diff --git a/tests/docker/dockerfiles/ubuntu1804.docker b/tests/docker/dockerfiles/ubuntu1804.docker index 699f2dfc6a..0a622b467c 100644 --- a/tests/docker/dockerfiles/ubuntu1804.docker +++ b/tests/docker/dockerfiles/ubuntu1804.docker @@ -134,8 +134,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/g++ && \ ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/gcc -RUN pip3 install \ - meson==0.56.0 +RUN pip3 install meson==0.56.0 ENV LANG "en_US.UTF-8" ENV MAKE "/usr/bin/make" diff --git a/tests/docker/dockerfiles/ubuntu2004.docker b/tests/docker/dockerfiles/ubuntu2004.docker index 87513125b8..b9d06cb040 100644 --- a/tests/docker/dockerfiles/ubuntu2004.docker +++ b/tests/docker/dockerfiles/ubuntu2004.docker @@ -136,8 +136,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/g++ && \ ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/gcc -RUN pip3 install \ - meson==0.56.0 +RUN pip3 install meson==0.56.0 ENV LANG "en_US.UTF-8" ENV MAKE "/usr/bin/make" diff --git a/tests/lcitool/libvirt-ci b/tests/lcitool/libvirt-ci index 6dd9b6fab1..f83b916d5e 160000 --- a/tests/lcitool/libvirt-ci +++ b/tests/lcitool/libvirt-ci @@ -1 +1 @@ -Subproject commit 6dd9b6fab1fe081b16bc975485d7a02c81ba5fbe +Subproject commit f83b916d5efa4bd33fbf4b7ea41bf6d535cc63fb From patchwork Tue Mar 1 09:47:01 2022 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: 547246 Delivered-To: patch@linaro.org Received: by 2002:ac0:9f50:0:0:0:0:0 with SMTP id l16csp3523354imf; Tue, 1 Mar 2022 02:00:56 -0800 (PST) X-Google-Smtp-Source: ABdhPJxD7U2kCa0epKT1Y+fYJC8MZGcNQflrz3GhYsoRgxT/LZ4+7wriAQXus+qLgdN8lkiA6wlK X-Received: by 2002:a05:620a:38d:b0:5f1:91db:9513 with SMTP id q13-20020a05620a038d00b005f191db9513mr13229094qkm.85.1646128845151; Tue, 01 Mar 2022 02:00:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646128845; cv=none; d=google.com; s=arc-20160816; b=IxysVJGDJWiBCMGyGAeafxAYRn8ygKDCfpS1EtXcA9rsGApdgF0Og4tj6xMi4XICdz cGWeVoDgvRm9ljyRK2ONFGjpIqLLH4wgvPFenOpZfAjmXMavCzJA2hN6kf+1xPq1hLwc NIghRECpknnmoGkreAQVVBXzps+gDulwusDHTNLOeOdsSGIMwcoZjxohvYxhfc7fobQg cAQGVqz1HhT5aRFB8Wiznlnxbz/LJ8mVjk9yUtsNd0lLxhZ1FAtiTOxhY1zwwQb/Lmld 9S+WmQsdZr3ZrOKrH6EvKM0KTD69x3E4UL/P+2Wrfc2aN/GStt9gTuOxqP+z6fdvSd/S liCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=/oXGEdS/mDaQv+pCbxk/Qhm2AHi3rD+atTNlbr0Tx90=; b=jVjL9RgbY1WIAozIsL6gVk9yeXmw33dBVelX/grBy0i0GmUcft/Z6IAYlaq/Y3iZr2 TGpkb0zXuD/JKSBHzzzSMkF+/PQ/fnUVQtYT8thFyXVBshhOQchKA+9dbOsXehzltg1s duUHeTE+X7JWq3kImLkqLZLjwqRLVJylXWbkfPUa+ICIeyeUkdFLxZEIOv9YnLrgxboK MDbjnfseRuC6cuniTXGTQGAu7pgUC+1SRoacB+pCOA9mqZiOWkFvmvQsno8cNSew61lg hmgGNbrj0INveOPL0jEJNzO8C5q32bu1cc/9g/zemcjxbA2gJLY0ZPzqEWJuhQImlaxV apKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=UuBcptOw; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id e7-20020a0562141d0700b0042d057436c2si5269596qvd.130.2022.03.01.02.00.45 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 01 Mar 2022 02:00:45 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=UuBcptOw; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:39688 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nOzJE-0002e4-Lx for patch@linaro.org; Tue, 01 Mar 2022 05:00:44 -0500 Received: from eggs.gnu.org ([209.51.188.92]:46234) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nOz6O-0003EM-79 for qemu-devel@nongnu.org; Tue, 01 Mar 2022 04:47:28 -0500 Received: from [2a00:1450:4864:20::42b] (port=42620 helo=mail-wr1-x42b.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nOz6L-000773-Vc for qemu-devel@nongnu.org; Tue, 01 Mar 2022 04:47:27 -0500 Received: by mail-wr1-x42b.google.com with SMTP id d17so19491388wrc.9 for ; Tue, 01 Mar 2022 01:47:25 -0800 (PST) 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=/oXGEdS/mDaQv+pCbxk/Qhm2AHi3rD+atTNlbr0Tx90=; b=UuBcptOwiRuQxxph+sKhG/wdh3JgThT7fORMA0uq82NhJq8V23fYwn5Dhq0n5aO/y3 NWj68en3Df+yprDY+6pF0jj8L82KQ9VG5mXJBpj4iNO9RKEaHXUSP82xdOkBBLqdIxWw X+xlzTCXO3g7aB7hZq3eY3aayLfxi/iqGTduVltCdJJeO76nvuPgx2RFZoZj3Mn+fQx9 o+oFT10jnVs0Pdct5TdZFHuHx3xxVfeDwhlEdMpxl8Li4oQOr2tesu/LdkcwR+ACbJ+g Mp/SfAJZn6ND1n43ttM05YVQkfPcj+Ok9WdiicqnI/ThWbGYMrBi4puuH0y7Wms48vmv hIBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=/oXGEdS/mDaQv+pCbxk/Qhm2AHi3rD+atTNlbr0Tx90=; b=rsCGnJk4SA5Y6sbFKlBj7uHjzAYktqjECUIF/x6kmkKosR9xpENtgaiA0yDUJsvqqp 7PnBZuBl7JyqLreW5tOOQVnxErCLsg5Y7Qi/nPsQSuKa8299EkP3BWRcx89vrRGGgziZ lw1kVNeYBX2HlTmOj5Uy6+nvdobq9yabxkf+3iJdGADOonvaSYOwgiXuBKKxJbE6uU2H QFN11LBGRJRSrc1CkAIL2bhXbHhfpyJ5mJBhirNBAs++h0FKZMtYcaEQRlY8xGTOqkye 7min0yP7tnXWEwHPIcCYFZ4Tj3liXxTFMx7vsNThAl+xXUrItPgDo+zC5bvKUDkLp3Vv 9Iwg== X-Gm-Message-State: AOAM532aArw2kBlVR2f4aVKIuMz24DD/BFhXlSNLNZlepyPfwOgwQYqt d4cat33YwRaMhzZzTmS4M80IFg== X-Received: by 2002:a5d:678a:0:b0:1ef:8e97:363c with SMTP id v10-20020a5d678a000000b001ef8e97363cmr10782189wru.617.1646128044237; Tue, 01 Mar 2022 01:47:24 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id q17-20020adfea11000000b001e308004bffsm13484399wrm.8.2022.03.01.01.47.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Mar 2022 01:47:22 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id AFD421FFBC; Tue, 1 Mar 2022 09:47:15 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 04/18] tests/docker: update debian-arm64-cross with lcitool Date: Tue, 1 Mar 2022 09:47:01 +0000 Message-Id: <20220301094715.550871-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220301094715.550871-1-alex.bennee@linaro.org> References: <20220301094715.550871-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::42b (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42b.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 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, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Huth , Beraldo Leal , Richard Henderson , qemu-devel@nongnu.org, Wainer dos Santos Moschetta , =?utf-8?q?Philippe_Mathi?= =?utf-8?q?eu-Daud=C3=A9?= , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Using lcitool update debian-arm64-cross to a Debian 11 based system. As a result we can drop debian-arm64-test-cross just for building tests. Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson Message-Id: <20220225172021.3493923-5-alex.bennee@linaro.org> diff --git a/.gitlab-ci.d/container-cross.yml b/.gitlab-ci.d/container-cross.yml index a3b5b90552..ed620620f8 100644 --- a/.gitlab-ci.d/container-cross.yml +++ b/.gitlab-ci.d/container-cross.yml @@ -21,18 +21,10 @@ amd64-debian-user-cross-container: arm64-debian-cross-container: extends: .container_job_template - stage: containers-layer2 - needs: ['amd64-debian10-container'] + stage: containers variables: NAME: debian-arm64-cross -arm64-test-debian-cross-container: - extends: .container_job_template - stage: containers-layer2 - needs: ['amd64-debian11-container'] - variables: - NAME: debian-arm64-test-cross - armel-debian-cross-container: extends: .container_job_template stage: containers-layer2 diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include index 286f0ac5b5..eeee1e6bdf 100644 --- a/tests/docker/Makefile.include +++ b/tests/docker/Makefile.include @@ -137,7 +137,6 @@ DOCKER_PARTIAL_IMAGES += fedora endif docker-image-debian-alpha-cross: docker-image-debian10 -docker-image-debian-arm64-cross: docker-image-debian10 docker-image-debian-armel-cross: docker-image-debian10 docker-image-debian-armhf-cross: docker-image-debian10 docker-image-debian-hppa-cross: docker-image-debian10 @@ -213,14 +212,12 @@ docker-image-debian-nios2-cross: $(DOCKER_FILES_DIR)/debian-toolchain.docker \ # Specialist build images, sometimes very limited tools 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-microblaze-cross: docker-image-debian10 docker-image-debian-nios2-cross: docker-image-debian10 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 diff --git a/tests/docker/dockerfiles/debian-arm64-cross.docker b/tests/docker/dockerfiles/debian-arm64-cross.docker index 166e24df13..589510a7be 100644 --- a/tests/docker/dockerfiles/debian-arm64-cross.docker +++ b/tests/docker/dockerfiles/debian-arm64-cross.docker @@ -1,32 +1,166 @@ +# THIS FILE WAS AUTO-GENERATED # -# Docker arm64 cross-compiler target +# $ lcitool dockerfile --layers all --cross aarch64 debian-11 qemu # -# This docker target builds on the debian Buster base image. -# -FROM qemu/debian10 +# https://gitlab.com/libvirt/libvirt-ci -# Add the foreign architecture we want and install dependencies -RUN dpkg --add-architecture arm64 -RUN apt update && \ - DEBIAN_FRONTEND=noninteractive eatmydata \ - apt install -y --no-install-recommends \ - crossbuild-essential-arm64 -RUN apt update && \ - DEBIAN_FRONTEND=noninteractive eatmydata \ - apt build-dep -yy -a arm64 --arch-only qemu +FROM docker.io/library/debian:11-slim -# Specify the cross prefix for this image (see tests/docker/common.rc) -ENV QEMU_CONFIGURE_OPTS --cross-prefix=aarch64-linux-gnu- -ENV DEF_TARGET_LIST aarch64-softmmu,aarch64-linux-user +RUN export DEBIAN_FRONTEND=noninteractive && \ + apt-get update && \ + apt-get install -y eatmydata && \ + eatmydata apt-get dist-upgrade -y && \ + eatmydata apt-get install --no-install-recommends -y \ + bash \ + bc \ + bsdextrautils \ + bzip2 \ + ca-certificates \ + ccache \ + dbus \ + debianutils \ + diffutils \ + exuberant-ctags \ + findutils \ + gcovr \ + genisoimage \ + gettext \ + git \ + hostname \ + libpcre2-dev \ + libspice-protocol-dev \ + libtest-harness-perl \ + llvm \ + locales \ + make \ + meson \ + ncat \ + ninja-build \ + openssh-client \ + perl-base \ + pkgconf \ + python3 \ + python3-numpy \ + python3-opencv \ + python3-pillow \ + python3-pip \ + python3-sphinx \ + python3-sphinx-rtd-theme \ + python3-venv \ + python3-yaml \ + rpm2cpio \ + sed \ + sparse \ + tar \ + tesseract-ocr \ + tesseract-ocr-eng \ + texinfo && \ + eatmydata apt-get autoremove -y && \ + eatmydata apt-get autoclean -y && \ + sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen && \ + dpkg-reconfigure locales -RUN apt update && \ - DEBIAN_FRONTEND=noninteractive eatmydata \ - apt install -y --no-install-recommends \ - libbz2-dev:arm64 \ - liblzo2-dev:arm64 \ - librdmacm-dev:arm64 \ - libsnappy-dev:arm64 \ - libxen-dev:arm64 +ENV LANG "en_US.UTF-8" +ENV MAKE "/usr/bin/make" +ENV NINJA "/usr/bin/ninja" +ENV PYTHON "/usr/bin/python3" +ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers" -# nettle -ENV QEMU_CONFIGURE_OPTS $QEMU_CONFIGURE_OPTS --enable-nettle +RUN export DEBIAN_FRONTEND=noninteractive && \ + dpkg --add-architecture arm64 && \ + eatmydata apt-get update && \ + eatmydata apt-get dist-upgrade -y && \ + eatmydata apt-get install --no-install-recommends -y dpkg-dev && \ + eatmydata apt-get install --no-install-recommends -y \ + g++-aarch64-linux-gnu \ + gcc-aarch64-linux-gnu \ + libaio-dev:arm64 \ + libasan5:arm64 \ + libasound2-dev:arm64 \ + libattr1-dev:arm64 \ + libbpf-dev:arm64 \ + libbrlapi-dev:arm64 \ + libbz2-dev:arm64 \ + libc6-dev:arm64 \ + libcacard-dev:arm64 \ + libcap-ng-dev:arm64 \ + libcapstone-dev:arm64 \ + libcurl4-gnutls-dev:arm64 \ + libdaxctl-dev:arm64 \ + libdrm-dev:arm64 \ + libepoxy-dev:arm64 \ + libfdt-dev:arm64 \ + libffi-dev:arm64 \ + libfuse3-dev:arm64 \ + libgbm-dev:arm64 \ + libgcrypt20-dev:arm64 \ + libglib2.0-dev:arm64 \ + libglusterfs-dev:arm64 \ + libgnutls28-dev:arm64 \ + libgtk-3-dev:arm64 \ + libibumad-dev:arm64 \ + libibverbs-dev:arm64 \ + libiscsi-dev:arm64 \ + libjemalloc-dev:arm64 \ + libjpeg62-turbo-dev:arm64 \ + liblttng-ust-dev:arm64 \ + liblzo2-dev:arm64 \ + libncursesw5-dev:arm64 \ + libnfs-dev:arm64 \ + libnuma-dev:arm64 \ + libpam0g-dev:arm64 \ + libpixman-1-dev:arm64 \ + libpng-dev:arm64 \ + libpulse-dev:arm64 \ + librbd-dev:arm64 \ + librdmacm-dev:arm64 \ + libsasl2-dev:arm64 \ + libsdl2-dev:arm64 \ + libsdl2-image-dev:arm64 \ + libseccomp-dev:arm64 \ + libselinux1-dev:arm64 \ + libslirp-dev:arm64 \ + libsnappy-dev:arm64 \ + libspice-server-dev:arm64 \ + libssh-gcrypt-dev:arm64 \ + libsystemd-dev:arm64 \ + libtasn1-6-dev:arm64 \ + libubsan1:arm64 \ + libudev-dev:arm64 \ + liburing-dev:arm64 \ + libusb-1.0-0-dev:arm64 \ + libusbredirhost-dev:arm64 \ + libvdeplug-dev:arm64 \ + libvirglrenderer-dev:arm64 \ + libvte-2.91-dev:arm64 \ + libxen-dev:arm64 \ + libzstd-dev:arm64 \ + nettle-dev:arm64 \ + systemtap-sdt-dev:arm64 \ + xfslibs-dev:arm64 \ + zlib1g-dev:arm64 && \ + eatmydata apt-get autoremove -y && \ + eatmydata apt-get autoclean -y && \ + mkdir -p /usr/local/share/meson/cross && \ + echo "[binaries]\n\ +c = '/usr/bin/aarch64-linux-gnu-gcc'\n\ +ar = '/usr/bin/aarch64-linux-gnu-gcc-ar'\n\ +strip = '/usr/bin/aarch64-linux-gnu-strip'\n\ +pkgconfig = '/usr/bin/aarch64-linux-gnu-pkg-config'\n\ +\n\ +[host_machine]\n\ +system = 'linux'\n\ +cpu_family = 'aarch64'\n\ +cpu = 'aarch64'\n\ +endian = 'little'" > /usr/local/share/meson/cross/aarch64-linux-gnu && \ + dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt && \ + mkdir -p /usr/libexec/ccache-wrappers && \ + ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/aarch64-linux-gnu-c++ && \ + ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/aarch64-linux-gnu-cc && \ + ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/aarch64-linux-gnu-g++ && \ + ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/aarch64-linux-gnu-gcc + +ENV ABI "aarch64-linux-gnu" +ENV MESON_OPTS "--cross-file=aarch64-linux-gnu" +ENV QEMU_CONFIGURE_OPTS --cross-prefix=aarch64-linux-gnu- +ENV DEF_TARGET_LIST aarch64-softmmu,aarch64-linux-user diff --git a/tests/docker/dockerfiles/debian-arm64-test-cross.docker b/tests/docker/dockerfiles/debian-arm64-test-cross.docker deleted file mode 100644 index 53a9012beb..0000000000 --- a/tests/docker/dockerfiles/debian-arm64-test-cross.docker +++ /dev/null @@ -1,13 +0,0 @@ -# -# Docker arm64 cross-compiler target (tests only) -# -# This docker target builds on the debian Bullseye base image. -# -FROM qemu/debian11 - -# Add the foreign architecture we want and install dependencies -RUN dpkg --add-architecture arm64 -RUN apt update && \ - DEBIAN_FRONTEND=noninteractive eatmydata \ - apt install -y --no-install-recommends \ - crossbuild-essential-arm64 gcc-10-aarch64-linux-gnu diff --git a/tests/lcitool/refresh b/tests/lcitool/refresh index 4ab90a310a..ada73f7045 100755 --- a/tests/lcitool/refresh +++ b/tests/lcitool/refresh @@ -76,6 +76,12 @@ ubuntu2004_tsanhack = [ "RUN sed -i 's/^const/static const/g' /usr/lib/llvm-10/lib/clang/10.0.0/include/sanitizer/tsan_interface.h\n" ] +def debian_cross_build(prefix, targets): + conf = "ENV QEMU_CONFIGURE_OPTS --cross-prefix=%s\n" % (prefix) + targets = "ENV DEF_TARGET_LIST %s\n" % (targets) + return "".join([conf, targets]) + + try: generate_dockerfile("centos8", "centos-stream-8") generate_dockerfile("fedora", "fedora-35") @@ -86,6 +92,11 @@ try: generate_dockerfile("opensuse-leap", "opensuse-leap-152") generate_dockerfile("alpine", "alpine-edge") + generate_dockerfile("debian-arm64-cross", "debian-11", + cross="aarch64", + trailer=debian_cross_build("aarch64-linux-gnu-", + "aarch64-softmmu,aarch64-linux-user")) + generate_cirrus("freebsd-12") generate_cirrus("freebsd-13") generate_cirrus("macos-11") diff --git a/tests/tcg/configure.sh b/tests/tcg/configure.sh index 763e9b6ad8..adc95d6a44 100755 --- a/tests/tcg/configure.sh +++ b/tests/tcg/configure.sh @@ -97,7 +97,7 @@ for target in $target_list; do aarch64-*) # We don't have any bigendian build tools so we only use this for AArch64 container_hosts="x86_64 aarch64" - container_image=debian-arm64-test-cross + container_image=debian-arm64-cross container_cross_cc=aarch64-linux-gnu-gcc-10 ;; alpha-*) From patchwork Tue Mar 1 09:47:02 2022 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: 547249 Delivered-To: patch@linaro.org Received: by 2002:ac0:9f50:0:0:0:0:0 with SMTP id l16csp3526418imf; Tue, 1 Mar 2022 02:05:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJzXkABW+ILYm8KdGvi5qBM2Dg16uyq5FBscklkSAnJL+kWaTEquL28qnYy/A7TLnWUJDybG X-Received: by 2002:a37:bc45:0:b0:47e:292:4b8d with SMTP id m66-20020a37bc45000000b0047e02924b8dmr13213156qkf.484.1646129106472; Tue, 01 Mar 2022 02:05:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646129106; cv=none; d=google.com; s=arc-20160816; b=JRReOgEgDphQnZneEMTPWEcTIsADPCIekJPcr8gIXFxjdwQRHkCOtj/7phNeu4UBCu uo6Ppd4yC7lMZ6Xm5sZVua2olV85s4M+pQXP0t37MUIkeDgZroYusUQRmShseBOLurZt 2Yt1R3Id7cuhWXAGRZhQ9+O0LmdUy4ndu54Pyqx7yOMKB6GBBfT+P0TUyChxvBayEvXU IyGhwA7gKSuajtiz0OpKIXZPxtWVr7raY2LhdY2UhOfOUoBmNrjB19m8HVLnNBJzhKbk wz0uupgjZxW1ghHt6c+UGd861x6dP54gdM7pkO/nGfAXefjpjC6YnXf+ktZEQfKy9GsW X70Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=HVZdgancV6HY+C+1L2V0hYnmdXSRS3bHLzlHa8HpzLU=; b=M0MrkI5wVXeKozOLr2w6RqdZXYGCr5iq3h6oFqvsZLDPiot9f33J19PhbSUkmv547j fHPV5KzjNyTUPiYYgzihKi1F7xLKvTqLx+e+2sr2H2R7cpRfFp1x6w5g9t+UIW5jOYIc Z7bDoOAwKRXc8nfiNtehgOKolostRnR9sdvJZRgLldzdOP95qygBoCiU1aaeRh3f+Tw5 1OTCVrt5UrS/vuAWfIzCQ+ex7U/TIw3NkktS8C9NeMJuM7tZnVrwLHFIMBWClwWZgRms 3+Zxtyy0dz/2VyfnaNyIFLcLXVUI++g+afCcf502drHQqsQ8Tk9bEjj5IdTV7krIzjEu 4yZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Fi6D6rW8; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id v23-20020ac87297000000b002de4d337249si3948125qto.565.2022.03.01.02.05.06 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 01 Mar 2022 02:05:06 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Fi6D6rW8; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:48482 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nOzNS-0000Q3-0N for patch@linaro.org; Tue, 01 Mar 2022 05:05:06 -0500 Received: from eggs.gnu.org ([209.51.188.92]:46274) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nOz6Q-0003Hx-0v for qemu-devel@nongnu.org; Tue, 01 Mar 2022 04:47:30 -0500 Received: from [2a00:1450:4864:20::42e] (port=34345 helo=mail-wr1-x42e.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nOz6M-00077d-I6 for qemu-devel@nongnu.org; Tue, 01 Mar 2022 04:47:29 -0500 Received: by mail-wr1-x42e.google.com with SMTP id d3so19554135wrf.1 for ; Tue, 01 Mar 2022 01:47:26 -0800 (PST) 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=HVZdgancV6HY+C+1L2V0hYnmdXSRS3bHLzlHa8HpzLU=; b=Fi6D6rW8+8ytkO36QjF5mnYwyOXITCtVfFOz3YBubbIUdFtRlJnUbeYVM0+sSA/mUx HKjU1MjjPt8MIWmtZTFOOELDeWbJPjfaQ9IcJv5E92xbaPz4l0n2VvUL7Q6Lat7dNUdQ Eb1PeW3FMB0qR0bllJmatBXOhVujsG2SSPLayzEpHT4p7FZlTI4e0RBC8a2Fxh7TZnQZ /T75Ed3zxrLXzOJ2LsosmLJQXrhkUKnutPImpFFoOJJt4om1nkQLwVcHcZRsmzyy54nb eRJoqfDhcWu+6DbEVidy/ex++OCLyAN7E+UGotozHq0ZtRRXSLbMOKdeJIIeDLFIc47b Ha0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=HVZdgancV6HY+C+1L2V0hYnmdXSRS3bHLzlHa8HpzLU=; b=NnA0BWECyESDYK1YkQELpCpu6w1cRQts5GPqqB3cxdtBH7qg/FyaRj5snNmp8qluNq k+/jVfgr3vKnJHuBZzv+Dk7ivZTLwmS6Yg3DOaZ6PcmNiGlu5Pf7xFbXwm5n9xsE2nK6 8kKkziCX4JTE+01qd2CfQOQOihWPhD7CghY8CLNYHzPV88UCDdr1t89LKnBtscu0xO90 ypayVS/FvCj7C01LJCgcSmajWn3cagZRaMymHQON6p6QsfhlZqhn7YOsiE+Hlvv1Byq0 Jh8lW7sh7oAW6BC+wjozSLMw5PBTggJaBjtnvkrNoHpnvg1zBPYwV0Y8AGNRPYLlkW32 l59Q== X-Gm-Message-State: AOAM530s4yNx+n3CusrERvGU6jXC4npG+gzxStO9oid8OKCmheeHCLYw dvobb9Wa0MDI/nGFJnO10X81BA== X-Received: by 2002:adf:f206:0:b0:1ef:fdb3:4b2b with SMTP id p6-20020adff206000000b001effdb34b2bmr3447012wro.179.1646128045221; Tue, 01 Mar 2022 01:47:25 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id c14-20020a7bc84e000000b0038100c9a593sm2804934wml.45.2022.03.01.01.47.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Mar 2022 01:47:22 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id D6DE11FFBD; Tue, 1 Mar 2022 09:47:15 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 05/18] tests/docker: update debian-s390x-cross with lcitool Date: Tue, 1 Mar 2022 09:47:02 +0000 Message-Id: <20220301094715.550871-6-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220301094715.550871-1-alex.bennee@linaro.org> References: <20220301094715.550871-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::42e (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::42e; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42e.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 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, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Huth , Beraldo Leal , David Hildenbrand , Cornelia Huck , Richard Henderson , =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= , Wainer dos Santos Moschetta , qemu-devel@nongnu.org, "open list:S390 general arch..." , =?utf-8?q?Alex_Be?= =?utf-8?q?nn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" A later compiler is needed for some upcomming tests so we might as well migrate to an lcitool generated docker file. Signed-off-by: Alex Bennée Cc: David Hildenbrand Reviewed-by: Richard Henderson Message-Id: <20220225172021.3493923-6-alex.bennee@linaro.org> diff --git a/.gitlab-ci.d/container-cross.yml b/.gitlab-ci.d/container-cross.yml index ed620620f8..d38f657131 100644 --- a/.gitlab-ci.d/container-cross.yml +++ b/.gitlab-ci.d/container-cross.yml @@ -133,8 +133,7 @@ riscv64-debian-cross-container: s390x-debian-cross-container: extends: .container_job_template - stage: containers-layer2 - needs: ['amd64-debian10-container'] + stage: containers variables: NAME: debian-s390x-cross diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include index eeee1e6bdf..cce9faab36 100644 --- a/tests/docker/Makefile.include +++ b/tests/docker/Makefile.include @@ -146,7 +146,6 @@ 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-ppc64el-cross: docker-image-debian10 -docker-image-debian-s390x-cross: docker-image-debian10 docker-image-debian-sh4-cross: docker-image-debian10 docker-image-debian-sparc64-cross: docker-image-debian10 diff --git a/tests/docker/dockerfiles/debian-s390x-cross.docker b/tests/docker/dockerfiles/debian-s390x-cross.docker index 9f2ab51eb0..aa1bd6eb4c 100644 --- a/tests/docker/dockerfiles/debian-s390x-cross.docker +++ b/tests/docker/dockerfiles/debian-s390x-cross.docker @@ -1,33 +1,164 @@ +# THIS FILE WAS AUTO-GENERATED # -# Docker s390 cross-compiler target +# $ lcitool dockerfile --layers all --cross s390x debian-11 qemu # -# This docker target builds on the debian Stretch base image. -# -FROM qemu/debian10 +# https://gitlab.com/libvirt/libvirt-ci + +FROM docker.io/library/debian:11-slim -# Add the s390x architecture -RUN dpkg --add-architecture s390x +RUN export DEBIAN_FRONTEND=noninteractive && \ + apt-get update && \ + apt-get install -y eatmydata && \ + eatmydata apt-get dist-upgrade -y && \ + eatmydata apt-get install --no-install-recommends -y \ + bash \ + bc \ + bsdextrautils \ + bzip2 \ + ca-certificates \ + ccache \ + dbus \ + debianutils \ + diffutils \ + exuberant-ctags \ + findutils \ + gcovr \ + genisoimage \ + gettext \ + git \ + hostname \ + libpcre2-dev \ + libspice-protocol-dev \ + libtest-harness-perl \ + llvm \ + locales \ + make \ + meson \ + ncat \ + ninja-build \ + openssh-client \ + perl-base \ + pkgconf \ + python3 \ + python3-numpy \ + python3-opencv \ + python3-pillow \ + python3-pip \ + python3-sphinx \ + python3-sphinx-rtd-theme \ + python3-venv \ + python3-yaml \ + rpm2cpio \ + sed \ + sparse \ + tar \ + tesseract-ocr \ + tesseract-ocr-eng \ + texinfo && \ + eatmydata apt-get autoremove -y && \ + eatmydata apt-get autoclean -y && \ + sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen && \ + dpkg-reconfigure locales -# Grab the updated list of packages -RUN apt update && apt dist-upgrade -yy -RUN apt update && \ - DEBIAN_FRONTEND=noninteractive eatmydata \ - apt install -y --no-install-recommends \ - gcc-multilib-s390x-linux-gnu +ENV LANG "en_US.UTF-8" +ENV MAKE "/usr/bin/make" +ENV NINJA "/usr/bin/ninja" +ENV PYTHON "/usr/bin/python3" +ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers" -RUN apt update && \ - DEBIAN_FRONTEND=noninteractive eatmydata \ - apt build-dep -yy -a s390x --arch-only qemu +RUN export DEBIAN_FRONTEND=noninteractive && \ + dpkg --add-architecture s390x && \ + eatmydata apt-get update && \ + eatmydata apt-get dist-upgrade -y && \ + eatmydata apt-get install --no-install-recommends -y dpkg-dev && \ + eatmydata apt-get install --no-install-recommends -y \ + g++-s390x-linux-gnu \ + gcc-s390x-linux-gnu \ + libaio-dev:s390x \ + libasan5:s390x \ + libasound2-dev:s390x \ + libattr1-dev:s390x \ + libbpf-dev:s390x \ + libbrlapi-dev:s390x \ + libbz2-dev:s390x \ + libc6-dev:s390x \ + libcacard-dev:s390x \ + libcap-ng-dev:s390x \ + libcapstone-dev:s390x \ + libcurl4-gnutls-dev:s390x \ + libdaxctl-dev:s390x \ + libdrm-dev:s390x \ + libepoxy-dev:s390x \ + libfdt-dev:s390x \ + libffi-dev:s390x \ + libfuse3-dev:s390x \ + libgbm-dev:s390x \ + libgcrypt20-dev:s390x \ + libglib2.0-dev:s390x \ + libglusterfs-dev:s390x \ + libgnutls28-dev:s390x \ + libgtk-3-dev:s390x \ + libibumad-dev:s390x \ + libibverbs-dev:s390x \ + libiscsi-dev:s390x \ + libjemalloc-dev:s390x \ + libjpeg62-turbo-dev:s390x \ + liblttng-ust-dev:s390x \ + liblzo2-dev:s390x \ + libncursesw5-dev:s390x \ + libnfs-dev:s390x \ + libnuma-dev:s390x \ + libpam0g-dev:s390x \ + libpixman-1-dev:s390x \ + libpng-dev:s390x \ + libpulse-dev:s390x \ + librbd-dev:s390x \ + librdmacm-dev:s390x \ + libsasl2-dev:s390x \ + libsdl2-dev:s390x \ + libsdl2-image-dev:s390x \ + libseccomp-dev:s390x \ + libselinux1-dev:s390x \ + libslirp-dev:s390x \ + libsnappy-dev:s390x \ + libssh-gcrypt-dev:s390x \ + libsystemd-dev:s390x \ + libtasn1-6-dev:s390x \ + libubsan1:s390x \ + libudev-dev:s390x \ + liburing-dev:s390x \ + libusb-1.0-0-dev:s390x \ + libusbredirhost-dev:s390x \ + libvdeplug-dev:s390x \ + libvirglrenderer-dev:s390x \ + libvte-2.91-dev:s390x \ + libzstd-dev:s390x \ + nettle-dev:s390x \ + systemtap-sdt-dev:s390x \ + xfslibs-dev:s390x \ + zlib1g-dev:s390x && \ + eatmydata apt-get autoremove -y && \ + eatmydata apt-get autoclean -y && \ + mkdir -p /usr/local/share/meson/cross && \ + echo "[binaries]\n\ +c = '/usr/bin/s390x-linux-gnu-gcc'\n\ +ar = '/usr/bin/s390x-linux-gnu-gcc-ar'\n\ +strip = '/usr/bin/s390x-linux-gnu-strip'\n\ +pkgconfig = '/usr/bin/s390x-linux-gnu-pkg-config'\n\ +\n\ +[host_machine]\n\ +system = 'linux'\n\ +cpu_family = 's390x'\n\ +cpu = 's390x'\n\ +endian = 'big'" > /usr/local/share/meson/cross/s390x-linux-gnu && \ + dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt && \ + mkdir -p /usr/libexec/ccache-wrappers && \ + ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/s390x-linux-gnu-c++ && \ + ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/s390x-linux-gnu-cc && \ + ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/s390x-linux-gnu-g++ && \ + ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/s390x-linux-gnu-gcc -# Specify the cross prefix for this image (see tests/docker/common.rc) +ENV ABI "s390x-linux-gnu" +ENV MESON_OPTS "--cross-file=s390x-linux-gnu" ENV QEMU_CONFIGURE_OPTS --cross-prefix=s390x-linux-gnu- ENV DEF_TARGET_LIST s390x-softmmu,s390x-linux-user - -# Install extra libraries to increase code coverage -RUN apt update && \ - DEBIAN_FRONTEND=noninteractive eatmydata \ - apt install -y --no-install-recommends \ - libbz2-dev:s390x \ - liblzo2-dev:s390x \ - librdmacm-dev:s390x \ - libsnappy-dev:s390x diff --git a/tests/lcitool/refresh b/tests/lcitool/refresh index ada73f7045..1f00281b44 100755 --- a/tests/lcitool/refresh +++ b/tests/lcitool/refresh @@ -97,6 +97,11 @@ try: trailer=debian_cross_build("aarch64-linux-gnu-", "aarch64-softmmu,aarch64-linux-user")) + generate_dockerfile("debian-s390x-cross", "debian-11", + cross="s390x", + trailer=debian_cross_build("s390x-linux-gnu-", + "s390x-softmmu,s390x-linux-user")) + generate_cirrus("freebsd-12") generate_cirrus("freebsd-13") generate_cirrus("macos-11") From patchwork Tue Mar 1 09:47:03 2022 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: 547251 Delivered-To: patch@linaro.org Received: by 2002:ac0:9f50:0:0:0:0:0 with SMTP id l16csp3530399imf; Tue, 1 Mar 2022 02:11:00 -0800 (PST) X-Google-Smtp-Source: ABdhPJypNiSyPE55ST7XHRTeZzAeKvTG4oJg1ua36bl7NhqwVApJKxwuJSw4MExmHkaSa+0EPdoL X-Received: by 2002:ad4:41cc:0:b0:432:849c:7ff9 with SMTP id a12-20020ad441cc000000b00432849c7ff9mr16802668qvq.127.1646129459884; Tue, 01 Mar 2022 02:10:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646129459; cv=none; d=google.com; s=arc-20160816; b=n+NzFn7wgBqLzKtIeFY1puqg/tWI2+SCcEe9dEjOOtxsWAqp3pAFCl0Hwcqp12ubel WEaTzi0xXCRGIFPTFMtXCaeDisxn8mGZaJm954EpeaXp5nN1JPM/gcG6X9gQ2lDc8+RI GwsM5IjPingZcbL7VA8ngfxY/vGKxBU46jU5QRWsTdMKez+2UYlbpfU23e9d2Rdh92jN iHBdbwogF9B9UPr036U2fbOYfC8laXlvpRHynGWSUPfnr4luuQ5a71ozGwL9yEqQ5yRr 8tSSoVu2OT2GD0yO7QHj6rEqS3RRNk2x/R5WRmnhi8UupTdwZ/G1nDmYvYGiFwoOlmTS r3EA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=+drNVTTsqEuR91JHF5TFvYIDh5n/3YjIQhqyL2kK10o=; b=r8rZuVRFj/gGN9zUC7QPuISzacIpoU1zRBQzuhkB6HDyWgr2dLwYTz+KQwuzLYRc4U 2NqR2ea5mvSdBZB9f0rDlRjGlAUWXcR03SUXceml9Tj67Oj2GxySHaJaAoeAL19+Q4zz x061FgPN4vJ0wkT6eYG6es3HfDyOmEbGlIsx/4h7H1tu+t1dqCddwD1LNF8yjGJz2sJr +55CoSCt/18PvVLh+pSfnKHsyByc/cmtMCbdKmeYE/12ZigsPd+a4wSezwj5do9NSvyj rRZzgZ9PfPPwt4X/fRvRNRaXLseb827Sa9BZVfnBroxGHPRRj+1AUPGxq2+Nv2l6KKQx BYEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=E2YdKNcI; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id g25-20020ac87759000000b002de8d9a1bfesi3992607qtu.71.2022.03.01.02.10.59 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 01 Mar 2022 02:10:59 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=E2YdKNcI; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:57932 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nOzT8-0006ea-Cf for patch@linaro.org; Tue, 01 Mar 2022 05:10:58 -0500 Received: from eggs.gnu.org ([209.51.188.92]:46328) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nOz6S-0003NM-FA for qemu-devel@nongnu.org; Tue, 01 Mar 2022 04:47:32 -0500 Received: from [2a00:1450:4864:20::42c] (port=39467 helo=mail-wr1-x42c.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nOz6Q-00078l-SW for qemu-devel@nongnu.org; Tue, 01 Mar 2022 04:47:32 -0500 Received: by mail-wr1-x42c.google.com with SMTP id ay10so1678995wrb.6 for ; Tue, 01 Mar 2022 01:47:30 -0800 (PST) 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=+drNVTTsqEuR91JHF5TFvYIDh5n/3YjIQhqyL2kK10o=; b=E2YdKNcIqURI3J0LETv88W8IePYyTTOQbek7itkMhc1S185i4OOe1VzLFkCoTtxzG0 y+Fs9FMRO8X1apRwTeFcHrR8WkWCCgpOjJ+COv3J+Fwd6AR4BYHmFF97bgG+RvpuRUgu VAni9HzcITVMgzV7Rk9Ng+OrK7RlbHKuh6y+ROxIH4DEu8zLipFlvCWomr0RhLyIAhJl YkP3r30/ZOI/T+EPHxWXI39h3OFjbWHtQ4IIUlAfEm7ovard2VD/F3mCpHQ6JbZ0SlAh wQ8/QrzqEuPItAvWoatwbEo+7XXDZSTVJioWom/uj1qX9UAJpgr8b5x1M41G8WEMSyaU vBrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=+drNVTTsqEuR91JHF5TFvYIDh5n/3YjIQhqyL2kK10o=; b=obGzHz2ewVjkXvEdI+0S/oyM7Z42pzv9mhFw/rUTMbhj/N4sSWVqNjnzUPNSASNz3u 64Y4WSM8rvtXjk3/rvPbhM8J42LtdUjqAXa+S/0d3yHYnSaAtsy5FaBQiGzcp7HzvhPR ZGZdsb0LmkwzKObV9pHsN83+wh/pXkJUTdvidoE/3RaHECJMA+z+PO4OCiu64Dtm/e7L aGlXnqk2joOeCFt6jGiGvNHrS/LjYmxcGeQENpMtjZQYYVpb4PhZhbCJ+rns10WAs5zu M/QCVQXAryXP9M1KFtRUobw7+chbkvk8EUGzu1Fn+hahTzC0+i2eirbfuwTNDT17irQs Hd+A== X-Gm-Message-State: AOAM530AUQjbZuSKZgegiN7ZExgWqxXXoU7/g//IyaNvRNahj8jlgL6K twkhIUO9F1e2eQW9v4r4WksC0g== X-Received: by 2002:adf:816c:0:b0:1e6:88a9:eb6c with SMTP id 99-20020adf816c000000b001e688a9eb6cmr18504006wrm.645.1646128049611; Tue, 01 Mar 2022 01:47:29 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id t8-20020a5d6908000000b001e3169cc6afsm13284863wru.94.2022.03.01.01.47.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Mar 2022 01:47:22 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id EB56A1FFBE; Tue, 1 Mar 2022 09:47:15 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 06/18] tests/docker: introduce debian-riscv64-test-cross Date: Tue, 1 Mar 2022 09:47:03 +0000 Message-Id: <20220301094715.550871-7-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220301094715.550871-1-alex.bennee@linaro.org> References: <20220301094715.550871-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::42c (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42c.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 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, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Huth , Beraldo Leal , Richard Henderson , qemu-devel@nongnu.org, Wainer dos Santos Moschetta , =?utf-8?q?Philippe_Mathi?= =?utf-8?q?eu-Daud=C3=A9?= , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Cross building QEMU for riscv64 still involves messing about with sid and ports. However for building tests we can have a slimmer compiler only container which should be more stable. Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson Message-Id: <20220225172021.3493923-7-alex.bennee@linaro.org> diff --git a/.gitlab-ci.d/container-cross.yml b/.gitlab-ci.d/container-cross.yml index d38f657131..e622ac2d21 100644 --- a/.gitlab-ci.d/container-cross.yml +++ b/.gitlab-ci.d/container-cross.yml @@ -131,6 +131,13 @@ riscv64-debian-cross-container: variables: NAME: debian-riscv64-cross +# we can however build TCG tests using a non-sid base +riscv64-debian-test-cross-container: + extends: .container_job_template + stage: containers-layer2 + variables: + NAME: debian-riscv64-test-cross + s390x-debian-cross-container: extends: .container_job_template stage: containers diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include index cce9faab36..e495b163a0 100644 --- a/tests/docker/Makefile.include +++ b/tests/docker/Makefile.include @@ -214,6 +214,7 @@ docker-image-debian-all-test-cross: docker-image-debian10 docker-image-debian-microblaze-cross: docker-image-debian10 docker-image-debian-nios2-cross: docker-image-debian10 docker-image-debian-powerpc-test-cross: docker-image-debian11 +docker-image-debian-riscv64-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 @@ -222,6 +223,7 @@ DOCKER_PARTIAL_IMAGES += debian-hppa-cross DOCKER_PARTIAL_IMAGES += debian-m68k-cross debian-mips64-cross DOCKER_PARTIAL_IMAGES += debian-microblaze-cross DOCKER_PARTIAL_IMAGES += debian-nios2-cross +DOCKER_PARTIAL_IMAGES += debian-riscv64-test-cross DOCKER_PARTIAL_IMAGES += debian-sh4-cross debian-sparc64-cross DOCKER_PARTIAL_IMAGES += debian-tricore-cross DOCKER_PARTIAL_IMAGES += debian-xtensa-cross diff --git a/tests/docker/dockerfiles/debian-riscv64-test-cross.docker b/tests/docker/dockerfiles/debian-riscv64-test-cross.docker new file mode 100644 index 0000000000..1d90901298 --- /dev/null +++ b/tests/docker/dockerfiles/debian-riscv64-test-cross.docker @@ -0,0 +1,12 @@ +# +# Docker 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-riscv64-linux-gnu \ + libc6-dev-riscv64-cross diff --git a/tests/tcg/configure.sh b/tests/tcg/configure.sh index adc95d6a44..0663bd19f4 100755 --- a/tests/tcg/configure.sh +++ b/tests/tcg/configure.sh @@ -180,7 +180,7 @@ for target in $target_list; do ;; riscv64-*) container_hosts=x86_64 - container_image=debian-riscv64-cross + container_image=debian-riscv64-test-cross container_cross_cc=riscv64-linux-gnu-gcc ;; s390x-*) From patchwork Tue Mar 1 09:47:04 2022 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: 547253 Delivered-To: patch@linaro.org Received: by 2002:ac0:9f50:0:0:0:0:0 with SMTP id l16csp3531196imf; Tue, 1 Mar 2022 02:12:16 -0800 (PST) X-Google-Smtp-Source: ABdhPJxXtQsFXKFvLPpSwlUjQC6cohUzuzlcUDPOXdXP38icuC8lKY4jpM1SoCa3g+Oi4pQv694z X-Received: by 2002:a37:6896:0:b0:508:b3b6:246b with SMTP id d144-20020a376896000000b00508b3b6246bmr12945556qkc.23.1646129536397; Tue, 01 Mar 2022 02:12:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646129536; cv=none; d=google.com; s=arc-20160816; b=UgvrEOXY05lVXMNVzRQE3q+iO/0JRPECY+WP9yNlY0J8bM8lc5kcueLWAbW6WemAkD DQx/1eIlNzTfQ90tNtnZlKzsk+M8t8wrsa4Zp7iAM/wq+/wDzytn9MlbwtyBTrK8y2jt bmCLjoakqL3C/6+7vL7qAaNS5GXPTY/O2sn0SazK33gZdL+WdPGLyLC/B9T2Kfsml1bC S1axRC8cNcMR3wvhddofG+C/j2kmk+ydGZC/KYTr+Uw0RdcCZav0vmfidR+FUQDskyrs 6jwjF1FojLMeX6zQiMVsm0bOM/wzUEUurEQokvGjcVoiX79kjBKxUYPho+3K1D1DvLS0 e5Eg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=BuTGADjY91ULHZMBqMmqygI/2yJZ4q2AhA3jocLd6Rw=; b=QQWkJCWsWveWCVd/IsbuClbDFOytugVxwDjB3N2VP4V1McaGjBDvsVGPC16gQm83vr J0WjpD2dU/ku+LUHMeb8qUMHPkPh6Uce8m4RoA8hX7+dsWIZ5zHCSBdKQZGBDXX0ZT/9 b03cq+B8ut84k7heCMtwH5vcXHFR9yRQ4LfGVcbbacBURdgtfmklQ3VF8uxmzxVaLHgH tpgYU/XdGRkzW+IfTs1MsZEjfCoINvG8mdjdxufF5Z5bmfkTs3CCbQXSF9eOJJj0tY62 3pX9R2cb2Qsb9y+KZrYzNdfgn6+PF9Ynu6DwHgancNYuuW8TivY7i+mLTlwQig3TiUY0 cQOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=VNVwXpEA; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id f20-20020ac84714000000b002de755c2c52si4097840qtp.157.2022.03.01.02.12.16 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 01 Mar 2022 02:12:16 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=VNVwXpEA; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:34278 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nOzUN-0001My-W3 for patch@linaro.org; Tue, 01 Mar 2022 05:12:16 -0500 Received: from eggs.gnu.org ([209.51.188.92]:46648) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nOz6d-0003Vc-Nn for qemu-devel@nongnu.org; Tue, 01 Mar 2022 04:47:44 -0500 Received: from [2a00:1450:4864:20::332] (port=38645 helo=mail-wm1-x332.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nOz6O-00077s-AK for qemu-devel@nongnu.org; Tue, 01 Mar 2022 04:47:43 -0500 Received: by mail-wm1-x332.google.com with SMTP id 10-20020a05600c26ca00b003814df019c2so895218wmv.3 for ; Tue, 01 Mar 2022 01:47:27 -0800 (PST) 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=BuTGADjY91ULHZMBqMmqygI/2yJZ4q2AhA3jocLd6Rw=; b=VNVwXpEAQcCTi0BUpzF5RbpQVuzzj/G91EqujQxZGHO4eIl6I1AC8r4eB+uvnJl//8 0pEClMu5JjNI7OitrQ4l52sLVGPHf3QDAk4qnwQ2pg0DVic+1w0JkSSdUfIYOfYEL3jW k1aLyJsGRe9xdmvPh/dVy09t2JpIgzDtPh/mqOt6cqhF4qJeRFeBrzDCaik70KJvFAe4 8SZVoczfjPq5utvzNiUIosadjcNdCuVw+AssNnZ26LSuUzjOO+nVGV8D4XFOeS2GDRR5 dyt1diPosaz9/aDHwOaqRpYn9qiaGTna7dC4rsyg5wYXsFZbc3vQT+JmENrbJYkn4gPd gYpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=BuTGADjY91ULHZMBqMmqygI/2yJZ4q2AhA3jocLd6Rw=; b=VuNEkGS9+IfXxJpPTkT7d6wuSTOeXrnPsn6rnO8tAoTqTYtIdkicDrk9QRrMhRSCeF hgVauKDgnu8tYOgFzQvLbOujA7piBmXfpt6/sdMRb8MB/gTTsRUYRsv5OSgeRvPtGfXZ rsR6zUMfKXA6mBW/aw8p+BlXNickwCj10p4vezs+Ucan54zXKRCHkln7CcLsgUVWlSGJ ULnEtjVj2LwAXvdXNGPhi0dFSrelfeknulGLHmxCryXoz3ed+qVbCl91TZMU9fVY/NC0 4K80FRAGcs1udsLSxs+uZf/vdElINtfCdEV+UplSc/G/NcksNZOMgMSqoynsMv6mrnYc llCw== X-Gm-Message-State: AOAM5319qy6XyfNnIo4N3PSC9baWZKOypmkHh/hR/bVty6RGK3+rwj/Y OEGzEfJnNhU2FkVVjyUYxxQ56w== X-Received: by 2002:a05:600c:5014:b0:381:6829:96bd with SMTP id n20-20020a05600c501400b00381682996bdmr6549405wmr.123.1646128046866; Tue, 01 Mar 2022 01:47:26 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id v14-20020a7bcb4e000000b0034492fa24c6sm1943154wmj.34.2022.03.01.01.47.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Mar 2022 01:47:22 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 0CD751FFBF; Tue, 1 Mar 2022 09:47:16 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 07/18] scripts/ci: add build env rules for aarch32 on aarch64 Date: Tue, 1 Mar 2022 09:47:04 +0000 Message-Id: <20220301094715.550871-8-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220301094715.550871-1-alex.bennee@linaro.org> References: <20220301094715.550871-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::332 (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x332.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 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, PDS_HP_HELO_NORDNS=0.659, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Huth , Beraldo Leal , Richard Henderson , qemu-devel@nongnu.org, Wainer dos Santos Moschetta , =?utf-8?q?Philippe_Mathi?= =?utf-8?q?eu-Daud=C3=A9?= , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" At least the current crop of Aarch64 HW can support running 32 bit EL0 code. Before we can build and test we need a minimal set of packages installed. We can't use "apt build-dep" because it currently gets confused trying to keep two sets of build-deps installed at once. Instead we install a minimal set of libraries that will allow us to continue. Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson Message-Id: <20220225172021.3493923-8-alex.bennee@linaro.org> diff --git a/scripts/ci/setup/build-environment.yml b/scripts/ci/setup/build-environment.yml index 599896cc5b..9182e0c253 100644 --- a/scripts/ci/setup/build-environment.yml +++ b/scripts/ci/setup/build-environment.yml @@ -19,6 +19,13 @@ - '((ansible_version.major == 2) and (ansible_version.minor >= 8)) or (ansible_version.major >= 3)' msg: "Unsuitable ansible version, please use version 2.8.0 or later" + - name: Add armhf foreign architecture to aarch64 hosts + command: dpkg --add-architecture armhf + when: + - ansible_facts['distribution'] == 'Ubuntu' + - ansible_facts['architecture'] == 'aarch64' + - ansible_facts['distribution_version'] == '20.04' + - name: Update apt cache / upgrade packages via apt apt: update_cache: yes @@ -115,6 +122,24 @@ - ansible_facts['distribution'] == 'Ubuntu' - ansible_facts['distribution_version'] == '20.04' + - name: Install armhf cross-compile packages to build QEMU on AArch64 Ubuntu 20.04 + package: + name: + - binutils-arm-linux-gnueabihf + - gcc-arm-linux-gnueabihf + - libblkid-dev:armhf + - libc6-dev:armhf + - libffi-dev:armhf + - libglib2.0-dev:armhf + - libmount-dev:armhf + - libpcre2-dev:armhf + - libpixman-1-dev:armhf + - zlib1g-dev:armhf + when: + - ansible_facts['distribution'] == 'Ubuntu' + - ansible_facts['distribution_version'] == '20.04' + - ansible_facts['architecture'] == 'aarch64' + - name: Install basic packages to build QEMU on EL8 dnf: # This list of packages start with tests/docker/dockerfiles/centos8.docker From patchwork Tue Mar 1 09:47:05 2022 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: 547252 Delivered-To: patch@linaro.org Received: by 2002:ac0:9f50:0:0:0:0:0 with SMTP id l16csp3530732imf; Tue, 1 Mar 2022 02:11:28 -0800 (PST) X-Google-Smtp-Source: ABdhPJxMzCWKSz/S3WqdjVbcWUn+eL25aFZWbAM3a4BwgwxbVQk+WeBu6TdU3BDM196oL/D2TzUW X-Received: by 2002:ac8:7d44:0:b0:2de:4d14:b6b9 with SMTP id h4-20020ac87d44000000b002de4d14b6b9mr19242018qtb.505.1646129488564; Tue, 01 Mar 2022 02:11:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646129488; cv=none; d=google.com; s=arc-20160816; b=OpfDkWK0Nnec/qtGjPNp9xh2L7Nh7+njlW4dDRQfP2TNBjoIdbJp5gcUC2ue76yMc9 ikriFejQfJoldq5GNdZULujfZijt3pnJ62zfHecBLdqIJ4z/Mji5kqk4PqF3gBUoP4/c eBCvW4NaF7pGffyU6QMBWgFCy7VzhZ2duLudvE0PPtvTLtfCwLrFUxsrGa5BHvJ4Tb0l Mf1Ihkq9w2NnozONZCxJE8WGxM+57KH4XJz1q24DlRNnHSBFssmmuAuyT9+w9dvxqzBg IzAT6dg/p01gi1YTpeDuaXP4E4sXc+94VAdWwkXKDFM4HcyPEcvHaubS6CcPvOIozzMM IPtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=U+pwlSv+lJBvgdk+JsvrYqjIIdPS4lqzyuJCqNRB8Uk=; b=yAE4krUerhCozcwsati3E8+5SeUOeah/e2JtQpnaePZs9iB28KzMwBVZkHu8zDob1f //DOHb46woZOAQc1ejj6tJG4Ykue0XGwPE/QEJQFluc2f+q/4gceMZWuOKqfR0LSjQsJ A3eSeSTFknKYl5QveW5+lqgGlgbOLXNAYIokufas6FF2xn9mPvwjGb/E8Ri9NcRoFstN WKSkTTO0jObgnnwGmnvxCzVt5fESVetTLXWj3DZX55Hpnxj6i8N4T04epZ3bn4XoSyGL IB+iSfM2CwhgmarL67M9M7RUJQ9uloV5WON+8X6KD6NOw5N1FduF/e3evmLVb2u4aHoA tmIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="bCNye4m/"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id e18-20020a056214151200b004350116d9d9si425241qvy.173.2022.03.01.02.11.28 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 01 Mar 2022 02:11:28 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="bCNye4m/"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:60252 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nOzTc-0008By-5y for patch@linaro.org; Tue, 01 Mar 2022 05:11:28 -0500 Received: from eggs.gnu.org ([209.51.188.92]:46316) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nOz6S-0003Mk-4i for qemu-devel@nongnu.org; Tue, 01 Mar 2022 04:47:32 -0500 Received: from [2a00:1450:4864:20::335] (port=39445 helo=mail-wm1-x335.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nOz6Q-00078F-Fj for qemu-devel@nongnu.org; Tue, 01 Mar 2022 04:47:31 -0500 Received: by mail-wm1-x335.google.com with SMTP id o18-20020a05600c4fd200b003826701f847so312130wmq.4 for ; Tue, 01 Mar 2022 01:47:28 -0800 (PST) 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=U+pwlSv+lJBvgdk+JsvrYqjIIdPS4lqzyuJCqNRB8Uk=; b=bCNye4m/b5wOylExBFjli7+5FRVOCgiTIiNFmis1P7jlbd8px4C5GaA3nVefUFcZPl 9GFCCIy5j2o3T5hbwdrYpM5JqrI7mn+/S90an451LyfRbW0puzdOoa9QIJm4NdA40u9/ yC4j6SXqdIFHRVumElJO+krCFtpbHu0GUdestDdYLv8R1213HMw+gKTxbHQmvkp4RyvR okFBPvUFCZ/IATHYxUkiDE63IszS/hTvpsQyWioFRf8kQtVscfgoiAVqgNrWg2h/VisN tRJvT+SqTq6PhTDtrOVQDswZe6+pnIBp3SRAvM1KOO44G95z8+AskYPRr9e222dlHZxF C+yg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=U+pwlSv+lJBvgdk+JsvrYqjIIdPS4lqzyuJCqNRB8Uk=; b=Flth6yEO7Uhy9GtNtQVDVSaEPyuB2QLyyDmGO4RkeJl1AUa1lUg7NYdjwt3z5n9dre +L5htyqWl0yjXw5fyRX8vAqac8RZtBAwcowWMLiwasIzjBrr8Z4J24OmLoSRlabLGYCA WouPqMgJMHk2Q/28HZJAMQF17290CuKnuZvLjRx4/0oQGcZXls5Gyr6dYLj4869/U6rL alIHbWghUVc9oEMNVKih63xYYLUoEFijqBUFbG8sC9SimAA7DhO2Og9EeSqjMgpHu0Sq R+bYJNqGd9fLiXgTVUx4cNIXXxoErQwqA6MsGWpPOx//m6xKHndVq1OmR3MRI9JTIN2W D4hg== X-Gm-Message-State: AOAM531RqFujqcwRrz0cRG3m+qeoyoTW6UP29+WHGc1ctNxbRIeI0CzF 4k8L0y4ZI43NKEtkojaJ/q0dyw== X-Received: by 2002:a05:600c:47d1:b0:381:1c01:2aa7 with SMTP id l17-20020a05600c47d100b003811c012aa7mr16360383wmo.189.1646128047858; Tue, 01 Mar 2022 01:47:27 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id w6-20020adfee46000000b001e4bf01bdfbsm13305807wro.46.2022.03.01.01.47.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Mar 2022 01:47:22 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 18D251FFC0; Tue, 1 Mar 2022 09:47:16 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 08/18] scripts/ci: allow for a secondary runner Date: Tue, 1 Mar 2022 09:47:05 +0000 Message-Id: <20220301094715.550871-9-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220301094715.550871-1-alex.bennee@linaro.org> References: <20220301094715.550871-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::335 (failed) 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: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 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, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Huth , Beraldo Leal , Richard Henderson , qemu-devel@nongnu.org, Wainer dos Santos Moschetta , =?utf-8?q?Philippe_Mathi?= =?utf-8?q?eu-Daud=C3=A9?= , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Some HW can run multiple architecture profiles so we can install a secondary runner to build and run tests for those profiles. This allows setting up secondary service. Signed-off-by: Alex Bennée Acked-by: Richard Henderson Message-Id: <20220225172021.3493923-9-alex.bennee@linaro.org> diff --git a/scripts/ci/setup/gitlab-runner.yml b/scripts/ci/setup/gitlab-runner.yml index 1127db516f..33128be85d 100644 --- a/scripts/ci/setup/gitlab-runner.yml +++ b/scripts/ci/setup/gitlab-runner.yml @@ -69,3 +69,41 @@ name: gitlab-runner state: started enabled: yes + + - name: Download secondary gitlab-runner + get_url: + dest: /usr/local/bin/gitlab-runner-arm + url: "https://s3.amazonaws.com/gitlab-runner-downloads/v{{ gitlab_runner_version }}/binaries/gitlab-runner-{{ gitlab_runner_os }}-arm" + owner: gitlab-runner + group: gitlab-runner + mode: u=rwx,g=rwx,o=rx + when: + - ansible_facts['distribution'] == 'Ubuntu' + - ansible_facts['architecture'] == 'aarch64' + - ansible_facts['distribution_version'] == '20.04' + + - name: Register secondary gitlab-runner + command: "/usr/local/bin/gitlab-runner-arm register --non-interactive --url {{ gitlab_runner_server_url }} --registration-token {{ gitlab_runner_registration_token }} --executor shell --tag-list aarch32,{{ ansible_facts[\"distribution\"]|lower }}_{{ ansible_facts[\"distribution_version\"] }} --description '{{ ansible_facts[\"distribution\"] }} {{ ansible_facts[\"distribution_version\"] }} {{ ansible_facts[\"architecture\"] }} ({{ ansible_facts[\"os_family\"] }})'" + when: + - ansible_facts['distribution'] == 'Ubuntu' + - ansible_facts['architecture'] == 'aarch64' + - ansible_facts['distribution_version'] == '20.04' + + - name: Install the secondary gitlab-runner service using its own functionality + command: /usr/local/bin/gitlab-runner-arm install --user gitlab-runner --working-directory /home/gitlab-runner/arm -n gitlab-runner-arm + register: gitlab_runner_install_service_result + failed_when: "gitlab_runner_install_service_result.rc != 0 and \"already exists\" not in gitlab_runner_install_service_result.stderr" + when: + - ansible_facts['distribution'] == 'Ubuntu' + - ansible_facts['architecture'] == 'aarch64' + - ansible_facts['distribution_version'] == '20.04' + + - name: Enable the secondary gitlab-runner service + service: + name: gitlab-runner-arm + state: started + enabled: yes + when: + - ansible_facts['distribution'] == 'Ubuntu' + - ansible_facts['architecture'] == 'aarch64' + - ansible_facts['distribution_version'] == '20.04' From patchwork Tue Mar 1 09:47:06 2022 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: 547254 Delivered-To: patch@linaro.org Received: by 2002:ac0:9f50:0:0:0:0:0 with SMTP id l16csp3532349imf; Tue, 1 Mar 2022 02:14:22 -0800 (PST) X-Google-Smtp-Source: ABdhPJz8ZJ5Zbu2A+zBzjB+D7L54t7bzGTUffRvA40/4RWfG1XZQMkeF0bgzqyhw9C28v9xe4bgj X-Received: by 2002:a37:69c6:0:b0:5e9:6a1f:c357 with SMTP id e189-20020a3769c6000000b005e96a1fc357mr13345275qkc.632.1646129662436; Tue, 01 Mar 2022 02:14:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646129662; cv=none; d=google.com; s=arc-20160816; b=sujNOx4i9si5kfbYnal2w0S/w+aVrGRtPC49WLKhIo3Om4K28Beq23rhEmjt6iDP5h g1aUr/jdKa+BRnUYLUGn12BwqgfoOaszvrHuuvVn5ar51WZ3nKq1zky9c3a1gTxJv3bk ppO7NqAplAHQcdXJ2zpddSqvxgIiQNX8+xPAbyofeeQSeB7BFUW7inwuLXVTUQgdrwkR t/vq4UjTCEcaWvO58mSaxT353jwQPho4bBGTPAaC4mybHvyHb0jCmXEDl75z0TaL6H/F X+LP5etYi7bfWMPjnem9ImC/ho8zPdg33tN0HPRDREezmc1BM4auRnlp4RdY9JTLgg/J muOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=2RgP2zpDIIOZAiHgV2LS00sHgCVEIEgHBVaYSoh4o8M=; b=z8Fy2So4uDE4nSmVHd9px4zW4S7iiPMNfctGJioPEyMUupnna0WY8vLgNq8kb0pjDu Mq/fjoqiRNDr+6DC9qVKP54wOBgR0VyI7dvUHQOdavuOIvh45KaHjLecQ3xFF+tcJ46H RokQW/QFG7uYWHD8IPtwk9nmhx+bm/GCtEMWgm79eRJD1eHncZgtEggcG4uxtheEEBtv yFi298wru9ePqcnuDiUGUGfa4rFRlvQnjhP7hQbvhRur2n6Wc2GLub2/qUUR3OK66PGf q2M60s0OIn0wbN2su/4aSsxNAX/3UiXvxre8zt7Xp+vsH4+Ino7LfLrr3PoJG+h8xkFY nmVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=VYOIiBd2; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id gg11-20020a056214252b00b004330832f57fsi2468823qvb.315.2022.03.01.02.14.22 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 01 Mar 2022 02:14:22 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=VYOIiBd2; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:38180 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nOzWQ-00040f-0p for patch@linaro.org; Tue, 01 Mar 2022 05:14:22 -0500 Received: from eggs.gnu.org ([209.51.188.92]:46418) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nOz6V-0003S8-63 for qemu-devel@nongnu.org; Tue, 01 Mar 2022 04:47:36 -0500 Received: from [2a00:1450:4864:20::430] (port=37608 helo=mail-wr1-x430.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nOz6T-00079V-J5 for qemu-devel@nongnu.org; Tue, 01 Mar 2022 04:47:34 -0500 Received: by mail-wr1-x430.google.com with SMTP id bk29so2219276wrb.4 for ; Tue, 01 Mar 2022 01:47:33 -0800 (PST) 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=2RgP2zpDIIOZAiHgV2LS00sHgCVEIEgHBVaYSoh4o8M=; b=VYOIiBd2OCqlXLR+rKb3WdTvegRM/z9aiyaAIFpqZXte/4QnZ27qgQh8kYo7Y3A7B8 HpdxNVSTOFlXXPyDB9PEfVCu1cP19gdTNhTRtdOIFQGHhBnqGM+j+n/dcfS7oM4VAvYn 0GxXKcoQKDpOAhZdrvreZ02TKX46Dqy6XC1yU8ggFHNqe3jCLiGrK73cKAY0RF89WtBO kevf0D6Y43Svjz5pa7a9DhEaiAir0fqElrWgA41ennYEpsHTn4eR7uU7LehRbmLvnelF SNATxrMwbtSz3O6fdUjYgXNU0kGo/65NmRexL4fUxVUXbgqr1l7VdSjEsgkVtTot/ktj XVpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=2RgP2zpDIIOZAiHgV2LS00sHgCVEIEgHBVaYSoh4o8M=; b=T7wcypWwgCzaYJiEPQiOENPwFpP1+ZgAQMma7uSbGOjUWKeRYhisz/4OTvZMjhHK+0 c2I56GIhI3vtgOVPX28CCEwjopdUlCidLiI1Pw0X9/v0OinIVNjLv89di6DeA4zeu+hP 37hJaRPbqKakiXb1ONECGb9OgkKeNqfSh1XRjHAUVrcAE5T5GwwH/2ijmpYPlmDDF/sJ ifvslqok+4ZFgSa+2enI6V7O74BmjeE5Qy1Qss/k3n0U1kgcGzcREEyF+6IyPgS6pdE9 gM1ANxkaHDgMsy5DcWA9fJS5BTAssXkNuphwlgdgfrnbryp8pWwEMfAExTAR6nJ8ANXP Gthg== X-Gm-Message-State: AOAM533il2CeTOkJava602yRP85E+oetgR+yXFrF76YeXo/tsMqXr8oU 7b3hDXAdBC2XcZ2bAtDEjjIGNA== X-Received: by 2002:a5d:5541:0:b0:1ef:607a:798d with SMTP id g1-20020a5d5541000000b001ef607a798dmr15616782wrw.610.1646128052226; Tue, 01 Mar 2022 01:47:32 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id h9-20020adff189000000b001ea913352c9sm13035652wro.100.2022.03.01.01.47.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Mar 2022 01:47:22 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 30A6B1FFC1; Tue, 1 Mar 2022 09:47:16 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 09/18] gitlab: add a new aarch32 custom runner definition Date: Tue, 1 Mar 2022 09:47:06 +0000 Message-Id: <20220301094715.550871-10-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220301094715.550871-1-alex.bennee@linaro.org> References: <20220301094715.550871-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::430 (failed) 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: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 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, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Huth , Beraldo Leal , qemu-devel@nongnu.org, Wainer dos Santos Moschetta , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Alex_B?= =?utf-8?q?enn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Although running on aarch64 hardware we can still target 32bit builds with a cross compiler and run the resulting binaries. Signed-off-by: Alex Bennée Message-Id: <20220225172021.3493923-10-alex.bennee@linaro.org> diff --git a/docs/devel/ci-jobs.rst.inc b/docs/devel/ci-jobs.rst.inc index db3f571d5f..92e25872aa 100644 --- a/docs/devel/ci-jobs.rst.inc +++ b/docs/devel/ci-jobs.rst.inc @@ -44,6 +44,13 @@ If you've got access to an aarch64 host that can be used as a gitlab-CI runner, you can set this variable to enable the tests that require this kind of host. The runner should be tagged with "aarch64". +AARCH32_RUNNER_AVAILABLE +~~~~~~~~~~~~~~~~~~~~~~~~ +If you've got access to an armhf host or an arch64 host that can run +aarch32 EL0 code to be used as a gitlab-CI runner, you can set this +variable to enable the tests that require this kind of host. The +runner should be tagged with "aarch32". + S390X_RUNNER_AVAILABLE ~~~~~~~~~~~~~~~~~~~~~~ If you've got access to an IBM Z host that can be used as a gitlab-CI diff --git a/.gitlab-ci.d/custom-runners/ubuntu-20.40-aarch32.yml b/.gitlab-ci.d/custom-runners/ubuntu-20.40-aarch32.yml new file mode 100644 index 0000000000..9c589bc4cf --- /dev/null +++ b/.gitlab-ci.d/custom-runners/ubuntu-20.40-aarch32.yml @@ -0,0 +1,23 @@ +# All ubuntu-20.04 jobs should run successfully in an environment +# setup by the scripts/ci/setup/qemu/build-environment.yml task +# "Install basic packages to build QEMU on Ubuntu 18.04/20.04" + +ubuntu-20.04-aarch32-all: + needs: [] + stage: build + tags: + - ubuntu_20.04 + - aarch32 + rules: + - if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH =~ /^staging/' + when: manual + allow_failure: true + - if: "$AARCH32_RUNNER_AVAILABLE" + when: manual + allow_failure: true + script: + - mkdir build + - cd build + - ../configure --cross-prefix=arm-linux-gnueabihf- + - make --output-sync -j`nproc` + - make --output-sync -j`nproc` check V=1 From patchwork Tue Mar 1 09:47:07 2022 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: 547245 Delivered-To: patch@linaro.org Received: by 2002:ac0:9f50:0:0:0:0:0 with SMTP id l16csp3521688imf; Tue, 1 Mar 2022 01:58:24 -0800 (PST) X-Google-Smtp-Source: ABdhPJx/jznqsvwkeVt0hrHzHPHgQFJpt7nrj8QxSrK/xB430R/FuEyE6zWmb7NkdISRX7kA6PwC X-Received: by 2002:ac8:4e8c:0:b0:2de:a2f9:15cb with SMTP id 12-20020ac84e8c000000b002dea2f915cbmr18760552qtp.385.1646128704427; Tue, 01 Mar 2022 01:58:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646128704; cv=none; d=google.com; s=arc-20160816; b=qCF6Z1ia08ZDEpR2jWoZJ897ymhcuH7rdWT4K94zeXZQnopFOoFUz7eqYkyLtxvDi/ HWWDibyW+uGpYwn4zSE17rrYQcdndwuCqVTxMUlUbqIBvSrjtCKs+TymYN9fKd+cL01l tUJKn61frFmEQQHlIzzImhy208yNsqBCDwHmKn1bu2fuozxcohW9H5dE6aeFye//JmTf Hu4EefSQScUN00j5cgd4wsS7YK/Sl2t2MSx3LqfffAlfhwiHuhKhkR3BJbHtnuHjmXxx FVIDYt7GLqAusO6Vh/m8OdsJJ2/oSD1sy6aNe7S9PSPMy7o2W/65dXq5JQcv9Oiotm49 JJiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=FQ+h9Whzspn2FeDhefPTKuXX0JogRqseFVyd+c+eLhE=; b=D1VFTVT0RWdpYUzA3uzWST3pIMBaaJesVlZ0kNLXoLtbrlaClvwIepGEs8m2xAwUNb zK+6PUSS7uhQWiZRCs+Fy/kfupH0y2bUPAVWh4RylosMYiLMBGt1YA3iNJ6A+hqCidM6 K63TBpVpNh4oxtYT8KJklMaSdgsFHveBkkF+CvEKyLzBmnpFSCe0zoqEQH0dpxrp68HR yWmyOz7Y2k9F4nrM2/6CacIa+QVgW35D0kc86F9UXnKOOugipqZrn9ash1w0d6LQKkTk CK3YltB5ix05XHxRCW4p3Pgcn3n4uVxItMLKPpu6hxJ+/mUDQuKhMq/eYWrDJJw++KMe O5VA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=ui4tVcwT; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id g19-20020ac87753000000b002de06b8c0bcsi3735315qtu.551.2022.03.01.01.58.24 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 01 Mar 2022 01:58:24 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=ui4tVcwT; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:35784 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nOzGy-0008FS-1M for patch@linaro.org; Tue, 01 Mar 2022 04:58:24 -0500 Received: from eggs.gnu.org ([209.51.188.92]:46354) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nOz6T-0003QZ-MK for qemu-devel@nongnu.org; Tue, 01 Mar 2022 04:47:34 -0500 Received: from [2a00:1450:4864:20::333] (port=37462 helo=mail-wm1-x333.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nOz6S-00078v-0v for qemu-devel@nongnu.org; Tue, 01 Mar 2022 04:47:33 -0500 Received: by mail-wm1-x333.google.com with SMTP id q7-20020a7bce87000000b00382255f4ca9so388000wmj.2 for ; Tue, 01 Mar 2022 01:47:31 -0800 (PST) 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=FQ+h9Whzspn2FeDhefPTKuXX0JogRqseFVyd+c+eLhE=; b=ui4tVcwTbAZnifNSRRu67Lpt7JlTT36WeN7wsgDnGl6/AALXX8DEy5zC6bqgbAv005 QrBSQvs6uBqBOCfy0Oem1Kt6TH50j+Ut4KcTs7KtM5vgEstTEENlYh3HHP64twEOnjFc QSaEAa7HUaX5wVmEbKtdaVe7vSODJaUkTdQogfLm6L+kRpJvZPrGcfecXY758/sWFGi3 6DHQdvprKkGir6L4wZH3tNZQLyj2+rH0IomJa5wi6825SQZVXcCni57UIej0xWULlGUV HzX+P5r9OvT7vPuy0lFtxfb8injo4t1oG1AOUW56ri1jxPkWE/aZcur8DwX2uvZIQSWZ 3cjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=FQ+h9Whzspn2FeDhefPTKuXX0JogRqseFVyd+c+eLhE=; b=Ipwe/rJ0Q3hlhu0wDgcTB6W1XnOPetqvUi9dGsdQhcLa++x3HScv4Eez9Wvd3fIJew 1V9RcQWEET0sYJ0dtlcTSqrxHn9zaeVFve248lQjyCxCXZ9XhLqeTD0T+y4dadA9PWfH vdTaKEjIdqM5iPkUURstv7N8AVzYs9Jkqth2KHuFt7VeQopw10RZXjRjqTTiVXasHljo 4I/ThIw9k/7y/oJK56PTuck7IvGK6bpewr4UrbuG7t5cgv6sSdVBffNK0DB4OF/YfwdL bmDzYRwD6FKZjTb199rwP6o3qQDkvHSKHWmfIu28w8HUjLEV13JodoP6uF/sQLMvaSBm X5gQ== X-Gm-Message-State: AOAM533YOj4fnVoOttwSVCbiKieY39sexC010uMGpX6OVQRzGVQB9qKk hzArJRBCYyblpkvUkf0JOwes2w== X-Received: by 2002:a05:600c:3d98:b0:381:738e:d675 with SMTP id bi24-20020a05600c3d9800b00381738ed675mr5372352wmb.7.1646128050574; Tue, 01 Mar 2022 01:47:30 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id m6-20020a5d56c6000000b001edb64e69cdsm13099581wrw.15.2022.03.01.01.47.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Mar 2022 01:47:22 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 3BAE11FFC2; Tue, 1 Mar 2022 09:47:16 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 10/18] tests/tcg/ppc64: clean-up handling of byte-reverse Date: Tue, 1 Mar 2022 09:47:07 +0000 Message-Id: <20220301094715.550871-11-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220301094715.550871-1-alex.bennee@linaro.org> References: <20220301094715.550871-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::333 (failed) 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: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 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, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Richard Henderson , =?utf-8?q?Alex_Benn?= =?utf-8?q?=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Rather than having an else leg for the missing compiler case we can simply just not add the test - the same way as is done for ppc64le. Also while we are at it fix up the compiler invocation. Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson Message-Id: <20220225172021.3493923-11-alex.bennee@linaro.org> diff --git a/tests/tcg/ppc64/Makefile.target b/tests/tcg/ppc64/Makefile.target index 0368007028..9d6dfc1e26 100644 --- a/tests/tcg/ppc64/Makefile.target +++ b/tests/tcg/ppc64/Makefile.target @@ -10,19 +10,14 @@ PPC64_TESTS=bcdsub non_signalling_xscv endif $(PPC64_TESTS): CFLAGS += -mpower8-vector -PPC64_TESTS += byte_reverse PPC64_TESTS += mtfsf + ifneq ($(DOCKER_IMAGE)$(CROSS_CC_HAS_POWER10),) +PPC64_TESTS += byte_reverse +endif +byte_reverse: CFLAGS += -mcpu=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 PPC64_TESTS += signal_save_restore_xer From patchwork Tue Mar 1 09:47:08 2022 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: 547247 Delivered-To: patch@linaro.org Received: by 2002:ac0:9f50:0:0:0:0:0 with SMTP id l16csp3525162imf; Tue, 1 Mar 2022 02:03:13 -0800 (PST) X-Google-Smtp-Source: ABdhPJwNGnqjADGzXQ5OutDa7Qdx+zowWR33VthG7f5bHEX3S2CwMMCGg3jU0IOeDRiKbaw9aWj5 X-Received: by 2002:ac8:5cc9:0:b0:2de:8838:5888 with SMTP id s9-20020ac85cc9000000b002de88385888mr19896490qta.370.1646128993828; Tue, 01 Mar 2022 02:03:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646128993; cv=none; d=google.com; s=arc-20160816; b=oPIxrAGKhjQc+Hp98+Jtc1BemdS3Aq3MCrFzFFywleOpwkd0HA2T4mqDQwtmUzUXGV fkq2cGCm2zxt6ddM13iC5S0L07Gw7lm7/5qu88AOUr+s6XvmrvKnu02+JT+0dmlWmExz Hl67OHpNSLgkhyS1thSvVqPAFMqxZ/PnhwxA2z6QRVd3jSnGOsPyOKPggI5amYUtcJsK i+PIWU5kazWIJJhJsEOok7mJq9JWXEVtcNnZ3rO5Mm4zJYFlw0FVFAvk7lrlqy8phefU RVPZNY2EWBijOmhZsUBBoW/RJGwmeX9xsEbSK2hkTRLotSG9FLMMOEdKcuUOLsZlMiPa HrAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=b2Z0r2dk3nkd5RgGjI14HIVrBPtONff7YVlY3kctiMs=; b=b18/Rhl/KnwB/Ru6ViBl6ky7yvk90lkB5xxcdTRVOXt5ZJZ7OrgtzAjS9K1kwpfV2l iyZ4OF1LjFdazFh3kSgFJMcI+bppmaPWKEgAM3fNOnbdgsmprTCgNp/uGNtZ3oNldpMp W3R4q6Diws+sypNb1ysBSkfUtUbT+PzGjPE6rcKCozZ82KFpZwfgt1asx6pWr42mIL2j 0rkA6u1AWcYAJHWqIeNcvzJ3Lav/tYxxofCqE0K2TVrfe5Vh3mnA/alQ9D4HCsSJSjjh aeybF0AaAqpbIlDQF23sD+DryqXgO6adCFzBp1wFih63Ek2uJ3wn1Y7XYUQpArcFPZfP +wfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=WPnrJmwg; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 62-20020a370941000000b004771fcd18ffsi3938473qkj.486.2022.03.01.02.03.13 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 01 Mar 2022 02:03:13 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=WPnrJmwg; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:43224 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nOzLd-0005AA-Av for patch@linaro.org; Tue, 01 Mar 2022 05:03:13 -0500 Received: from eggs.gnu.org ([209.51.188.92]:49606) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nOzF1-00080O-81 for qemu-devel@nongnu.org; Tue, 01 Mar 2022 04:56:23 -0500 Received: from [2a00:1450:4864:20::633] (port=33572 helo=mail-ej1-x633.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nOzEz-0001y0-Od for qemu-devel@nongnu.org; Tue, 01 Mar 2022 04:56:22 -0500 Received: by mail-ej1-x633.google.com with SMTP id kt27so1247410ejb.0 for ; Tue, 01 Mar 2022 01:56:21 -0800 (PST) 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=b2Z0r2dk3nkd5RgGjI14HIVrBPtONff7YVlY3kctiMs=; b=WPnrJmwgEP84fCzrTeorjz+ynrjgdEquH379tGHlHYGpvryb1acxWJUdhsEE3AY0ka 9UBgb4Abcd8QeTWQO5eBGSNaM5Ghg2Fgf0a9/L+AjhusZ+bAFVupyJ9EM3bApvOHOyUu WJtWQn9wt0nvwX2JrMJh3odqOtLaM5VI6w98EdwQrNQ/HrGfZNJaJhG3X/Aqh+1Zt1XK dvVB6L/yN1aU4oN//etdB7I1/RK5Mi+W2gpQuXCHXYODCSkX/L4brdvFsq9bW4hacOhA y4y0X8VESy5efiOyYht3b8F3M5SjyWfNpC3ltAnLa9sneJ0SVHwQ3UvOcvJSfO1Doi64 e9yA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=b2Z0r2dk3nkd5RgGjI14HIVrBPtONff7YVlY3kctiMs=; b=LLj7Z1q3MvqrCTm9PbgjJ10eosgpqUhkS1Xiq0Jwf2GDlAfSV0KdpKNQ4fwVMjvpq1 mqtCboppb7DDwUVQgbVVkfkSo38QpqdTwhMydyU+FWYnYKChStscj1x9OvZARCs+MCMh WaIqb3HW2YPUVCYweXRXqk4IqwDmtEufjpWY4QxAf2oYXBsGm0QK7JGF0c2AkiuvzdZY MN80BLKLCrie4x4jUfXK4x2ijVa0ZltKMhX1qtkBna/2UTkZ6398ZHNyEDDYBUanoaeS RQgqKsTofN9e32Hr/WsztCM5glrTmEiOutGW1NeG1kloiWe6Ab/potzfGTzuUNBhZB7H o6og== X-Gm-Message-State: AOAM533hM9kAb3qpASX6rmMxcjY1YbMZDebAxKtE5WhgpWLlFYnuVISb ggCy5ROCcz3vsNYo7N515m1IaQ== X-Received: by 2002:a17:906:6848:b0:6cf:6273:9c47 with SMTP id a8-20020a170906684800b006cf62739c47mr19020774ejs.1.1646128580467; Tue, 01 Mar 2022 01:56:20 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id f15-20020a50e08f000000b004134a121ed2sm7153506edl.82.2022.03.01.01.56.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Mar 2022 01:56:16 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 5389D1FFC3; Tue, 1 Mar 2022 09:47:16 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 11/18] tests/tcg: build sha1-vector with O3 and compare Date: Tue, 1 Mar 2022 09:47:08 +0000 Message-Id: <20220301094715.550871-12-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220301094715.550871-1-alex.bennee@linaro.org> References: <20220301094715.550871-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::633 (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::633; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x633.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 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, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Richard Henderson , "open list:ARM TCG CPUs" , =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" The aim of this is to test code generation for vectorised operations. Unfortunately gcc struggles to do much with the messy sha1 code (try -fopt-info-vec-missed to see why). However it's better than nothing. We assume the non-vectorised output is gold and baring compiler bugs the outputs should match. Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson Message-Id: <20220225172021.3493923-12-alex.bennee@linaro.org> diff --git a/tests/tcg/aarch64/Makefile.target b/tests/tcg/aarch64/Makefile.target index 1d967901bd..df3f8e9438 100644 --- a/tests/tcg/aarch64/Makefile.target +++ b/tests/tcg/aarch64/Makefile.target @@ -50,6 +50,16 @@ sysregs: CFLAGS+=-march=armv8.1-a+sve AARCH64_TESTS += sve-ioctls sve-ioctls: CFLAGS+=-march=armv8.1-a+sve +# Vector SHA1 +sha1-vector: CFLAGS=-O3 +sha1-vector: sha1.c + $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $< -o $@ $(LDFLAGS) +run-sha1-vector: sha1-vector run-sha1 + $(call run-test, $<, $(QEMU) $(QEMU_OPTS) $<, "$< on $(TARGET_NAME)") + $(call diff-out, sha1-vector, sha1.out) + +TESTS += sha1-vector + ifneq ($(HAVE_GDB_BIN),) GDB_SCRIPT=$(SRC_PATH)/tests/guest-debug/run-test.py diff --git a/tests/tcg/arm/Makefile.target b/tests/tcg/arm/Makefile.target index f509d823d4..2dc94931c3 100644 --- a/tests/tcg/arm/Makefile.target +++ b/tests/tcg/arm/Makefile.target @@ -70,6 +70,15 @@ endif ARM_TESTS += commpage +# Vector SHA1 +sha1-vector: CFLAGS=-O3 +sha1-vector: sha1.c + $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $< -o $@ $(LDFLAGS) +run-sha1-vector: sha1-vector run-sha1 + $(call run-test, $<, $(QEMU) $(QEMU_OPTS) $<, "$< on $(TARGET_NAME)") + $(call diff-out, sha1-vector, sha1.out) + +ARM_TESTS += sha1-vector TESTS += $(ARM_TESTS) # On ARM Linux only supports 4k pages From patchwork Tue Mar 1 09:47:09 2022 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: 547255 Delivered-To: patch@linaro.org Received: by 2002:ac0:9f50:0:0:0:0:0 with SMTP id l16csp3533238imf; Tue, 1 Mar 2022 02:15:56 -0800 (PST) X-Google-Smtp-Source: ABdhPJw04smXHoXjgppb5XwDb9Mud+B3P3nUpTXV0qb8v5YfDvmL9VOCL+pzLZQXOcYAQmaJT1Kn X-Received: by 2002:a37:9e41:0:b0:47a:99a7:b7a7 with SMTP id h62-20020a379e41000000b0047a99a7b7a7mr13616103qke.496.1646129756363; Tue, 01 Mar 2022 02:15:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646129756; cv=none; d=google.com; s=arc-20160816; b=mFf01Mlc9sr9XSoiLMdp7iFfJ77ylF9aiaxwMoPylhDn8VgVmCIy7u/0xmlA4s5qZN GzUq+RiOKVHaTdG0Qg1FqaB/mIO/Y/1hZOiM3Wuq7oyhYkKlm9ZJ7vHpZJD69vL6vScD RdVlJtfmcS3oTy5KiBCyxUXzZTqsGz8nJBRBlKizUzSZWyLHAoKXGvZ26kdGAgFOvYyL L9a+NWMisIkifM767NLssYs07b53Ef9B9gOTcJj/uIaLco5NunEIaE4l9xJFXKzxggow YeH0YAuDf/CpToen1DRGHCrO84xHDt4WsKR5eJcM92ATa22MRgmq7HcAtymHNV8NgJFH 5ejg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=JMSzN0V7qqMhXNdJ0cAV47HV374Pg6FHXZw2xqOhSFA=; b=zNup8vR5UKVfUVr5ofLE5up3++eZC3I1DHeV1gz3aY0FvwTrbTjbUKKmM7xaU+8MII dneGlvq4cEufK/x72aaKCK3g1zcTDhbXZNmzAyF7BDf17Rg4wgtuRZBvlIxLdBVdc45s eRdUpgnScwYq1uzarl492XKlJj9L2Xd1FEzxAIapgvVPFRQXwBsU8ZVJcGU3D4Trjg89 +jF5+VC9EWxcQD5w+hiolIiJk+1RbPZ7KN+lKOfnHXKcTHofE3l6JVeJbi/jfJcPJqCt 5gMM9cV4Mq3rvJ0tYHm6fEJDuBNHpylcwUK3VveoWPjqr4mFI9BnUJMcf0JEqoGA81yX QvpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=YFab4Zma; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id j5-20020ac806c5000000b002dd5e204b70si3910769qth.24.2022.03.01.02.15.56 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 01 Mar 2022 02:15:56 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=YFab4Zma; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:39784 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nOzXv-000578-Sg for patch@linaro.org; Tue, 01 Mar 2022 05:15:55 -0500 Received: from eggs.gnu.org ([209.51.188.92]:46512) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nOz6Y-0003Ts-Jr for qemu-devel@nongnu.org; Tue, 01 Mar 2022 04:47:41 -0500 Received: from [2a00:1450:4864:20::42c] (port=44831 helo=mail-wr1-x42c.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nOz6U-00079s-Pa for qemu-devel@nongnu.org; Tue, 01 Mar 2022 04:47:38 -0500 Received: by mail-wr1-x42c.google.com with SMTP id u1so19493758wrg.11 for ; Tue, 01 Mar 2022 01:47:34 -0800 (PST) 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=JMSzN0V7qqMhXNdJ0cAV47HV374Pg6FHXZw2xqOhSFA=; b=YFab4ZmaGgtM4tpTRa9u38EuvTPCgf2d3ij7uvnGTgNTXPlgL4MrTY2q0Pzk/h8HkJ a6X3gijpoRys5uZrVclUn9+v1sTry32v0kV6Eji6GDrjvB89kn8R4uS1MBy8hChfkXHO Uq9D1w7cb3Xzfc1fuN6KMg1DLRB2zCS9BsaBRma7CqEYOu9tFfTiyJZ0wgSyXuSYSZiM dIqcwmcynzavq/gMPtkkXskL8ilF6rwZpPmyjVpFeYuBqh6FFEQHtaHuhioW7Trl03KD gUE47aEp403RrjD/AurCAahDJqoeftSRqugwOfX5SCdn+vbxw/MCvY3giinvQDzkGgyV zdOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=JMSzN0V7qqMhXNdJ0cAV47HV374Pg6FHXZw2xqOhSFA=; b=B41zcXod+qCnb4wVan04/U7YZsWo7C/5Ax1QmvqljFXC1ZNTBcY71S27yZgP1gxhl7 bgSpAaBkGLV2t6x8a7qWQQs2tBEPlGZ7D+r4er+XVuOEcyo9MqeYfcE65JS7lUnEuzwS FLhdi1mslt4SU9ogcihoR2fo2WWt8CzseUVYWsx+AiqZV7qhdS9vD3p68yShadsDBggl 0RxxHRXV5gTT7a9PbHL+QV/ZlFnXpNPDSwJRzhJU1GdSKiEvDrv7dJnzuXjOuJOz/FWc G0nHJZaWZqZGqofhkcze4PXG0V2k8SmCFyVqUntvU5NFna9ZNfnHDGcNBd5640tNxZPs 7I+w== X-Gm-Message-State: AOAM5310PkqWyHfRyhuxvBAYNpH2RZp8ZnCGzheyRoTro2QWa8GJESEi L9kD0lPJ3KFE5Xu5ERaw/6gEAw== X-Received: by 2002:adf:ec07:0:b0:1f0:b11:d094 with SMTP id x7-20020adfec07000000b001f00b11d094mr1811239wrn.414.1646128053076; Tue, 01 Mar 2022 01:47:33 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id n7-20020a5d51c7000000b001a38105483dsm13067800wrv.24.2022.03.01.01.47.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Mar 2022 01:47:22 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 684361FFC4; Tue, 1 Mar 2022 09:47:16 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 12/18] tests/tcg: add sha512 test Date: Tue, 1 Mar 2022 09:47:09 +0000 Message-Id: <20220301094715.550871-13-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220301094715.550871-1-alex.bennee@linaro.org> References: <20220301094715.550871-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::42c (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42c.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 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, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Richard Henderson , =?utf-8?q?Alex_Benn?= =?utf-8?q?=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" This imports the sha512 algorithm and related tests from ccan which offers a cleaner hash implementation with its own validation tests with which we can exercise TCG code generations. Signed-off-by: Alex Bennée Acked-by: Richard Henderson Message-Id: <20220225172021.3493923-13-alex.bennee@linaro.org> diff --git a/tests/tcg/multiarch/sha512.c b/tests/tcg/multiarch/sha512.c new file mode 100644 index 0000000000..e1729828b9 --- /dev/null +++ b/tests/tcg/multiarch/sha512.c @@ -0,0 +1,990 @@ +/* + * sha512 test based on CCAN: https://ccodearchive.net/info/crypto/sha512.html + * + * src/crypto/sha512.cpp commit f914f1a746d7f91951c1da262a4a749dd3ebfa71 + * Copyright (c) 2014 The Bitcoin Core developers + * Distributed under the MIT software license, see: + * http://www.opensource.org/licenses/mit-license.php. + * + * SPDX-License-Identifier: MIT CC0-1.0 + */ +#define _GNU_SOURCE /* See feature_test_macros(7) */ + +#include +#include +#include +#include +#include +#include + +/* Required portions from endian.h */ + +/** + * BSWAP_64 - reverse bytes in a constant uint64_t value. + * @val: constantvalue whose bytes to swap. + * + * Designed to be usable in constant-requiring initializers. + * + * Example: + * struct mystruct { + * char buf[BSWAP_64(0xff00000000000000ULL)]; + * }; + */ +#define BSWAP_64(val) \ + ((((uint64_t)(val) & 0x00000000000000ffULL) << 56) \ + | (((uint64_t)(val) & 0x000000000000ff00ULL) << 40) \ + | (((uint64_t)(val) & 0x0000000000ff0000ULL) << 24) \ + | (((uint64_t)(val) & 0x00000000ff000000ULL) << 8) \ + | (((uint64_t)(val) & 0x000000ff00000000ULL) >> 8) \ + | (((uint64_t)(val) & 0x0000ff0000000000ULL) >> 24) \ + | (((uint64_t)(val) & 0x00ff000000000000ULL) >> 40) \ + | (((uint64_t)(val) & 0xff00000000000000ULL) >> 56)) + + +typedef uint64_t beint64_t; + +#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ + +/** + * CPU_TO_BE64 - convert a constant uint64_t value to big-endian + * @native: constant to convert + */ +#define CPU_TO_BE64(native) ((beint64_t)(native)) +/** + * BE64_TO_CPU - convert a big-endian uint64_t constant + * @le_val: big-endian constant to convert + */ +#define BE64_TO_CPU(le_val) ((uint64_t)(le_val)) + +#else /* ... HAVE_LITTLE_ENDIAN */ +#define CPU_TO_BE64(native) ((beint64_t)BSWAP_64(native)) +#define BE64_TO_CPU(le_val) BSWAP_64((uint64_t)le_val) +#endif /* HAVE_LITTE_ENDIAN */ + +/** + * cpu_to_be64 - convert a uint64_t value to big endian. + * @native: value to convert + */ +static inline beint64_t cpu_to_be64(uint64_t native) +{ + return CPU_TO_BE64(native); +} + +/** + * be64_to_cpu - convert a big-endian uint64_t value + * @be_val: big-endian value to convert + */ +static inline uint64_t be64_to_cpu(beint64_t be_val) +{ + return BE64_TO_CPU(be_val); +} + +/* From compiler.h */ + +#ifndef UNUSED +/** + * UNUSED - a parameter is unused + * + * Some compilers (eg. gcc with -W or -Wunused) warn about unused + * function parameters. This suppresses such warnings and indicates + * to the reader that it's deliberate. + * + * Example: + * // This is used as a callback, so needs to have this prototype. + * static int some_callback(void *unused UNUSED) + * { + * return 0; + * } + */ +#define UNUSED __attribute__((__unused__)) +#endif + +/* From sha512.h */ + +/** + * struct sha512 - structure representing a completed SHA512. + * @u.u8: an unsigned char array. + * @u.u64: a 64-bit integer array. + * + * Other fields may be added to the union in future. + */ +struct sha512 { + union { + uint64_t u64[8]; + unsigned char u8[64]; + } u; +}; + +/** + * sha512 - return sha512 of an object. + * @sha512: the sha512 to fill in + * @p: pointer to memory, + * @size: the number of bytes pointed to by @p + * + * The bytes pointed to by @p is SHA512 hashed into @sha512. This is + * equivalent to sha512_init(), sha512_update() then sha512_done(). + */ +void sha512(struct sha512 *sha, const void *p, size_t size); + +/** + * struct sha512_ctx - structure to store running context for sha512 + */ +struct sha512_ctx { + uint64_t s[8]; + union { + uint64_t u64[16]; + unsigned char u8[128]; + } buf; + size_t bytes; +}; + +/** + * sha512_init - initialize an SHA512 context. + * @ctx: the sha512_ctx to initialize + * + * This must be called before sha512_update or sha512_done, or + * alternately you can assign SHA512_INIT. + * + * If it was already initialized, this forgets anything which was + * hashed before. + * + * Example: + * static void hash_all(const char **arr, struct sha512 *hash) + * { + * size_t i; + * struct sha512_ctx ctx; + * + * sha512_init(&ctx); + * for (i = 0; arr[i]; i++) + * sha512_update(&ctx, arr[i], strlen(arr[i])); + * sha512_done(&ctx, hash); + * } + */ +void sha512_init(struct sha512_ctx *ctx); + +/** + * SHA512_INIT - initializer for an SHA512 context. + * + * This can be used to statically initialize an SHA512 context (instead + * of sha512_init()). + * + * Example: + * static void hash_all(const char **arr, struct sha512 *hash) + * { + * size_t i; + * struct sha512_ctx ctx = SHA512_INIT; + * + * for (i = 0; arr[i]; i++) + * sha512_update(&ctx, arr[i], strlen(arr[i])); + * sha512_done(&ctx, hash); + * } + */ +#define SHA512_INIT \ + { { 0x6a09e667f3bcc908ull, 0xbb67ae8584caa73bull, \ + 0x3c6ef372fe94f82bull, 0xa54ff53a5f1d36f1ull, \ + 0x510e527fade682d1ull, 0x9b05688c2b3e6c1full, \ + 0x1f83d9abfb41bd6bull, 0x5be0cd19137e2179ull }, \ + { { 0 } }, 0 } + +/** + * sha512_update - include some memory in the hash. + * @ctx: the sha512_ctx to use + * @p: pointer to memory, + * @size: the number of bytes pointed to by @p + * + * You can call this multiple times to hash more data, before calling + * sha512_done(). + */ +void sha512_update(struct sha512_ctx *ctx, const void *p, size_t size); + +/** + * sha512_done - finish SHA512 and return the hash + * @ctx: the sha512_ctx to complete + * @res: the hash to return. + * + * Note that @ctx is *destroyed* by this, and must be reinitialized. + * To avoid that, pass a copy instead. + */ +void sha512_done(struct sha512_ctx *sha512, struct sha512 *res); + +/* From sha512.c */ + +/* + * SHA512 core code translated from the Bitcoin project's C++: + * + * src/crypto/sha512.cpp commit f914f1a746d7f91951c1da262a4a749dd3ebfa71 + * Copyright (c) 2014 The Bitcoin Core developers + * Distributed under the MIT software license, see the accompanying + * file COPYING or http://www.opensource.org/licenses/mit-license.php. + */ +/* #include */ +/* #include */ +#include +#include +#include + +static void invalidate_sha512(struct sha512_ctx *ctx) +{ + ctx->bytes = (size_t)-1; +} + +static void check_sha512(struct sha512_ctx *ctx UNUSED) +{ + assert(ctx->bytes != (size_t)-1); +} + +static uint64_t Ch(uint64_t x, uint64_t y, uint64_t z) +{ + return z ^ (x & (y ^ z)); +} +static uint64_t Maj(uint64_t x, uint64_t y, uint64_t z) +{ + return (x & y) | (z & (x | y)); +} +static uint64_t Sigma0(uint64_t x) +{ + return (x >> 28 | x << 36) ^ (x >> 34 | x << 30) ^ (x >> 39 | x << 25); +} +static uint64_t Sigma1(uint64_t x) +{ + return (x >> 14 | x << 50) ^ (x >> 18 | x << 46) ^ (x >> 41 | x << 23); +} +static uint64_t sigma0(uint64_t x) +{ + return (x >> 1 | x << 63) ^ (x >> 8 | x << 56) ^ (x >> 7); +} +static uint64_t sigma1(uint64_t x) +{ + return (x >> 19 | x << 45) ^ (x >> 61 | x << 3) ^ (x >> 6); +} + +/** One round of SHA-512. */ +static void Round(uint64_t a, uint64_t b, uint64_t c, uint64_t *d, uint64_t e, uint64_t f, uint64_t g, uint64_t *h, uint64_t k, uint64_t w) +{ + uint64_t t1 = *h + Sigma1(e) + Ch(e, f, g) + k + w; + uint64_t t2 = Sigma0(a) + Maj(a, b, c); + *d += t1; + *h = t1 + t2; +} + +/** Perform one SHA-512 transformation, processing a 128-byte chunk. */ +static void Transform(uint64_t *s, const uint64_t *chunk) +{ + uint64_t a = s[0], b = s[1], c = s[2], d = s[3], e = s[4], f = s[5], g = s[6], h = s[7]; + uint64_t w0, w1, w2, w3, w4, w5, w6, w7, w8, w9, w10, w11, w12, w13, w14, w15; + + Round(a, b, c, &d, e, f, g, &h, 0x428a2f98d728ae22ull, w0 = be64_to_cpu(chunk[0])); + Round(h, a, b, &c, d, e, f, &g, 0x7137449123ef65cdull, w1 = be64_to_cpu(chunk[1])); + Round(g, h, a, &b, c, d, e, &f, 0xb5c0fbcfec4d3b2full, w2 = be64_to_cpu(chunk[2])); + Round(f, g, h, &a, b, c, d, &e, 0xe9b5dba58189dbbcull, w3 = be64_to_cpu(chunk[3])); + Round(e, f, g, &h, a, b, c, &d, 0x3956c25bf348b538ull, w4 = be64_to_cpu(chunk[4])); + Round(d, e, f, &g, h, a, b, &c, 0x59f111f1b605d019ull, w5 = be64_to_cpu(chunk[5])); + Round(c, d, e, &f, g, h, a, &b, 0x923f82a4af194f9bull, w6 = be64_to_cpu(chunk[6])); + Round(b, c, d, &e, f, g, h, &a, 0xab1c5ed5da6d8118ull, w7 = be64_to_cpu(chunk[7])); + Round(a, b, c, &d, e, f, g, &h, 0xd807aa98a3030242ull, w8 = be64_to_cpu(chunk[8])); + Round(h, a, b, &c, d, e, f, &g, 0x12835b0145706fbeull, w9 = be64_to_cpu(chunk[9])); + Round(g, h, a, &b, c, d, e, &f, 0x243185be4ee4b28cull, w10 = be64_to_cpu(chunk[10])); + Round(f, g, h, &a, b, c, d, &e, 0x550c7dc3d5ffb4e2ull, w11 = be64_to_cpu(chunk[11])); + Round(e, f, g, &h, a, b, c, &d, 0x72be5d74f27b896full, w12 = be64_to_cpu(chunk[12])); + Round(d, e, f, &g, h, a, b, &c, 0x80deb1fe3b1696b1ull, w13 = be64_to_cpu(chunk[13])); + Round(c, d, e, &f, g, h, a, &b, 0x9bdc06a725c71235ull, w14 = be64_to_cpu(chunk[14])); + Round(b, c, d, &e, f, g, h, &a, 0xc19bf174cf692694ull, w15 = be64_to_cpu(chunk[15])); + + Round(a, b, c, &d, e, f, g, &h, 0xe49b69c19ef14ad2ull, w0 += sigma1(w14) + w9 + sigma0(w1)); + Round(h, a, b, &c, d, e, f, &g, 0xefbe4786384f25e3ull, w1 += sigma1(w15) + w10 + sigma0(w2)); + Round(g, h, a, &b, c, d, e, &f, 0x0fc19dc68b8cd5b5ull, w2 += sigma1(w0) + w11 + sigma0(w3)); + Round(f, g, h, &a, b, c, d, &e, 0x240ca1cc77ac9c65ull, w3 += sigma1(w1) + w12 + sigma0(w4)); + Round(e, f, g, &h, a, b, c, &d, 0x2de92c6f592b0275ull, w4 += sigma1(w2) + w13 + sigma0(w5)); + Round(d, e, f, &g, h, a, b, &c, 0x4a7484aa6ea6e483ull, w5 += sigma1(w3) + w14 + sigma0(w6)); + Round(c, d, e, &f, g, h, a, &b, 0x5cb0a9dcbd41fbd4ull, w6 += sigma1(w4) + w15 + sigma0(w7)); + Round(b, c, d, &e, f, g, h, &a, 0x76f988da831153b5ull, w7 += sigma1(w5) + w0 + sigma0(w8)); + Round(a, b, c, &d, e, f, g, &h, 0x983e5152ee66dfabull, w8 += sigma1(w6) + w1 + sigma0(w9)); + Round(h, a, b, &c, d, e, f, &g, 0xa831c66d2db43210ull, w9 += sigma1(w7) + w2 + sigma0(w10)); + Round(g, h, a, &b, c, d, e, &f, 0xb00327c898fb213full, w10 += sigma1(w8) + w3 + sigma0(w11)); + Round(f, g, h, &a, b, c, d, &e, 0xbf597fc7beef0ee4ull, w11 += sigma1(w9) + w4 + sigma0(w12)); + Round(e, f, g, &h, a, b, c, &d, 0xc6e00bf33da88fc2ull, w12 += sigma1(w10) + w5 + sigma0(w13)); + Round(d, e, f, &g, h, a, b, &c, 0xd5a79147930aa725ull, w13 += sigma1(w11) + w6 + sigma0(w14)); + Round(c, d, e, &f, g, h, a, &b, 0x06ca6351e003826full, w14 += sigma1(w12) + w7 + sigma0(w15)); + Round(b, c, d, &e, f, g, h, &a, 0x142929670a0e6e70ull, w15 += sigma1(w13) + w8 + sigma0(w0)); + + Round(a, b, c, &d, e, f, g, &h, 0x27b70a8546d22ffcull, w0 += sigma1(w14) + w9 + sigma0(w1)); + Round(h, a, b, &c, d, e, f, &g, 0x2e1b21385c26c926ull, w1 += sigma1(w15) + w10 + sigma0(w2)); + Round(g, h, a, &b, c, d, e, &f, 0x4d2c6dfc5ac42aedull, w2 += sigma1(w0) + w11 + sigma0(w3)); + Round(f, g, h, &a, b, c, d, &e, 0x53380d139d95b3dfull, w3 += sigma1(w1) + w12 + sigma0(w4)); + Round(e, f, g, &h, a, b, c, &d, 0x650a73548baf63deull, w4 += sigma1(w2) + w13 + sigma0(w5)); + Round(d, e, f, &g, h, a, b, &c, 0x766a0abb3c77b2a8ull, w5 += sigma1(w3) + w14 + sigma0(w6)); + Round(c, d, e, &f, g, h, a, &b, 0x81c2c92e47edaee6ull, w6 += sigma1(w4) + w15 + sigma0(w7)); + Round(b, c, d, &e, f, g, h, &a, 0x92722c851482353bull, w7 += sigma1(w5) + w0 + sigma0(w8)); + Round(a, b, c, &d, e, f, g, &h, 0xa2bfe8a14cf10364ull, w8 += sigma1(w6) + w1 + sigma0(w9)); + Round(h, a, b, &c, d, e, f, &g, 0xa81a664bbc423001ull, w9 += sigma1(w7) + w2 + sigma0(w10)); + Round(g, h, a, &b, c, d, e, &f, 0xc24b8b70d0f89791ull, w10 += sigma1(w8) + w3 + sigma0(w11)); + Round(f, g, h, &a, b, c, d, &e, 0xc76c51a30654be30ull, w11 += sigma1(w9) + w4 + sigma0(w12)); + Round(e, f, g, &h, a, b, c, &d, 0xd192e819d6ef5218ull, w12 += sigma1(w10) + w5 + sigma0(w13)); + Round(d, e, f, &g, h, a, b, &c, 0xd69906245565a910ull, w13 += sigma1(w11) + w6 + sigma0(w14)); + Round(c, d, e, &f, g, h, a, &b, 0xf40e35855771202aull, w14 += sigma1(w12) + w7 + sigma0(w15)); + Round(b, c, d, &e, f, g, h, &a, 0x106aa07032bbd1b8ull, w15 += sigma1(w13) + w8 + sigma0(w0)); + + Round(a, b, c, &d, e, f, g, &h, 0x19a4c116b8d2d0c8ull, w0 += sigma1(w14) + w9 + sigma0(w1)); + Round(h, a, b, &c, d, e, f, &g, 0x1e376c085141ab53ull, w1 += sigma1(w15) + w10 + sigma0(w2)); + Round(g, h, a, &b, c, d, e, &f, 0x2748774cdf8eeb99ull, w2 += sigma1(w0) + w11 + sigma0(w3)); + Round(f, g, h, &a, b, c, d, &e, 0x34b0bcb5e19b48a8ull, w3 += sigma1(w1) + w12 + sigma0(w4)); + Round(e, f, g, &h, a, b, c, &d, 0x391c0cb3c5c95a63ull, w4 += sigma1(w2) + w13 + sigma0(w5)); + Round(d, e, f, &g, h, a, b, &c, 0x4ed8aa4ae3418acbull, w5 += sigma1(w3) + w14 + sigma0(w6)); + Round(c, d, e, &f, g, h, a, &b, 0x5b9cca4f7763e373ull, w6 += sigma1(w4) + w15 + sigma0(w7)); + Round(b, c, d, &e, f, g, h, &a, 0x682e6ff3d6b2b8a3ull, w7 += sigma1(w5) + w0 + sigma0(w8)); + Round(a, b, c, &d, e, f, g, &h, 0x748f82ee5defb2fcull, w8 += sigma1(w6) + w1 + sigma0(w9)); + Round(h, a, b, &c, d, e, f, &g, 0x78a5636f43172f60ull, w9 += sigma1(w7) + w2 + sigma0(w10)); + Round(g, h, a, &b, c, d, e, &f, 0x84c87814a1f0ab72ull, w10 += sigma1(w8) + w3 + sigma0(w11)); + Round(f, g, h, &a, b, c, d, &e, 0x8cc702081a6439ecull, w11 += sigma1(w9) + w4 + sigma0(w12)); + Round(e, f, g, &h, a, b, c, &d, 0x90befffa23631e28ull, w12 += sigma1(w10) + w5 + sigma0(w13)); + Round(d, e, f, &g, h, a, b, &c, 0xa4506cebde82bde9ull, w13 += sigma1(w11) + w6 + sigma0(w14)); + Round(c, d, e, &f, g, h, a, &b, 0xbef9a3f7b2c67915ull, w14 += sigma1(w12) + w7 + sigma0(w15)); + Round(b, c, d, &e, f, g, h, &a, 0xc67178f2e372532bull, w15 += sigma1(w13) + w8 + sigma0(w0)); + + Round(a, b, c, &d, e, f, g, &h, 0xca273eceea26619cull, w0 += sigma1(w14) + w9 + sigma0(w1)); + Round(h, a, b, &c, d, e, f, &g, 0xd186b8c721c0c207ull, w1 += sigma1(w15) + w10 + sigma0(w2)); + Round(g, h, a, &b, c, d, e, &f, 0xeada7dd6cde0eb1eull, w2 += sigma1(w0) + w11 + sigma0(w3)); + Round(f, g, h, &a, b, c, d, &e, 0xf57d4f7fee6ed178ull, w3 += sigma1(w1) + w12 + sigma0(w4)); + Round(e, f, g, &h, a, b, c, &d, 0x06f067aa72176fbaull, w4 += sigma1(w2) + w13 + sigma0(w5)); + Round(d, e, f, &g, h, a, b, &c, 0x0a637dc5a2c898a6ull, w5 += sigma1(w3) + w14 + sigma0(w6)); + Round(c, d, e, &f, g, h, a, &b, 0x113f9804bef90daeull, w6 += sigma1(w4) + w15 + sigma0(w7)); + Round(b, c, d, &e, f, g, h, &a, 0x1b710b35131c471bull, w7 += sigma1(w5) + w0 + sigma0(w8)); + Round(a, b, c, &d, e, f, g, &h, 0x28db77f523047d84ull, w8 += sigma1(w6) + w1 + sigma0(w9)); + Round(h, a, b, &c, d, e, f, &g, 0x32caab7b40c72493ull, w9 += sigma1(w7) + w2 + sigma0(w10)); + Round(g, h, a, &b, c, d, e, &f, 0x3c9ebe0a15c9bebcull, w10 += sigma1(w8) + w3 + sigma0(w11)); + Round(f, g, h, &a, b, c, d, &e, 0x431d67c49c100d4cull, w11 += sigma1(w9) + w4 + sigma0(w12)); + Round(e, f, g, &h, a, b, c, &d, 0x4cc5d4becb3e42b6ull, w12 += sigma1(w10) + w5 + sigma0(w13)); + Round(d, e, f, &g, h, a, b, &c, 0x597f299cfc657e2aull, w13 += sigma1(w11) + w6 + sigma0(w14)); + Round(c, d, e, &f, g, h, a, &b, 0x5fcb6fab3ad6faecull, w14 + sigma1(w12) + w7 + sigma0(w15)); + Round(b, c, d, &e, f, g, h, &a, 0x6c44198c4a475817ull, w15 + sigma1(w13) + w8 + sigma0(w0)); + + s[0] += a; + s[1] += b; + s[2] += c; + s[3] += d; + s[4] += e; + s[5] += f; + s[6] += g; + s[7] += h; +} + +static bool alignment_ok(const void *p UNUSED, size_t n UNUSED) +{ +#if HAVE_UNALIGNED_ACCESS + return true; +#else + return ((size_t)p % n == 0); +#endif +} + +static void add(struct sha512_ctx *ctx, const void *p, size_t len) +{ + const unsigned char *data = p; + size_t bufsize = ctx->bytes % 128; + + if (bufsize + len >= 128) { + /* Fill the buffer, and process it. */ + memcpy(ctx->buf.u8 + bufsize, data, 128 - bufsize); + ctx->bytes += 128 - bufsize; + data += 128 - bufsize; + len -= 128 - bufsize; + Transform(ctx->s, ctx->buf.u64); + bufsize = 0; + } + + while (len >= 128) { + /* Process full chunks directly from the source. */ + if (alignment_ok(data, sizeof(uint64_t))) + Transform(ctx->s, (const uint64_t *)data); + else { + memcpy(ctx->buf.u8, data, sizeof(ctx->buf)); + Transform(ctx->s, ctx->buf.u64); + } + ctx->bytes += 128; + data += 128; + len -= 128; + } + + if (len) { + /* Fill the buffer with what remains. */ + memcpy(ctx->buf.u8 + bufsize, data, len); + ctx->bytes += len; + } +} + +void sha512_init(struct sha512_ctx *ctx) +{ + struct sha512_ctx init = SHA512_INIT; + *ctx = init; +} + +void sha512_update(struct sha512_ctx *ctx, const void *p, size_t size) +{ + check_sha512(ctx); + add(ctx, p, size); +} + +void sha512_done(struct sha512_ctx *ctx, struct sha512 *res) +{ + static const unsigned char pad[128] = { 0x80 }; + uint64_t sizedesc[2] = { 0, 0 }; + size_t i; + + sizedesc[1] = cpu_to_be64((uint64_t)ctx->bytes << 3); + + /* Add '1' bit to terminate, then all 0 bits, up to next block - 16. */ + add(ctx, pad, 1 + ((256 - 16 - (ctx->bytes % 128) - 1) % 128)); + /* Add number of bits of data (big endian) */ + add(ctx, sizedesc, sizeof(sizedesc)); + for (i = 0; i < sizeof(ctx->s) / sizeof(ctx->s[0]); i++) + res->u.u64[i] = cpu_to_be64(ctx->s[i]); + invalidate_sha512(ctx); +} + +void sha512(struct sha512 *sha, const void *p, size_t size) +{ + struct sha512_ctx ctx; + + sha512_init(&ctx); + sha512_update(&ctx, p, size); + sha512_done(&ctx, sha); +} + +/* From hex.h */ +/** + * hex_decode - Unpack a hex string. + * @str: the hexidecimal string + * @slen: the length of @str + * @buf: the buffer to write the data into + * @bufsize: the length of @buf + * + * Returns false if there are any characters which aren't 0-9, a-f or A-F, + * of the string wasn't the right length for @bufsize. + * + * Example: + * unsigned char data[20]; + * + * if (!hex_decode(argv[1], strlen(argv[1]), data, 20)) + * printf("String is malformed!\n"); + */ +bool hex_decode(const char *str, size_t slen, void *buf, size_t bufsize); + +/** + * hex_encode - Create a nul-terminated hex string + * @buf: the buffer to read the data from + * @bufsize: the length of @buf + * @dest: the string to fill + * @destsize: the max size of the string + * + * Returns true if the string, including terminator, fit in @destsize; + * + * Example: + * unsigned char buf[] = { 0x1F, 0x2F }; + * char str[5]; + * + * if (!hex_encode(buf, sizeof(buf), str, sizeof(str))) + * abort(); + */ +bool hex_encode(const void *buf, size_t bufsize, char *dest, size_t destsize); + +/** + * hex_str_size - Calculate how big a nul-terminated hex string is + * @bytes: bytes of data to represent + * + * Example: + * unsigned char buf[] = { 0x1F, 0x2F }; + * char str[hex_str_size(sizeof(buf))]; + * + * hex_encode(buf, sizeof(buf), str, sizeof(str)); + */ +static inline size_t hex_str_size(size_t bytes) +{ + return 2 * bytes + 1; +} + +/* From hex.c */ +static bool char_to_hex(unsigned char *val, char c) +{ + if (c >= '0' && c <= '9') { + *val = c - '0'; + return true; + } + if (c >= 'a' && c <= 'f') { + *val = c - 'a' + 10; + return true; + } + if (c >= 'A' && c <= 'F') { + *val = c - 'A' + 10; + return true; + } + return false; +} + +bool hex_decode(const char *str, size_t slen, void *buf, size_t bufsize) +{ + unsigned char v1, v2; + unsigned char *p = buf; + + while (slen > 1) { + if (!char_to_hex(&v1, str[0]) || !char_to_hex(&v2, str[1])) + return false; + if (!bufsize) + return false; + *(p++) = (v1 << 4) | v2; + str += 2; + slen -= 2; + bufsize--; + } + return slen == 0 && bufsize == 0; +} + +static char hexchar(unsigned int val) +{ + if (val < 10) + return '0' + val; + if (val < 16) + return 'a' + val - 10; + abort(); +} + +bool hex_encode(const void *buf, size_t bufsize, char *dest, size_t destsize) +{ + size_t i; + + if (destsize < hex_str_size(bufsize)) + return false; + + for (i = 0; i < bufsize; i++) { + unsigned int c = ((const unsigned char *)buf)[i]; + *(dest++) = hexchar(c >> 4); + *(dest++) = hexchar(c & 0xF); + } + *dest = '\0'; + + return true; +} + +/* From tap.h */ +/** + * plan_tests - announce the number of tests you plan to run + * @tests: the number of tests + * + * This should be the first call in your test program: it allows tracing + * of failures which mean that not all tests are run. + * + * If you don't know how many tests will actually be run, assume all of them + * and use skip() if you don't actually run some tests. + * + * Example: + * plan_tests(13); + */ +void plan_tests(unsigned int tests); + +/** + * ok1 - Simple conditional test + * @e: the expression which we expect to be true. + * + * This is the simplest kind of test: if the expression is true, the + * test passes. The name of the test which is printed will simply be + * file name, line number, and the expression itself. + * + * Example: + * ok1(somefunc() == 1); + */ +# define ok1(e) ((e) ? \ + _gen_result(1, __func__, __FILE__, __LINE__, "%s", #e) : \ + _gen_result(0, __func__, __FILE__, __LINE__, "%s", #e)) + +/** + * exit_status - the value that main should return. + * + * For maximum compatibility your test program should return a particular exit + * code (ie. 0 if all tests were run, and every test which was expected to + * succeed succeeded). + * + * Example: + * exit(exit_status()); + */ +int exit_status(void); + +/** + * tap_fail_callback - function to call when we fail + * + * This can be used to ease debugging, or exit on the first failure. + */ +void (*tap_fail_callback)(void); + +/* From tap.c */ + +static int no_plan = 0; +static int skip_all = 0; +static int have_plan = 0; +static unsigned int test_count = 0; /* Number of tests that have been run */ +static unsigned int e_tests = 0; /* Expected number of tests to run */ +static unsigned int failures = 0; /* Number of tests that failed */ +static char *todo_msg = NULL; +static const char *todo_msg_fixed = "libtap malloc issue"; +static int todo = 0; +static int test_died = 0; +static int test_pid; + +static void +_expected_tests(unsigned int tests) +{ + printf("1..%d\n", tests); + e_tests = tests; +} + +static void +diagv(const char *fmt, va_list ap) +{ + fputs("# ", stdout); + vfprintf(stdout, fmt, ap); + fputs("\n", stdout); +} + +static void +_diag(const char *fmt, ...) +{ + va_list ap; + va_start(ap, fmt); + diagv(fmt, ap); + va_end(ap); +} + +/* + * Generate a test result. + * + * ok -- boolean, indicates whether or not the test passed. + * test_name -- the name of the test, may be NULL + * test_comment -- a comment to print afterwards, may be NULL + */ +unsigned int +_gen_result(int ok, const char *func, const char *file, unsigned int line, + const char *test_name, ...) +{ + va_list ap; + char *local_test_name = NULL; + char *c; + int name_is_digits; + + test_count++; + + /* Start by taking the test name and performing any printf() + expansions on it */ + if(test_name != NULL) { + va_start(ap, test_name); + if (vasprintf(&local_test_name, test_name, ap) < 0) + local_test_name = NULL; + va_end(ap); + + /* Make sure the test name contains more than digits + and spaces. Emit an error message and exit if it + does */ + if(local_test_name) { + name_is_digits = 1; + for(c = local_test_name; *c != '\0'; c++) { + if(!isdigit((unsigned char)*c) + && !isspace((unsigned char)*c)) { + name_is_digits = 0; + break; + } + } + + if(name_is_digits) { + _diag(" You named your test '%s'. You shouldn't use numbers for your test names.", local_test_name); + _diag(" Very confusing."); + } + } + } + + if(!ok) { + printf("not "); + failures++; + } + + printf("ok %d", test_count); + + if(test_name != NULL) { + printf(" - "); + + /* Print the test name, escaping any '#' characters it + might contain */ + if(local_test_name != NULL) { + flockfile(stdout); + for(c = local_test_name; *c != '\0'; c++) { + if(*c == '#') + fputc('\\', stdout); + fputc((int)*c, stdout); + } + funlockfile(stdout); + } else { /* vasprintf() failed, use a fixed message */ + printf("%s", todo_msg_fixed); + } + } + + /* If we're in a todo_start() block then flag the test as being + TODO. todo_msg should contain the message to print at this + point. If it's NULL then asprintf() failed, and we should + use the fixed message. + + This is not counted as a failure, so decrement the counter if + the test failed. */ + if(todo) { + printf(" # TODO %s", todo_msg ? todo_msg : todo_msg_fixed); + if(!ok) + failures--; + } + + printf("\n"); + + if(!ok) + _diag(" Failed %stest (%s:%s() at line %d)", + todo ? "(TODO) " : "", file, func, line); + + free(local_test_name); + + if (!ok && tap_fail_callback) + tap_fail_callback(); + + /* We only care (when testing) that ok is positive, but here we + specifically only want to return 1 or 0 */ + return ok ? 1 : 0; +} + +/* + * Cleanup at the end of the run, produce any final output that might be + * required. + */ +static void +_cleanup(void) +{ + /* If we forked, don't do cleanup in child! */ + if (getpid() != test_pid) + return; + + /* If plan_no_plan() wasn't called, and we don't have a plan, + and we're not skipping everything, then something happened + before we could produce any output */ + if(!no_plan && !have_plan && !skip_all) { + _diag("Looks like your test died before it could output anything."); + return; + } + + if(test_died) { + _diag("Looks like your test died just after %d.", test_count); + return; + } + + + /* No plan provided, but now we know how many tests were run, and can + print the header at the end */ + if(!skip_all && (no_plan || !have_plan)) { + printf("1..%d\n", test_count); + } + + if((have_plan && !no_plan) && e_tests < test_count) { + _diag("Looks like you planned %d tests but ran %d extra.", + e_tests, test_count - e_tests); + return; + } + + if((have_plan || !no_plan) && e_tests > test_count) { + _diag("Looks like you planned %d tests but only ran %d.", + e_tests, test_count); + if(failures) { + _diag("Looks like you failed %d tests of %d run.", + failures, test_count); + } + return; + } + + if(failures) + _diag("Looks like you failed %d tests of %d.", + failures, test_count); + +} + +/* + * Initialise the TAP library. Will only do so once, however many times it's + * called. + */ +static void +_tap_init(void) +{ + static int run_once = 0; + + if(!run_once) { + test_pid = getpid(); + atexit(_cleanup); + + /* stdout needs to be unbuffered so that the output appears + in the same place relative to stderr output as it does + with Test::Harness */ +// setbuf(stdout, 0); + run_once = 1; + } +} + +/* + * Note the number of tests that will be run. + */ +void +plan_tests(unsigned int tests) +{ + + _tap_init(); + + if(have_plan != 0) { + fprintf(stderr, "You tried to plan twice!\n"); + test_died = 1; + exit(255); + } + + if(tests == 0) { + fprintf(stderr, "You said to run 0 tests! You've got to run something.\n"); + test_died = 1; + exit(255); + } + + have_plan = 1; + + _expected_tests(tests); +} + +static int +exit_status_(void) +{ + int r; + + /* If there's no plan, just return the number of failures */ + if(no_plan || !have_plan) { + return failures; + } + + /* Ran too many tests? Return the number of tests that were run + that shouldn't have been */ + if(e_tests < test_count) { + r = test_count - e_tests; + return r; + } + + /* Return the number of tests that failed + the number of tests + that weren't run */ + r = failures + e_tests - test_count; + + return r; +} + +int +exit_status(void) +{ + int r = exit_status_(); + if (r > 255) + r = 255; + return r; +} + +/* From run-test-vectors.c */ + +/* Test vectors. */ +struct test { + const char *vector; + size_t repetitions; + const char *expected; +}; + +static const char ZEROES[] = + "0000000000000000000000000000000000000000000000000000000000000000" + "0000000000000000000000000000000000000000000000000000000000000000"; + +static struct test tests[] = { + /* http://csrc.nist.gov/groups/STM/cavp/secure-hashing.html ShortMsg */ + { "21", 1, + "3831a6a6155e509dee59a7f451eb35324d8f8f2df6e3708894740f98fdee2388" + "9f4de5adb0c5010dfb555cda77c8ab5dc902094c52de3278f35a75ebc25f093a" }, + { "9083", 1, + "55586ebba48768aeb323655ab6f4298fc9f670964fc2e5f2731e34dfa4b0c09e" + "6e1e12e3d7286b3145c61c2047fb1a2a1297f36da64160b31fa4c8c2cddd2fb4" }, + { "0a55db", 1, + "7952585e5330cb247d72bae696fc8a6b0f7d0804577e347d99bc1b11e52f3849" + "85a428449382306a89261ae143c2f3fb613804ab20b42dc097e5bf4a96ef919b" }, + { "23be86d5", 1, + "76d42c8eadea35a69990c63a762f330614a4699977f058adb988f406fb0be8f2" + "ea3dce3a2bbd1d827b70b9b299ae6f9e5058ee97b50bd4922d6d37ddc761f8eb" }, + { "eb0ca946c1", 1, + "d39ecedfe6e705a821aee4f58bfc489c3d9433eb4ac1b03a97e321a2586b40dd" + "0522f40fa5aef36afff591a78c916bfc6d1ca515c4983dd8695b1ec7951d723e" }, + { "38667f39277b", 1, + "85708b8ff05d974d6af0801c152b95f5fa5c06af9a35230c5bea2752f031f9bd" + "84bd844717b3add308a70dc777f90813c20b47b16385664eefc88449f04f2131" }, + { "b39f71aaa8a108", 1, + "258b8efa05b4a06b1e63c7a3f925c5ef11fa03e3d47d631bf4d474983783d8c0" + "b09449009e842fc9fa15de586c67cf8955a17d790b20f41dadf67ee8cdcdfce6" }, + { "dc28484ebfd293d62ac759d5754bdf502423e4d419fa79020805134b2ce3dff7" + "38c7556c91d810adbad8dd210f041296b73c2185d4646c97fc0a5b69ed49ac8c" + "7ced0bd1cfd7e3c3cca47374d189247da6811a40b0ab097067ed4ad40ade2e47" + "91e39204e398b3204971445822a1be0dd93af8", 1, + "615115d2e8b62e345adaa4bdb95395a3b4fe27d71c4a111b86c1841463c5f03d" + "6b20d164a39948ab08ae060720d05c10f6022e5c8caf2fa3bca2e04d9c539ded" }, + { "fd2203e467574e834ab07c9097ae164532f24be1eb5d88f1af7748ceff0d2c67" + "a21f4e4097f9d3bb4e9fbf97186e0db6db0100230a52b453d421f8ab9c9a6043" + "aa3295ea20d2f06a2f37470d8a99075f1b8a8336f6228cf08b5942fc1fb4299c" + "7d2480e8e82bce175540bdfad7752bc95b577f229515394f3ae5cec870a4b2f8", + 1, + "a21b1077d52b27ac545af63b32746c6e3c51cb0cb9f281eb9f3580a6d4996d5c" + "9917d2a6e484627a9d5a06fa1b25327a9d710e027387fc3e07d7c4d14c6086cc" }, + /* http://www.di-mgt.com.au/sha_testvectors.html */ + { ZEROES, 1, + "7be9fda48f4179e611c698a73cff09faf72869431efee6eaad14de0cb44bbf66" + "503f752b7a8eb17083355f3ce6eb7d2806f236b25af96a24e22b887405c20081" } +}; + +static void *xmalloc(size_t size) +{ + char * ret; + ret = malloc(size); + if (ret == NULL) { + perror("malloc"); + abort(); + } + return ret; +} + +static bool do_test(const struct test *t) +{ + struct sha512 h; + char got[128 + 1]; + bool passed; + size_t i, vector_len = strlen(t->vector) / 2; + void *vector = xmalloc(vector_len); + + hex_decode(t->vector, vector_len * 2, vector, vector_len); + + for (i = 0; i < t->repetitions; i++) { + sha512(&h, vector, vector_len); + if (t->repetitions > 1) + memcpy(vector, &h, sizeof(h)); + } + + hex_encode(&h, sizeof(h), got, sizeof(got)); + + passed = strcmp(t->expected, got) == 0; + free(vector); + return passed; +} + +int main(void) +{ + const size_t num_tests = sizeof(tests) / sizeof(tests[0]); + size_t i; + + /* This is how many tests you plan to run */ + plan_tests(num_tests); + + for (i = 0; i < num_tests; i++) + ok1(do_test(&tests[i])); + + /* This exits depending on whether all tests passed */ + return exit_status(); +} From patchwork Tue Mar 1 09:47:10 2022 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: 547250 Delivered-To: patch@linaro.org Received: by 2002:ac0:9f50:0:0:0:0:0 with SMTP id l16csp3528062imf; Tue, 1 Mar 2022 02:07:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJxiyrji87Ukpzh+H9OBgizKpoMDGcHpv2SBlZyAqbfXjofxnoUy43R0wm840EeLx5s13isT X-Received: by 2002:ac8:7f11:0:b0:2dd:33c2:2455 with SMTP id f17-20020ac87f11000000b002dd33c22455mr19120160qtk.153.1646129253858; Tue, 01 Mar 2022 02:07:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646129253; cv=none; d=google.com; s=arc-20160816; b=W2zFADvhlMnn5MIIuIF1pycKmFUn7ozdBsojYFhdrOBMWHMVSJyPQulcJOSfw+HesN FiUrcy5W3juV7C3+lVvlTtMDy4L4HHqsoTQ5wrfqrLnfgUFxdhfcMI/qVExidZbFyGFp QMnWB9UQRdt3L26VsQnwq2eVOCub6tOQIx5hl0wkr+QwiSCFF+UyhgyLfpIa25OdTiMy oVE3wr2hFZyjr4Eit/2sdTGwDily6hIE6GjXv7TJDwlSl/9xUJt/HTcLNp0ULVqiIWKe VTpLtUTqlVcMgQnlcm8i2BG7F4c6VwLVxjrz9AUrnB58pNvm/fK+fpAnIOHbZSZqTsTJ wezw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=ZOKi/+6sidqp+9I6HPtC5vDCZFQzKRhrF5k0IuKcYto=; b=odFsLF7Pbd+w4Qmtf8jUE1LJ7NHYnNmfbKZrewHqTOnaL8UaU/jzS2woLj0WJjq9lr HAenIPdBnaSrsZOSlUtBB4iQL11ELqpBEe+N5e5P5cXAoxwsGeIUpKR4TUQuhEkov5nM 77ATZtDve1rE2gbltRQHeL5VJI+JJyb5h1SkIa9J/jyLlG5Xohy4AW6BR4AKzzOPJ6gm JrSInjpE9E68OB0+IodncxhFXNs/h+EKeUIg4ndHE49SbCD+9U8aIM992p5dtPJEmZJ3 ruzqR/WSpji2tKWtxtfc4EoGEoM+i4+kcGxdg61lG8S6FUjvk/Dka3UntMlHA42GadR0 uepA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Pe8Tg1V0; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id bb11-20020a05621407cb00b004322fb79a9csi4662024qvb.558.2022.03.01.02.07.33 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 01 Mar 2022 02:07:33 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Pe8Tg1V0; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:53116 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nOzPp-0003Sg-DN for patch@linaro.org; Tue, 01 Mar 2022 05:07:33 -0500 Received: from eggs.gnu.org ([209.51.188.92]:46636) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nOz6c-0003UO-EI for qemu-devel@nongnu.org; Tue, 01 Mar 2022 04:47:42 -0500 Received: from [2a00:1450:4864:20::42e] (port=40611 helo=mail-wr1-x42e.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nOz6a-0007Bz-KJ for qemu-devel@nongnu.org; Tue, 01 Mar 2022 04:47:42 -0500 Received: by mail-wr1-x42e.google.com with SMTP id n14so19499332wrq.7 for ; Tue, 01 Mar 2022 01:47:40 -0800 (PST) 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=ZOKi/+6sidqp+9I6HPtC5vDCZFQzKRhrF5k0IuKcYto=; b=Pe8Tg1V0iPmjySGW0sFuzctx1RYNreOPDRl8a8bns88YNcGxjAi4lCFLGHRq9zgBLP iya3QpuNyVEMAtfUxf16uz7nKOR5C02cqxthXEzHgWf4S4FPQNmYzkvP6d1eEcA0V/6a XqWoqcUROAx99JBgMUd2GZY6FPxsfA39xQRBc+Aa0kqCHQQ4RRj+xA9UuteBxDrSF8LB pXmdGllj47A9dE2xA5+vHHwtGFRBvFgi9nPR0FCcpUmtxRgQdFgCgCG2haOYcka8raSb g7l3bAsBBNpSMhrwOXVs0vnrpllcemay2eHK7Vp2dPvw/X+De1zIG59tqmljcUhFcQjt ragw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ZOKi/+6sidqp+9I6HPtC5vDCZFQzKRhrF5k0IuKcYto=; b=PKyIzJt6tGBGfATmcu0z9xuOZ1XJL3Bql6R2IsyKA6gDaO5IS0nl/4FYNAKRmbYSYP hzbfK4Zz/SLm5baWZGcrwY21RFGEd/Vm9wJmBF0261nnaWBhHUWa8NSo65p/E/t+aRwK L558h+6kfzsRpGQ5LzGFltIykvUQXUCV7mvTn3TL5Xa6i5LsPB65gpWV+jYXxs+qLh8Z tf02iwOB8S4mpoUGPIjV+JQiJeZeC2lHhAwtRf8HOIVre5N6Ssjl2MqOOoi/hxEiSRM+ qnuu3e81b/fWqZlywzmSZAcgtxOOjjyAB1CWenbFMJgx37spE51V4tNzfm2tNPAyAjUx C1JA== X-Gm-Message-State: AOAM531NATU9Y/sw8KusRe4C6bt4150x2jkYSR2jB8A4KXUCDt3lb3Uf UDHa6xIAow+xHyLLEsJJw+vL3uMrTXCZPQ== X-Received: by 2002:a5d:45ca:0:b0:1ea:9bf9:ce5a with SMTP id b10-20020a5d45ca000000b001ea9bf9ce5amr19008315wrs.620.1646128059349; Tue, 01 Mar 2022 01:47:39 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id n5-20020a05600c3b8500b00380fc02ff76sm2136062wms.15.2022.03.01.01.47.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Mar 2022 01:47:34 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 911BD1FFC5; Tue, 1 Mar 2022 09:47:16 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 13/18] tests/tcg: add vectorised sha512 versions Date: Tue, 1 Mar 2022 09:47:10 +0000 Message-Id: <20220301094715.550871-14-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220301094715.550871-1-alex.bennee@linaro.org> References: <20220301094715.550871-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::42e (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::42e; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42e.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 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, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eduardo Habkost , David Hildenbrand , Richard Henderson , qemu-devel@nongnu.org, "open list:S390 TCG CPUs" , "open list:ARM TCG CPUs" , Paolo Bonzini , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" This builds vectorised versions of sha512 to exercise the vector code: - aarch64 (AdvSimd) - i386 (SSE) - s390x (MVX) - ppc64/ppc64le (power10 vectors) Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson Message-Id: <20220225172021.3493923-14-alex.bennee@linaro.org> diff --git a/tests/tcg/aarch64/Makefile.target b/tests/tcg/aarch64/Makefile.target index df3f8e9438..ac07acde66 100644 --- a/tests/tcg/aarch64/Makefile.target +++ b/tests/tcg/aarch64/Makefile.target @@ -60,6 +60,13 @@ run-sha1-vector: sha1-vector run-sha1 TESTS += sha1-vector +# Vector versions of sha512 (-O3 triggers vectorisation) +sha512-vector: CFLAGS=-O3 +sha512-vector: sha512.c + $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $< -o $@ $(LDFLAGS) + +TESTS += sha512-vector + ifneq ($(HAVE_GDB_BIN),) GDB_SCRIPT=$(SRC_PATH)/tests/guest-debug/run-test.py diff --git a/tests/tcg/arm/Makefile.target b/tests/tcg/arm/Makefile.target index 2dc94931c3..2f815120a5 100644 --- a/tests/tcg/arm/Makefile.target +++ b/tests/tcg/arm/Makefile.target @@ -79,6 +79,14 @@ run-sha1-vector: sha1-vector run-sha1 $(call diff-out, sha1-vector, sha1.out) ARM_TESTS += sha1-vector + +# Vector versions of sha512 (-O3 triggers vectorisation) +sha512-vector: CFLAGS=-O3 +sha512-vector: sha512.c + $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $< -o $@ $(LDFLAGS) + +ARM_TESTS += sha512-vector + TESTS += $(ARM_TESTS) # On ARM Linux only supports 4k pages diff --git a/tests/tcg/i386/Makefile.target b/tests/tcg/i386/Makefile.target index 38c10379af..e1c0310be6 100644 --- a/tests/tcg/i386/Makefile.target +++ b/tests/tcg/i386/Makefile.target @@ -71,3 +71,12 @@ TESTS=$(MULTIARCH_TESTS) $(I386_TESTS) # On i386 and x86_64 Linux only supports 4k pages (large pages are a different hack) EXTRA_RUNS+=run-test-mmap-4096 + +sha512-sse: CFLAGS=-msse4.1 -O3 +sha512-sse: sha512.c + $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $< -o $@ $(LDFLAGS) + +run-sha512-sse: QEMU_OPTS+=-cpu max +run-plugin-sha512-sse-with-%: QEMU_OPTS+=-cpu max + +TESTS+=sha512-sse diff --git a/tests/tcg/ppc64/Makefile.target b/tests/tcg/ppc64/Makefile.target index 9d6dfc1e26..c9498053df 100644 --- a/tests/tcg/ppc64/Makefile.target +++ b/tests/tcg/ppc64/Makefile.target @@ -13,12 +13,19 @@ $(PPC64_TESTS): CFLAGS += -mpower8-vector PPC64_TESTS += mtfsf ifneq ($(DOCKER_IMAGE)$(CROSS_CC_HAS_POWER10),) -PPC64_TESTS += byte_reverse +PPC64_TESTS += byte_reverse sha512-vector endif byte_reverse: CFLAGS += -mcpu=power10 run-byte_reverse: QEMU_OPTS+=-cpu POWER10 run-plugin-byte_reverse-with-%: QEMU_OPTS+=-cpu POWER10 +sha512-vector: CFLAGS +=-mcpu=power10 -O3 +sha512-vector: sha512.c + $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $< -o $@ $(LDFLAGS) + +run-sha512-vector: QEMU_OPTS+=-cpu POWER10 +run-plugin-sha512-vector-with-%: QEMU_OPTS+=-cpu POWER10 + PPC64_TESTS += signal_save_restore_xer TESTS += $(PPC64_TESTS) diff --git a/tests/tcg/ppc64le/Makefile.target b/tests/tcg/ppc64le/Makefile.target index 480ff0898d..12d85e946b 100644 --- a/tests/tcg/ppc64le/Makefile.target +++ b/tests/tcg/ppc64le/Makefile.target @@ -10,12 +10,19 @@ endif $(PPC64LE_TESTS): CFLAGS += -mpower8-vector ifneq ($(DOCKER_IMAGE)$(CROSS_CC_HAS_POWER10),) -PPC64LE_TESTS += byte_reverse +PPC64LE_TESTS += byte_reverse sha512-vector endif byte_reverse: CFLAGS += -mcpu=power10 run-byte_reverse: QEMU_OPTS+=-cpu POWER10 run-plugin-byte_reverse-with-%: QEMU_OPTS+=-cpu POWER10 +sha512-vector: CFLAGS +=-mcpu=power10 -O3 +sha512-vector: sha512.c + $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $< -o $@ $(LDFLAGS) + +run-sha512-vector: QEMU_OPTS+=-cpu POWER10 +run-plugin-sha512-vector-with-%: QEMU_OPTS+=-cpu POWER10 + PPC64LE_TESTS += mtfsf PPC64LE_TESTS += signal_save_restore_xer diff --git a/tests/tcg/s390x/Makefile.target b/tests/tcg/s390x/Makefile.target index 1a7238b4eb..e53b599b22 100644 --- a/tests/tcg/s390x/Makefile.target +++ b/tests/tcg/s390x/Makefile.target @@ -25,3 +25,12 @@ run-gdbstub-signals-s390x: signals-s390x EXTRA_RUNS += run-gdbstub-signals-s390x endif + +# MVX versions of sha512 +sha512-mvx: CFLAGS=-march=z13 -mvx -O3 +sha512-mvx: sha512.c + $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $< -o $@ $(LDFLAGS) + +run-sha512-mvx: QEMU_OPTS+=-cpu max + +TESTS+=sha512-mvx diff --git a/tests/tcg/x86_64/Makefile.target b/tests/tcg/x86_64/Makefile.target index 4a8a464c57..17cf168f0a 100644 --- a/tests/tcg/x86_64/Makefile.target +++ b/tests/tcg/x86_64/Makefile.target @@ -22,3 +22,10 @@ test-x86_64: test-i386.c test-i386.h test-i386-shift.h test-i386-muldiv.h vsyscall: $(SRC_PATH)/tests/tcg/x86_64/vsyscall.c $(CC) $(CFLAGS) $< -o $@ $(LDFLAGS) + +# TCG does not yet support all SSE (SIGILL on pshufb) +# sha512-sse: CFLAGS=-march=core2 -O3 +# sha512-sse: sha512.c +# $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $< -o $@ $(LDFLAGS) + +TESTS+=sha512-sse From patchwork Tue Mar 1 09:47:11 2022 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: 547248 Delivered-To: patch@linaro.org Received: by 2002:ac0:9f50:0:0:0:0:0 with SMTP id l16csp3525449imf; Tue, 1 Mar 2022 02:03:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJy9Q66XC3TwZlqS2ErhEAsZkk7lDHkmuVazrOU3WqgWESJLCURGGw1JdNbB1267Q+sKT8r6 X-Received: by 2002:ac8:7d47:0:b0:2de:4d52:5e59 with SMTP id h7-20020ac87d47000000b002de4d525e59mr19300523qtb.613.1646129013270; Tue, 01 Mar 2022 02:03:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646129013; cv=none; d=google.com; s=arc-20160816; b=MPjzd54cGcyZagC/1WDXsipQGPXHwSiFJl6z4P6r/FYUXoC1ohF6Wyu1Bl60wrDtpi ymHzy3K5KFC6ymlZGIMbumBDJCvr32DlNaFwh+pWH1zf/LtGyQGBX7b3B2wGxL//OFrx LZeL6ELyDRtd3snmvsbm5yLlYkRkltFfEhvwcOlvPq3cHZDDBDfXkgJRMQxGVxj3b7TP 1xurY6nr7gIUHgvVlPHmdwZH8iN2zoEqd1qNvr4T6S1bESiOHpewk/NT8graWiBGlrb/ XHfoc/ITghNUlYrhVMBbX69ui2t+LUo8GDwTsleyQ2kWyzUp+onVDX2pZ6gXhfDg27cV JGWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=SBfeWOX3YKTOjWxwbQ6GNj0bh7YVir8jH0zEi/hdLKE=; b=rlOko97SHJ7+lG52+QjjMi+86GfzC6kGEscoDjR4BDvS3osbUpmomMHoc4y2h+Yd7i Qf0PeOMeR1/OGrg12ACBAxoe0bKIcs53Q79WJPH/4Xxd0AhQsOH8ywFAtyvO5nlnbfSX K0Vrr+E9ZbAOLwZJi9v8iOhHBMVYLdGFTq3Ccs6Bk7WODTLZy7vYhzJN3SiJ1p6D92Ry US9YEJxjbjXQG5QNGgPf75OLrwoNmvSssyO6HJ+ZGzkdTDDPpyA6osfGJW8AINdBX/8l FIR6YQzvKSgMAC3kXrAU7XYf4Oiy/mNOncZzoM7dKwmqp8NSQNnv/srZu+adOlnVzulB AcZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=kUUC6k3H; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id s200-20020a3745d1000000b005f19167c7edsi4267970qka.679.2022.03.01.02.03.33 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 01 Mar 2022 02:03:33 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=kUUC6k3H; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:44442 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nOzLw-00060Q-QK for patch@linaro.org; Tue, 01 Mar 2022 05:03:32 -0500 Received: from eggs.gnu.org ([209.51.188.92]:46530) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nOz6Z-0003Tx-7O for qemu-devel@nongnu.org; Tue, 01 Mar 2022 04:47:42 -0500 Received: from [2a00:1450:4864:20::42b] (port=46929 helo=mail-wr1-x42b.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nOz6W-0007Aa-Vg for qemu-devel@nongnu.org; Tue, 01 Mar 2022 04:47:38 -0500 Received: by mail-wr1-x42b.google.com with SMTP id e10so1948738wro.13 for ; Tue, 01 Mar 2022 01:47:36 -0800 (PST) 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=SBfeWOX3YKTOjWxwbQ6GNj0bh7YVir8jH0zEi/hdLKE=; b=kUUC6k3H+NsiQGBPFzDYEri7aKnOmL+WAfv9ij7KVqOpgD4CCSIuKGTtLfy1s5ZpUg boLAmqxQ5pzNHAXkupOSM/11YW/HePO/DqU6/jsN/AX/9VwgxlKt6suYcghdS2WdRHDs GJmT4ecoREOJS35tIt/T8l42hyZBRPzqpx35QDxoil8QJkIxHkg7j1D+Aat8pwl++XuB LS9nw8oUGR/qNydk9jwbJwMEBNadrsAVwSWQ6l2RdjK2MuS+c5AY/HUeLEIK9+CYqMb9 OYqFKxrWhZZW45ux35hNJKS6oAzPAhfjnNeIzOJ6wRoHup1fm0i+0NXPpvUETlgX6kjL vyug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=SBfeWOX3YKTOjWxwbQ6GNj0bh7YVir8jH0zEi/hdLKE=; b=LLG08k6VyRZwG3b3PldDexBbt4I7p+FNHWzCelAsojp6ugudvgYNyp5EdZESBkAESF o2hDZLGzQXVROOnq/fPNhEpIq9l/8iheDoH4Iag6Z1qZkq27zJ1/VCMcOE5IsP1wlH3E GfxfT2ENhZkTKeDXsgguMcloevjS0zt6zyBabyUM3y6MdDqkLXFBrcspUrC2idrkS9Ah CIcq6xZRnn233/2+0DiTUt28u3PYvxrV2mZwDr4BHz9Jyeh+2/3yPVjPHiaa2hKIJ6EH 6eyHPo9WpR3dgduN5I4uNd+ZaYybhY1W94A8ZNH62C/5rSEoWpW6OQYHrBpK0lKfjCpK 5PhQ== X-Gm-Message-State: AOAM532GWGD38VZq0FgXvtG49D1Wq66rXaUAPkK/qyAAAyCnvIlSqxKQ PVLZH3N4lmsTi2LtUsjRTUxDQQ== X-Received: by 2002:a5d:550d:0:b0:1ed:c155:6c2a with SMTP id b13-20020a5d550d000000b001edc1556c2amr18758355wrv.470.1646128055688; Tue, 01 Mar 2022 01:47:35 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id o12-20020adfa10c000000b001efb97fae48sm7355191wro.80.2022.03.01.01.47.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Mar 2022 01:47:32 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 9D6A41FFC6; Tue, 1 Mar 2022 09:47:16 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 14/18] travis.yml: Update the s390x jobs to Ubuntu Focal Date: Tue, 1 Mar 2022 09:47:11 +0000 Message-Id: <20220301094715.550871-15-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220301094715.550871-1-alex.bennee@linaro.org> References: <20220301094715.550871-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::42b (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42b.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 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, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Huth , Beraldo Leal , Cornelia Huck , Richard Henderson , qemu-devel@nongnu.org, Wainer dos Santos Moschetta , =?utf-8?q?Philippe_Mathi?= =?utf-8?q?eu-Daud=C3=A9?= , "open list:S390 general arch..." , =?utf-8?q?Alex_Be?= =?utf-8?q?nn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Thomas Huth QEMU will soon drop the support for Ubuntu 18.04, so let's update the Travis jobs that were still using this version to 20.04 instead. While we're at it, also remove an obsolete comment about Ubuntu Xenial being the default for our Travis jobs. Signed-off-by: Thomas Huth Signed-off-by: Alex Bennée Message-Id: <20220221153423.1028465-1-thuth@redhat.com> Reviewed-by: Richard Henderson Message-Id: <20220225172021.3493923-15-alex.bennee@linaro.org> diff --git a/.travis.yml b/.travis.yml index 41010ebe6b..c3c8048842 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,3 @@ -# The current Travis default is a VM based 16.04 Xenial on GCE -# Additional builds with specific requirements for a full VM need to -# be added as additional matrix: entries later on os: linux dist: focal language: c @@ -190,7 +187,7 @@ jobs: - name: "[s390x] GCC check-tcg" arch: s390x - dist: bionic + dist: focal addons: apt_packages: - libaio-dev @@ -233,7 +230,7 @@ jobs: - name: "[s390x] GCC (other-softmmu)" arch: s390x - dist: bionic + dist: focal addons: apt_packages: - libaio-dev @@ -263,10 +260,11 @@ jobs: - name: "[s390x] GCC (user)" arch: s390x - dist: bionic + dist: focal addons: apt_packages: - libgcrypt20-dev + - libglib2.0-dev - libgnutls28-dev - ninja-build env: @@ -274,7 +272,7 @@ jobs: - name: "[s390x] Clang (disable-tcg)" arch: s390x - dist: bionic + dist: focal compiler: clang addons: apt_packages: From patchwork Tue Mar 1 09:47:12 2022 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: 547244 Delivered-To: patch@linaro.org Received: by 2002:ac0:9f50:0:0:0:0:0 with SMTP id l16csp3520633imf; Tue, 1 Mar 2022 01:56:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJzQteTLHv4yqeGKUhXV43zPXF8LtQSo8mWnBG1Y4dsclPg3BmyRNzXXm5k/cvUgBi4nYMFr X-Received: by 2002:ac8:57cc:0:b0:2de:6f5c:2d85 with SMTP id w12-20020ac857cc000000b002de6f5c2d85mr19646020qta.108.1646128574816; Tue, 01 Mar 2022 01:56:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646128574; cv=none; d=google.com; s=arc-20160816; b=D/zgyrcaUTdHCykcahfMVIX9z8ljUOl2zWxmrDB1R4hBWan6ffm9DDXRNPlKYXeZM3 Xq4LDWlNK6AUf/Vyd8qO2Rp4I3xggN7qNZcEVBN0Mn8FswBFFcStQqAmH5jXPm1hj3HW 9jsh7bgMaYbjNkYeq5H1/xWsKEhRzC+fLcE2bKGL1RGwEthRxWhW7hc0I6QSOyAbRReN P44TaFXGTxJaMRl4vNSGzJyiaoBve9eMIHaVVzLiRxUREIx508AvsyiwKvlvpmRhrCCi ExEUFNKJMfT9BamEHYV/37CVpUotOZaj0A/h0o5J+VP9hipoNX03wyECnL685STFdYJu 4RrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=FEukhn5LuXoEMOF2RAOm0ngW9ZGKUNwyGsnNN8c0JYU=; b=0Dywhtkr/4htzhA9alupPhnCGYxYzXQlWWZyGS84o5QW45lwO1v5RInZFD1Oj1tFpA 7eoXevlkjnVipf/LNcYwoEa7FPwkqFnz1ND6C6emvg0js/6BMyH6J9bI9cVAegC72QYh HAhvZ57zm3+imtVKHkJFiqlj28UuZtNtPu9g/xnAdWRJO/n/wNqLu1vtOCBzCwgr4PFz DgeyDZLMuNXXdroP8CW7aIx3wkw4fhCcsEvZ46/neW3XTF3QSAw+Gc58hLMhcWP/tZIo JUl/K+ZtGmteAzYsmYvnWNflVMLHPM8Oel6oo6BVHC2KBJEBQpDK8oNG53EcWzClwBjl C6ng== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=OAc8uy5+; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id e19-20020ac84b53000000b002de37e80495si3857337qts.25.2022.03.01.01.56.14 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 01 Mar 2022 01:56:14 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=OAc8uy5+; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:59750 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nOzEs-0005BX-BC for patch@linaro.org; Tue, 01 Mar 2022 04:56:14 -0500 Received: from eggs.gnu.org ([209.51.188.92]:46620) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nOz6c-0003UL-3z for qemu-devel@nongnu.org; Tue, 01 Mar 2022 04:47:42 -0500 Received: from [2a00:1450:4864:20::42a] (port=36583 helo=mail-wr1-x42a.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nOz6Z-0007Bc-UT for qemu-devel@nongnu.org; Tue, 01 Mar 2022 04:47:41 -0500 Received: by mail-wr1-x42a.google.com with SMTP id r10so19547986wrp.3 for ; Tue, 01 Mar 2022 01:47:39 -0800 (PST) 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=FEukhn5LuXoEMOF2RAOm0ngW9ZGKUNwyGsnNN8c0JYU=; b=OAc8uy5+5sB7GDcltM7UzhfAdIUSdYcTpvy8aTn37pP6VVgxpaPXHP7HNXzdVVGte8 JvaE++3N3Y1pahl1oFUzbjHno5naBEA/4aRI18Kx97jcFWuzb+ocohYQahHWSTInPKpV 0RBpXUc86EuYKyW78jTI9crxWRblk5dIwyPpFDx/slK/SHDHRXNrvYe8KgY6fbM1EDL7 bu+FRtcE27EPKw6kO+hHzj/UBbCKtK0of10rACu1o6xUTZ3sqt+lTlD6AZ9ZKqTtqFFs TDu5ZbXJCopSefbSWT8zYYZwXYABt/A+cLFSjscmx5hNX3VgNw4KopPWccyuEz7HRLQs o2wQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=FEukhn5LuXoEMOF2RAOm0ngW9ZGKUNwyGsnNN8c0JYU=; b=74rJSmhMHGVq516rKO+ZO0jAIlfKl8qGa27PdJ3gaTw1UO19jyVA2VhzspT2vDXS4I JvLytxZHgo3I0/wulYxeKWVHVYPVN4RiP3fvBfYtfr0tWu/27HlgBK+GX7PngWqdvtRJ /Ixrm/oy79yF0cLYeYAb+ctIp0X0SQFBc5X1jlfUArYAX423RSE8PsadkOgcGxtEqztm C2811/0P0Sxuvs2av87D8K9IISQPi/tZdby/sQ7Jp/H/bkOtld4keQzSxZKiBSHmts+X 3lN9hdoXG/mmjmEYM6BCmeHXWtn6gtCdHvAAcEN7pvfR/LrhOAr4zaWsRcBCv8S2GzdP 1y2w== X-Gm-Message-State: AOAM5306ncuoK0rNbDiHFaaVBVmA8sl47jCrTOFbE9YShY5VZct5b28O RRn6CkhZjai2rqw0AeTJav32pQ== X-Received: by 2002:adf:a150:0:b0:1ee:72f9:7c07 with SMTP id r16-20020adfa150000000b001ee72f97c07mr17894165wrr.674.1646128058601; Tue, 01 Mar 2022 01:47:38 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id z5-20020a05600c0a0500b0037fa93193a8sm2601157wmp.44.2022.03.01.01.47.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Mar 2022 01:47:34 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id BC2631FFC7; Tue, 1 Mar 2022 09:47:16 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 15/18] gitlab: upgrade the job definition for s390x to 20.04 Date: Tue, 1 Mar 2022 09:47:12 +0000 Message-Id: <20220301094715.550871-16-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220301094715.550871-1-alex.bennee@linaro.org> References: <20220301094715.550871-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::42a (failed) 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: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 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, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Huth , Beraldo Leal , Cornelia Huck , Richard Henderson , qemu-devel@nongnu.org, Wainer dos Santos Moschetta , =?utf-8?q?Philippe_Mathi?= =?utf-8?q?eu-Daud=C3=A9?= , Christian Borntraeger , "open list:S390 general arch..." , =?utf-8?q?Alex_Be?= =?utf-8?q?nn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" The new s390x machine has more of everything including the OS. As 18.04 will soon be going we might as well get onto something moderately modern. Signed-off-by: Alex Bennée Acked-by: Christian Borntraeger Reviewed-by: Thomas Huth Acked-by: Cornelia Huck Reviewed-by: Philippe Mathieu-Daudé Cc: Peter Maydell Reviewed-by: Richard Henderson Message-Id: <20220225172021.3493923-16-alex.bennee@linaro.org> diff --git a/.gitlab-ci.d/custom-runners.yml b/.gitlab-ci.d/custom-runners.yml index 056c374619..3e76a2034a 100644 --- a/.gitlab-ci.d/custom-runners.yml +++ b/.gitlab-ci.d/custom-runners.yml @@ -14,6 +14,6 @@ variables: GIT_STRATEGY: clone include: - - local: '/.gitlab-ci.d/custom-runners/ubuntu-18.04-s390x.yml' + - local: '/.gitlab-ci.d/custom-runners/ubuntu-20.04-s390x.yml' - local: '/.gitlab-ci.d/custom-runners/ubuntu-20.04-aarch64.yml' - local: '/.gitlab-ci.d/custom-runners/centos-stream-8-x86_64.yml' diff --git a/.gitlab-ci.d/custom-runners/ubuntu-18.04-s390x.yml b/.gitlab-ci.d/custom-runners/ubuntu-20.04-s390x.yml similarity index 87% rename from .gitlab-ci.d/custom-runners/ubuntu-18.04-s390x.yml rename to .gitlab-ci.d/custom-runners/ubuntu-20.04-s390x.yml index f39d874a1e..0333872113 100644 --- a/.gitlab-ci.d/custom-runners/ubuntu-18.04-s390x.yml +++ b/.gitlab-ci.d/custom-runners/ubuntu-20.04-s390x.yml @@ -1,12 +1,12 @@ -# All ubuntu-18.04 jobs should run successfully in an environment +# All ubuntu-20.04 jobs should run successfully in an environment # setup by the scripts/ci/setup/build-environment.yml task -# "Install basic packages to build QEMU on Ubuntu 18.04/20.04" +# "Install basic packages to build QEMU on Ubuntu 20.04/20.04" -ubuntu-18.04-s390x-all-linux-static: +ubuntu-20.04-s390x-all-linux-static: needs: [] stage: build tags: - - ubuntu_18.04 + - ubuntu_20.04 - s390x rules: - if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH =~ /^staging/' @@ -21,11 +21,11 @@ ubuntu-18.04-s390x-all-linux-static: - make --output-sync -j`nproc` check V=1 - make --output-sync -j`nproc` check-tcg V=1 -ubuntu-18.04-s390x-all: +ubuntu-20.04-s390x-all: needs: [] stage: build tags: - - ubuntu_18.04 + - ubuntu_20.04 - s390x rules: - if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH =~ /^staging/' @@ -37,11 +37,11 @@ ubuntu-18.04-s390x-all: - make --output-sync -j`nproc` - make --output-sync -j`nproc` check V=1 -ubuntu-18.04-s390x-alldbg: +ubuntu-20.04-s390x-alldbg: needs: [] stage: build tags: - - ubuntu_18.04 + - ubuntu_20.04 - s390x rules: - if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH =~ /^staging/' @@ -58,11 +58,11 @@ ubuntu-18.04-s390x-alldbg: - make --output-sync -j`nproc` - make --output-sync -j`nproc` check V=1 -ubuntu-18.04-s390x-clang: +ubuntu-20.04-s390x-clang: needs: [] stage: build tags: - - ubuntu_18.04 + - ubuntu_20.04 - s390x rules: - if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH =~ /^staging/' @@ -78,11 +78,11 @@ ubuntu-18.04-s390x-clang: - make --output-sync -j`nproc` - make --output-sync -j`nproc` check V=1 -ubuntu-18.04-s390x-tci: +ubuntu-20.04-s390x-tci: needs: [] stage: build tags: - - ubuntu_18.04 + - ubuntu_20.04 - s390x rules: - if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH =~ /^staging/' @@ -97,11 +97,11 @@ ubuntu-18.04-s390x-tci: - ../configure --disable-libssh --enable-tcg-interpreter - make --output-sync -j`nproc` -ubuntu-18.04-s390x-notcg: +ubuntu-20.04-s390x-notcg: needs: [] stage: build tags: - - ubuntu_18.04 + - ubuntu_20.04 - s390x rules: - if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH =~ /^staging/' From patchwork Tue Mar 1 09:47:13 2022 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: 547257 Delivered-To: patch@linaro.org Received: by 2002:ac0:9f50:0:0:0:0:0 with SMTP id l16csp3534810imf; Tue, 1 Mar 2022 02:18:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJzZtVuqoxRq6tv5V9gCINb8FMDr6NOUdlvXLHKEQFJyTmWR/VMsCl6F3BKfk9AiuS2YTyOQ X-Received: by 2002:a05:6214:1d0d:b0:433:1869:1fb7 with SMTP id e13-20020a0562141d0d00b0043318691fb7mr6498930qvd.40.1646129917139; Tue, 01 Mar 2022 02:18:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646129917; cv=none; d=google.com; s=arc-20160816; b=g0qgISfkOLrxWsAKTHuNHzgyTxUvRqouhapH5iD8L2Y0IV9vGVvRCXJl/xDC1Cg7el QdI9RykeLdri20JD0/u3cuI9NY/RuFk2aTidnmNgG6J5ojtaGoY7RBK67f4OnaU3vVVO KmSkTO7xhE6FENdkl0ZRy5KQr5tYgzAv/RIa01vvzXtepzWmvM5nNjRdrlsH/z20U5DS /uZOOizOvBEoaiTycrECE45cUJgQRoJCmrPlnkOvbbMPsyJyfZp2CwB6yeLFFcpqlB9g b5tXW7s7uoLymPXTddTKC8Rd9N9DN3jL76xyBPHMZgCIR5A45s4KS5t5ex4WUdWY7Jcu AA7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=supxaQdVzvkCnQhT8N01s60fOyhanjrIRWW6b3Q5o24=; b=B2TWmX1sbRolz9OvX3keFO9NgyXSjubyfNUti6m56AD/7Dgt2Q9bqyds7PBM4AWOgp kvUmsy3uNNQuyvYbWQR3spiShOtSNwo5vQLvyk88LJ83PU4R/dK9OfrHy4ztlQMYXtQf g7/9AoG3wHzmLNjt+yzwCLv55Vt+a7lcE03C1oHgjF4em11EgAQYVh9sDLiK9PBAbfGa sgWK+2+s2zxlhuwmXPQ6hSwr/Qei4lkpe7NonXNVJx56+fI3s1KyCGuCTnOvrGFOIkK8 F90Hlu353s+Xq5xfiaLuexR9BxB1w9JWlWASEH6BmuPXgN/fzHnQcx97xjTTJsZ9ZaGl 1ZYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=rgO6Qzws; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id c16-20020ac86610000000b002dea09a15c6si3922589qtp.74.2022.03.01.02.18.37 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 01 Mar 2022 02:18:37 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=rgO6Qzws; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:44680 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nOzaW-0000IZ-Mz for patch@linaro.org; Tue, 01 Mar 2022 05:18:36 -0500 Received: from eggs.gnu.org ([209.51.188.92]:46540) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nOz6Z-0003U4-NP for qemu-devel@nongnu.org; Tue, 01 Mar 2022 04:47:42 -0500 Received: from [2a00:1450:4864:20::330] (port=43651 helo=mail-wm1-x330.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nOz6X-0007Ao-U0 for qemu-devel@nongnu.org; Tue, 01 Mar 2022 04:47:39 -0500 Received: by mail-wm1-x330.google.com with SMTP id e6-20020a05600c4e4600b0038173851f5eso1011453wmq.2 for ; Tue, 01 Mar 2022 01:47:37 -0800 (PST) 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=supxaQdVzvkCnQhT8N01s60fOyhanjrIRWW6b3Q5o24=; b=rgO6Qzwse4kTCx3Oyizc9ylE6VtfGt68lUDHk7dTF49RfC4wDju0U2FhVOWGD5bfq8 GTZM/IaIfVPl7o6ol6S+7ZTalZGu2+F4H1EfOvb2L3tQ5TeMHkl+vxo5qUrUtTMfjJ7e uhC/c/prp+xy9TiMzVWfZK9qDjaEeVWVKBp+gJpuESbstyQ2iDSM8L7+lpHy7NGRa9wS 54ihG4uANH+kEGqFvleVxyfA+jsh/LyHcfcA0TTGllKl16bIKvjOdEFrJn5sb6PEjLWV IoaVNddKZUVeTyC6uDS3Rsey8QmyJMrc1NqMIAmpP75y10ldKvGT3fGmWLwTzf0Ls3ux 47kA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=supxaQdVzvkCnQhT8N01s60fOyhanjrIRWW6b3Q5o24=; b=lIcgvXwn4yzpvr9ALZY1CJvarKTSePsh9DXjggcEX41Emk0KC665OnDKOfV4zm/1ot 040S/93/tR77tTMAnaM/zM/HZB3vMXmm1gh/VUl/k0wAXMbwyxMzu3BHMrtuHEMh5CJi XSnxWLzwkRC5Q3aH14g/wqlsyjZRFprTdSOLXPexU8oELT7mDoP0HFwKjesyLLwGUGho PR1ekrlZb8D1Ccm+WXYxrKITihmI0EmQye1K/dQq2XagG2xkaT3kLxkZghsx4RUr3PEf GYDdpeIqGcDgyepwZfx/8i8ZQyc23QsCg3bau3eI9tVRf6dsyQUMDmMaXizm7HruoRPU aMag== X-Gm-Message-State: AOAM532TyOrax3BvaKBMttWdpjVB7paX4XtqoluxUSrWVZ6DnI2J6nRm QD6wejWZW7l5B2turNrz3KMjMg== X-Received: by 2002:a05:600c:3486:b0:381:65ec:f8ed with SMTP id a6-20020a05600c348600b0038165ecf8edmr7381782wmq.68.1646128056585; Tue, 01 Mar 2022 01:47:36 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id s3-20020a5d4ec3000000b001ea95eba44dsm12945312wrv.109.2022.03.01.01.47.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Mar 2022 01:47:34 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id C73E21FFC8; Tue, 1 Mar 2022 09:47:16 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 16/18] tests/tcg: completely disable threadcount for sh4 Date: Tue, 1 Mar 2022 09:47:13 +0000 Message-Id: <20220301094715.550871-17-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220301094715.550871-1-alex.bennee@linaro.org> References: <20220301094715.550871-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::330 (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::330; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x330.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 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, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Richard Henderson , =?utf-8?q?Alex_Benn?= =?utf-8?q?=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" The previous disabling of threadcount 3bdc19af00 ("tests/tcg/sh4: disable another unreliable test") just for plugins was being too conservative. It's all broken so skip it. Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson Message-Id: <20220225172021.3493923-17-alex.bennee@linaro.org> diff --git a/tests/tcg/sh4/Makefile.target b/tests/tcg/sh4/Makefile.target index 620ccc23c1..35ebe6b4e3 100644 --- a/tests/tcg/sh4/Makefile.target +++ b/tests/tcg/sh4/Makefile.target @@ -20,5 +20,7 @@ run-plugin-linux-test-with-%: $(call skip-test, $<, "BROKEN") # This test is currently unreliable: https://gitlab.com/qemu-project/qemu/-/issues/856 +run-threadcount: + $(call skip-test, $<, "BROKEN") run-plugin-threadcount-with-%: $(call skip-test, $<, "BROKEN") From patchwork Tue Mar 1 09:47:14 2022 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: 547256 Delivered-To: patch@linaro.org Received: by 2002:ac0:9f50:0:0:0:0:0 with SMTP id l16csp3534385imf; Tue, 1 Mar 2022 02:17:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJxC3PV/atkSv5/OP6/nlPXZyAoAhXLkGMUQEkOAfFNA+QToKffYBOhmsiC3juoQffIG2Noc X-Received: by 2002:a37:674c:0:b0:47b:8dc5:df77 with SMTP id b73-20020a37674c000000b0047b8dc5df77mr13942449qkc.95.1646129873232; Tue, 01 Mar 2022 02:17:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646129873; cv=none; d=google.com; s=arc-20160816; b=MpXOlKDd4QSIuTBgmuKoP99XMMMRRPTi3RHy0Wg0sQi1Yb320KczRvp/LqNgLhNRvw TxSphPHa63rF9v5GaSJL91yUo1Cejhq5DiLClXeG8qEaCTtDBf5enXYJ4u3E0uC5H24c /eBmewAr61XUlTyXjTJkl9hqGmN9vYImWBWKRpsE+4Y7ZLCEsfGUklcDF3fN2NNioS9J YgNbPgJ1k3xnBfah/G1A6IiH4UPxEuD/onBXfuphXEm5O16vO6DJ3TmaODRiMC3s5w/k B0u9+8f2hX68xEFJFmnDGhE1fc3TQ/gXS2gB1YjLHGWYOdrz5iXF1l0lcPymbGrMO0kt mQbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=2Kziok9V9LX6bcnJwQ9kOgg8CqbcOF/m3urdub8sZUQ=; b=JRndNK1LlW0iiha377DTaMoE+9oWALjNE9C0Mg9IE6uuGbbGcAdnJB/nxhAy7y3J53 YRxU6QQNKm4TpzRRNxHQ+SKCqOZV32WswHOSfKHxm5/hBSr35/li2DjY9fEPt6vDNaCL Dzm/G3EvzSfR1hq1QrTqLGpzca+0oQG9oD2+VsLkxffiiNIBcfGN2LeRcIWtDjqUewnG t2wKFnytB/u08yP5i8q6N4ev9m8kwvnPBXnuMVTRzugJvYsS8fWSja9zq6KJTwsjTtNO Ln4vSd/QNllqgDhDXAbuBL1/leVSgxn4FMtgQLS1Pn4/pjAlwyUi1MiYu1XSyBirseQf TyaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=kmtg0NXY; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id r2-20020ad45762000000b0042c4043733esi5205474qvx.141.2022.03.01.02.17.53 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 01 Mar 2022 02:17:53 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=kmtg0NXY; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:42674 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nOzZo-0007Dy-Pv for patch@linaro.org; Tue, 01 Mar 2022 05:17:52 -0500 Received: from eggs.gnu.org ([209.51.188.92]:49590) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nOzF0-0007ym-Fa for qemu-devel@nongnu.org; Tue, 01 Mar 2022 04:56:22 -0500 Received: from [2a00:1450:4864:20::530] (port=36464 helo=mail-ed1-x530.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nOzEx-0001xY-9x for qemu-devel@nongnu.org; Tue, 01 Mar 2022 04:56:22 -0500 Received: by mail-ed1-x530.google.com with SMTP id cm8so21263485edb.3 for ; Tue, 01 Mar 2022 01:56:18 -0800 (PST) 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=2Kziok9V9LX6bcnJwQ9kOgg8CqbcOF/m3urdub8sZUQ=; b=kmtg0NXY569L7pEXa8FFbnTPrclVqemx8fqnkY+STOfOONpGcbu+ik016AyztbiFqK uB60bFjXFNVuh4+8s12byETSWzGvfRcH+wUqF3kwXsj/bGIIt7hN7zwg8tkKyengO0WI uOy06+WWQiVeCGa6BA+Zj4W9WFKPMl66ne38f/mjgyFD4Q86jtMzZORMy040HUAhVA1N he1VXSEUS73rb4FZSkxufyvgf7xUF07QjWbPdCN5hgscWb6nHt/IOSB/WKX06dx8lgoQ ZCZEpycJFLYJ/l/6lXsD98t+crypWBfyeIw4SRZyFQgZa1fGCxU4u2WHFjexTkJ9Iz93 fZPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=2Kziok9V9LX6bcnJwQ9kOgg8CqbcOF/m3urdub8sZUQ=; b=AqdLX4cTSIsJg26ahtJR87LNGz8g+vCyiASuFXbJJ0g5tHk4YFYRBRTM20b2ImI4cv L4IOvbFefbxaIDGsA2elm8Be9dO5BoB2Yambo+Z7zfQtrTnT2DXVsQbgvkOgkRwH/Ihh 2gv2P6UQnj/UwWPGEYaytIyJmvPlQMyRg/Dg2b7cALevQZfsqIUh2FEPqfW7sByPjgvW 0IdZ4QUWZ0x6BgAJh5YmAYPwo4sxcq/UU1IPMCntgm5QfVXk25vGy8jSlh5CakRaybqD 9m6CQbbBq+JchYnvVqG9BXlOwd+z8HfqbbqRzb6N5tdO4HkOis10Ior3AaG7wGFG+J3v 3SNg== X-Gm-Message-State: AOAM5306xCtRquqB2mw7uvOUwMrKJECRGPlkFs9P8nSnMmq5VxKYWq4A r75TTPyMvbMfqR37RcSMKnokKA== X-Received: by 2002:a50:baaa:0:b0:410:a098:2a7f with SMTP id x39-20020a50baaa000000b00410a0982a7fmr24023096ede.53.1646128577765; Tue, 01 Mar 2022 01:56:17 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id u19-20020a17090617d300b006cea86ca384sm5032357eje.40.2022.03.01.01.56.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Mar 2022 01:56:16 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id E40661FFC9; Tue, 1 Mar 2022 09:47:16 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 17/18] semihosting/arm-compat: replace heuristic for softmmu SYS_HEAPINFO Date: Tue, 1 Mar 2022 09:47:14 +0000 Message-Id: <20220301094715.550871-18-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220301094715.550871-1-alex.bennee@linaro.org> References: <20220301094715.550871-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::530 (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::530; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x530.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 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, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Keith Packard , Andrew Strauss , =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" The previous numbers were a guess at best and rather arbitrary without taking into account anything that might be loaded. Instead of using guesses based on the state of registers implement a new function that: a) scans the MemoryRegions for the largest RAM block b) iterates through all "ROM" blobs looking for the biggest gap The "ROM" blobs include all code loaded via -kernel and the various -device loader techniques. Signed-off-by: Alex Bennée Cc: Andrew Strauss Cc: Keith Packard Reviewed-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20220225172021.3493923-18-alex.bennee@linaro.org> diff --git a/include/hw/loader.h b/include/hw/loader.h index 4fa485bd61..5572108ba5 100644 --- a/include/hw/loader.h +++ b/include/hw/loader.h @@ -343,4 +343,18 @@ int rom_add_option(const char *file, int32_t bootindex); * overflow on real hardware too. */ #define UBOOT_MAX_GUNZIP_BYTES (64 << 20) +typedef struct RomGap { + hwaddr base; + size_t size; +} RomGap; + +/** + * rom_find_largest_gap_between: return largest gap between ROMs in given range + * + * Given a range of addresses, this function finds the largest + * contiguous subrange which has no ROMs loaded to it. That is, + * it finds the biggest gap which is free for use for other things. + */ +RomGap rom_find_largest_gap_between(hwaddr base, size_t size); + #endif diff --git a/hw/core/loader.c b/hw/core/loader.c index 19edb928e9..ca2f2431fb 100644 --- a/hw/core/loader.c +++ b/hw/core/loader.c @@ -1333,6 +1333,92 @@ static Rom *find_rom(hwaddr addr, size_t size) return NULL; } +typedef struct RomSec { + hwaddr base; + int se; /* start/end flag */ +} RomSec; + + +/* + * Sort into address order. We break ties between rom-startpoints + * and rom-endpoints in favour of the startpoint, by sorting the 0->1 + * transition before the 1->0 transition. Either way round would + * work, but this way saves a little work later by avoiding + * dealing with "gaps" of 0 length. + */ +static gint sort_secs(gconstpointer a, gconstpointer b) +{ + RomSec *ra = (RomSec *) a; + RomSec *rb = (RomSec *) b; + + if (ra->base == rb->base) { + return ra->se - rb->se; + } + return ra->base > rb->base ? 1 : -1; +} + +static GList *add_romsec_to_list(GList *secs, hwaddr base, int se) +{ + RomSec *cand = g_new(RomSec, 1); + cand->base = base; + cand->se = se; + return g_list_prepend(secs, cand); +} + +RomGap rom_find_largest_gap_between(hwaddr base, size_t size) +{ + Rom *rom; + RomSec *cand; + RomGap res = {0, 0}; + hwaddr gapstart = base; + GList *it, *secs = NULL; + int count = 0; + + QTAILQ_FOREACH(rom, &roms, next) { + /* Ignore blobs being loaded to special places */ + if (rom->mr || rom->fw_file) { + continue; + } + /* ignore anything finishing bellow base */ + if (rom->addr + rom->romsize <= base) { + continue; + } + /* ignore anything starting above the region */ + if (rom->addr >= base + size) { + continue; + } + + /* Save the start and end of each relevant ROM */ + secs = add_romsec_to_list(secs, rom->addr, 1); + + if (rom->addr + rom->romsize < base + size) { + secs = add_romsec_to_list(secs, rom->addr + rom->romsize, -1); + } + } + + /* sentinel */ + secs = add_romsec_to_list(secs, base + size, 1); + + secs = g_list_sort(secs, sort_secs); + + for (it = g_list_first(secs); it; it = g_list_next(it)) { + cand = (RomSec *) it->data; + if (count == 0 && count + cand->se == 1) { + size_t gap = cand->base - gapstart; + if (gap > res.size) { + res.base = gapstart; + res.size = gap; + } + } else if (count == 1 && count + cand->se == 0) { + gapstart = cand->base; + } + count += cand->se; + } + + g_list_free_full(secs, g_free); + return res; +} + /* * Copies memory from registered ROMs to dest. Any memory that is contained in * a ROM between addr and addr + size is copied. Note that this can involve diff --git a/semihosting/arm-compat-semi.c b/semihosting/arm-compat-semi.c index 37963becae..7a51fd0737 100644 --- a/semihosting/arm-compat-semi.c +++ b/semihosting/arm-compat-semi.c @@ -44,6 +44,7 @@ #define COMMON_SEMI_HEAP_SIZE (128 * 1024 * 1024) #else #include "qemu/cutils.h" +#include "hw/loader.h" #ifdef TARGET_ARM #include "hw/arm/boot.h" #endif @@ -144,33 +145,69 @@ typedef struct GuestFD { static GArray *guestfd_array; #ifndef CONFIG_USER_ONLY -#include "exec/address-spaces.h" -/* - * Find the base of a RAM region containing the specified address + +/** + * common_semi_find_bases: find information about ram and heap base + * + * This function attempts to provide meaningful numbers for RAM and + * HEAP base addresses. The rambase is simply the lowest addressable + * RAM position. For the heapbase we ask the loader to scan the + * address space and the largest available gap by querying the "ROM" + * regions. + * + * Returns: a structure with the numbers we need. */ -static inline hwaddr -common_semi_find_region_base(hwaddr addr) + +typedef struct LayoutInfo { + target_ulong rambase; + size_t ramsize; + hwaddr heapbase; + hwaddr heaplimit; +} LayoutInfo; + +static bool find_ram_cb(Int128 start, Int128 len, const MemoryRegion *mr, + hwaddr offset_in_region, void *opaque) { - MemoryRegion *subregion; + LayoutInfo *info = (LayoutInfo *) opaque; + uint64_t size = int128_get64(len); + + if (!mr->ram || mr->readonly) { + return false; + } + + if (size > info->ramsize) { + info->rambase = int128_get64(start); + info->ramsize = size; + } + + /* search exhaustively for largest RAM */ + return false; +} + +static LayoutInfo common_semi_find_bases(CPUState *cs) +{ + FlatView *fv; + LayoutInfo info = { 0, 0, 0, 0 }; + + RCU_READ_LOCK_GUARD(); + + fv = address_space_to_flatview(cs->as); + flatview_for_each_range(fv, find_ram_cb, &info); /* - * Find the chunk of R/W memory containing the address. This is - * used for the SYS_HEAPINFO semihosting call, which should - * probably be using information from the loaded application. + * If we have found the RAM lets iterate through the ROM blobs to + * work out the best place for the remainder of RAM and split it + * equally between stack and heap. */ - QTAILQ_FOREACH(subregion, &get_system_memory()->subregions, - subregions_link) { - if (subregion->ram && !subregion->readonly) { - Int128 top128 = int128_add(int128_make64(subregion->addr), - subregion->size); - Int128 addr128 = int128_make64(addr); - if (subregion->addr <= addr && int128_lt(addr128, top128)) { - return subregion->addr; - } - } + if (info.rambase || info.ramsize > 0) { + RomGap gap = rom_find_largest_gap_between(info.rambase, info.ramsize); + info.heapbase = gap.base; + info.heaplimit = gap.base + gap.size; } - return 0; + + return info; } + #endif #ifdef TARGET_ARM @@ -204,28 +241,6 @@ common_semi_sys_exit_extended(CPUState *cs, int nr) return (nr == TARGET_SYS_EXIT_EXTENDED || is_a64(cs->env_ptr)); } -#ifndef CONFIG_USER_ONLY -#include "hw/arm/boot.h" -static inline target_ulong -common_semi_rambase(CPUState *cs) -{ - CPUArchState *env = cs->env_ptr; - const struct arm_boot_info *info = env->boot_info; - target_ulong sp; - - if (info) { - return info->loader_start; - } - - if (is_a64(env)) { - sp = env->xregs[31]; - } else { - sp = env->regs[13]; - } - return common_semi_find_region_base(sp); -} -#endif - #endif /* TARGET_ARM */ #ifdef TARGET_RISCV @@ -251,17 +266,6 @@ common_semi_sys_exit_extended(CPUState *cs, int nr) return (nr == TARGET_SYS_EXIT_EXTENDED || sizeof(target_ulong) == 8); } -#ifndef CONFIG_USER_ONLY - -static inline target_ulong -common_semi_rambase(CPUState *cs) -{ - RISCVCPU *cpu = RISCV_CPU(cs); - CPURISCVState *env = &cpu->env; - return common_semi_find_region_base(env->gpr[xSP]); -} -#endif - #endif /* @@ -1165,12 +1169,12 @@ target_ulong do_common_semihosting(CPUState *cs) case TARGET_SYS_HEAPINFO: { target_ulong retvals[4]; - target_ulong limit; int i; #ifdef CONFIG_USER_ONLY TaskState *ts = cs->opaque; + target_ulong limit; #else - target_ulong rambase = common_semi_rambase(cs); + LayoutInfo info = common_semi_find_bases(cs); #endif GET_ARG(0); @@ -1201,12 +1205,10 @@ target_ulong do_common_semihosting(CPUState *cs) retvals[2] = ts->stack_base; retvals[3] = 0; /* Stack limit. */ #else - limit = current_machine->ram_size; - /* TODO: Make this use the limit of the loaded application. */ - retvals[0] = rambase + limit / 2; - retvals[1] = rambase + limit; - retvals[2] = rambase + limit; /* Stack base */ - retvals[3] = rambase; /* Stack limit. */ + retvals[0] = info.heapbase; /* Heap Base */ + retvals[1] = info.heaplimit; /* Heap Limit */ + retvals[2] = info.heaplimit; /* Stack base */ + retvals[3] = info.heapbase; /* Stack limit. */ #endif for (i = 0; i < ARRAY_SIZE(retvals); i++) { From patchwork Tue Mar 1 09:47:15 2022 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: 547258 Delivered-To: patch@linaro.org Received: by 2002:ac0:9f50:0:0:0:0:0 with SMTP id l16csp3537698imf; Tue, 1 Mar 2022 02:23:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJzYFddehVbyDl6MprSsPXA4z0nHZEuwZYlx+YX1wowHb8Gcz77PJzEOqDTgxYaA5e8lj8KE X-Received: by 2002:a05:620a:2183:b0:648:cd3f:b255 with SMTP id g3-20020a05620a218300b00648cd3fb255mr13315656qka.86.1646130182688; Tue, 01 Mar 2022 02:23:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646130182; cv=none; d=google.com; s=arc-20160816; b=gzQi6KffxGzGr2O2mAVLPIXcoESlSDvuX6a4XBlwF4bNLRc9D3UcDxOP3muhT+uQhz D0Emv0CJPE82IsP1Y3BKchH0UGW+sy8wo9Ub1O8FxW7/w/F/TAXElItxkuOdRRD4ppH0 GP6UZjDKakSbMvzXjJRIMhjGwXlKYi9qGv+PjFCX3cmOefGsbr3VOANMIuztPgHp0rvu +BkqjRwYK2edNbWScWp6HQ6NWq618GUATB/AfVXVTnftjLNJF/oERU65Eoo0BgUKmVnH oqK6EXvAYRK5/+S1PPE8qdXQpFB9+dr/vfUI4ddbbt9mWfzDV+BMTY7M3+IwO7xKQxi9 yRcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=9R6z4B4mLQw367uaJ4iZig/x1Xw1bFRMsLiBv+G2ki8=; b=XSQ9FF0sOl+qdXrzPWAHXnJ+MknaBZ7z0dhlFUG3zOXrQZkyyxrBQXVX8WtRYt0bVl tYM5inOUn38cFyyT0dZBiceQgE57BwpF773G42HH7wa1YrmWqfwftbj6h0W11OqsU7hl X4tqO/c8SuNdLObdEy3wxE7dseTeqjvL2Up2EK2xp4hiKXsd8e09Npgij/pZW+cPV/6/ Uki8yOq8dha7eO1x4jmB+eTItbvP5YN5BWu+OL6wO/lDykRUnVYK/iuN+glq5nulCx8n OP8JFeDpwMNvxFqgZ5n4jeYN64o3BPGzSoyqlm4BJCB0nUhqDwkvgKpSEs/wiwmmGRFY Wmqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=TQq3gcfz; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id o27-20020a05620a22db00b00648e88ee67fsi4241454qki.707.2022.03.01.02.23.02 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 01 Mar 2022 02:23:02 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=TQq3gcfz; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:49116 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nOzeo-0003OR-7l for patch@linaro.org; Tue, 01 Mar 2022 05:23:02 -0500 Received: from eggs.gnu.org ([209.51.188.92]:49566) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nOzEz-0007yk-UQ for qemu-devel@nongnu.org; Tue, 01 Mar 2022 04:56:22 -0500 Received: from [2a00:1450:4864:20::62f] (port=33567 helo=mail-ej1-x62f.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nOzEx-0001xO-9j for qemu-devel@nongnu.org; Tue, 01 Mar 2022 04:56:21 -0500 Received: by mail-ej1-x62f.google.com with SMTP id kt27so1247039ejb.0 for ; Tue, 01 Mar 2022 01:56:18 -0800 (PST) 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=9R6z4B4mLQw367uaJ4iZig/x1Xw1bFRMsLiBv+G2ki8=; b=TQq3gcfzRziqDVVKW7ML8jejLp+dF63fMJ5uHLXDBMSjq4cnh9EfLlUUrHpYbyR4sL eJm1zKwqV3WVd/crcfaZzXop9okmDtyWNRcYwRpwTHXXtg8y0sERTFGBTiaELNRqgxLw 6/2nPpWnB6zpa+rH4H+z1D0Xik/Ez4VIzTrXfnpzSR0+2nOb+cYJBgf/XNpAGK6O/UR/ xzTBmZQEZCxzYWeix4g8+OzBpk6XJhsEzl4nT1MCo61ExCKxxIL9pfazKjGTar9PJf57 RfkBplejo2pVv93GWBM1U5VFDHTewAkImz2FUmbVUzXM+VMROBGmBQHune7PcTedYk1c /ZDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=9R6z4B4mLQw367uaJ4iZig/x1Xw1bFRMsLiBv+G2ki8=; b=lMauhKCerAD38y0KRIWsOg6gC510k+KO+FOg5XPYCiZZJ4XSvp8+cehbFBIx6bJ920 N3dyNWTSofH+/y/svQl8BcMHMZMbzw3Fbmw6XPwCL/rxn6tHg+MHWG1u+SxemBf2PXhr uztOAd/JUIiotj5UiQOHent2800lYsg4qYdoEG6TID+w0ddgS5Ny6E+ZcwAn/bcA0u+6 XdBlDbPbu4pxj2qsqiJGFZMWBZ26fbcCSa1FgeXUDGR5gDdMCBTD0oIMCKP3/vBeC67u B/3wN+o96IQh+0e05BI1tnsVRh3KyEzAN8qQ41LzrGtXhYE7DkSRXRc7JA6lT/C5sHBu /thQ== X-Gm-Message-State: AOAM532f3OB2MZeMpprxxkGvIv55iF/MUyIlKoktYe8E3VoZQNJHrcrd nhCaNHOYgl+l2jDjlqZr3of8lQ== X-Received: by 2002:a17:906:743:b0:6d0:7f19:d737 with SMTP id z3-20020a170906074300b006d07f19d737mr18550517ejb.11.1646128576865; Tue, 01 Mar 2022 01:56:16 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id ov6-20020a170906fc0600b006cf54ef58ddsm5256400ejb.149.2022.03.01.01.56.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Mar 2022 01:56:16 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 04F4E1FFCA; Tue, 1 Mar 2022 09:47:17 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 18/18] tests/tcg: port SYS_HEAPINFO to a system test Date: Tue, 1 Mar 2022 09:47:15 +0000 Message-Id: <20220301094715.550871-19-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220301094715.550871-1-alex.bennee@linaro.org> References: <20220301094715.550871-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::62f (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::62f; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x62f.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 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, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "open list:ARM TCG CPUs" , =?utf-8?q?Alex_Benn?= =?utf-8?q?=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" This allows us to check our new SYS_HEAPINFO implementation generates sane values. Signed-off-by: Alex Bennée Reviewed-by: Peter Maydell Message-Id: <20220225172021.3493923-19-alex.bennee@linaro.org> diff --git a/tests/tcg/aarch64/system/semiheap.c b/tests/tcg/aarch64/system/semiheap.c new file mode 100644 index 0000000000..4ed258476d --- /dev/null +++ b/tests/tcg/aarch64/system/semiheap.c @@ -0,0 +1,93 @@ +/* + * Semihosting System HEAPINFO Test + * + * Copyright (c) 2021 Linaro Ltd + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#include +#include +#include + +#define SYS_HEAPINFO 0x16 + +uintptr_t __semi_call(uintptr_t type, uintptr_t arg0) +{ + register uintptr_t t asm("x0") = type; + register uintptr_t a0 asm("x1") = arg0; + asm("hlt 0xf000" + : "=r" (t) + : "r" (t), "r" (a0) + : "memory" ); + + return t; +} + +int main(int argc, char *argv[argc]) +{ + struct { + void *heap_base; + void *heap_limit; + void *stack_base; + void *stack_limit; + } info = { }; + void *ptr_to_info = (void *) &info; + uint32_t *ptr_to_heap; + int i; + + ml_printf("Semihosting Heap Info Test\n"); + + __semi_call(SYS_HEAPINFO, (uintptr_t) &ptr_to_info); + + if (info.heap_base == NULL || info.heap_limit == NULL) { + ml_printf("null heap: %p -> %p\n", info.heap_base, info.heap_limit); + return -1; + } + + /* Error if heap base is above limit */ + if ((uintptr_t) info.heap_base >= (uintptr_t) info.heap_limit) { + ml_printf("heap base %p >= heap_limit %p\n", + info.heap_base, info.heap_limit); + return -2; + } + + if (info.stack_base == NULL) { + ml_printf("null stack: %p -> %p\n", info.stack_base, info.stack_limit); + return -3; + } + + /* + * boot.S put our stack somewhere inside the data segment of the + * ELF file, and we know that SYS_HEAPINFO won't pick a range + * that overlaps with part of a loaded ELF file. So the info + * struct (on the stack) should not be inside the reported heap. + */ + if (ptr_to_info > info.heap_base && ptr_to_info < info.heap_limit) { + ml_printf("info appears to be inside the heap: %p in %p:%p\n", + ptr_to_info, info.heap_base, info.heap_limit); + return -4; + } + + ml_printf("heap: %p -> %p\n", info.heap_base, info.heap_limit); + ml_printf("stack: %p <- %p\n", info.stack_limit, info.stack_base); + + /* finally can we read/write the heap */ + ptr_to_heap = (uint32_t *) info.heap_base; + for (i = 0; i < 512; i++) { + *ptr_to_heap++ = i; + } + ptr_to_heap = (uint32_t *) info.heap_base; + for (i = 0; i < 512; i++) { + uint32_t tmp = *ptr_to_heap; + if (tmp != i) { + ml_printf("unexpected value in heap: %d @ %p", tmp, ptr_to_heap); + return -5; + } + ptr_to_heap++; + } + ml_printf("r/w to heap upto %p\n", ptr_to_heap); + + ml_printf("Passed HeapInfo checks\n"); + return 0; +} diff --git a/MAINTAINERS b/MAINTAINERS index fa8adc2618..68adaac373 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3549,6 +3549,7 @@ S: Maintained F: semihosting/ F: include/semihosting/ F: tests/tcg/multiarch/arm-compat-semi/ +F: tests/tcg/aarch64/system/semiheap.c Multi-process QEMU M: Elena Ufimtseva