From patchwork Fri Nov 11 14:55:18 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: 623744 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp828064pvb; Fri, 11 Nov 2022 06:58:19 -0800 (PST) X-Google-Smtp-Source: AA0mqf43xD4Elm2YUO+CcPLK1Z8Q+UCIrbNOVLUdg40tIZpSlE23nP8/tp2Ovc1t655cKghoRujN X-Received: by 2002:a0c:c20a:0:b0:496:6092:9f0f with SMTP id l10-20020a0cc20a000000b0049660929f0fmr2181788qvh.32.1668178699623; Fri, 11 Nov 2022 06:58:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668178699; cv=none; d=google.com; s=arc-20160816; b=AYl3iAUY8oX/Rhzqu7hQk3Ph/+96TEHwnE/dtF8nk4DILkxKLfeFErmM+JWYTFVseU XafBtzeqvZh7WPnI6U0MiWl1wilpq1f494I7aR0508kOD8Ikl/BqKQi250aP3dYVbwyZ utdIrJ4lNK53KCmNH4tKvXS5yKfOtNOMtawTFUDtzl+jRKB2CfSy2vlvHEJgXJ397mnq jOSjSNBtp+mKtCvdZAAvDnPXCWdHjp5J4ahFjMiYLPTm04JH39PkwLq+7QdPQ05IzinB hox5hXh0XnF30b27gnpnCSk2M6yXAvwSXRI4zd0B7lwflMhz73k1041tVF1RUZ6A0HqI K85g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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:cc:to :from:dkim-signature; bh=XsIUPL4URppAX7w6NGrUdBT/BUmCRhwxzbv6AwfzKCA=; b=pJgpyN99AN4mbUREn8d7KRBNLU+yMdelkwtSr36UFwi0IbhF3AA1HWiJYEhc1myPhp ERGJzcm2G+n3kjrmFm3CeM4CFdqCh9mSIuPqFksDvf5Y0ei1u2bAPly3Q7hqCqOZKvtc HMLy9JK5oT//i0fB4ATJ+QOvTruRlLGtfBGBHyHe9eWOdAZeI37HBSLDcrEEDjkzpf9Y i/gYrYQSrrWMLMR0dAa2rtaIO2KCIZGE4fStdLwgwTyLA5F7OAXdUhoGRFBToKqXLHqZ BAwDqoxsglgdtkHBhgnTlFLgcJWelWzlpCmSOKPawRkJNm4a3fXOwJlOiDu8HlabBrw/ F/KA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HtrhliDQ; 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=pass (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 i7-20020ac87647000000b0039cefc6b46esi1056441qtr.312.2022.11.11.06.58.19 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 11 Nov 2022 06:58:19 -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=pass header.i=@linaro.org header.s=google header.b=HtrhliDQ; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1otVRa-000745-38; Fri, 11 Nov 2022 09:55:46 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1otVRO-000708-Ls for qemu-devel@nongnu.org; Fri, 11 Nov 2022 09:55:35 -0500 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1otVRN-0007wS-3N for qemu-devel@nongnu.org; Fri, 11 Nov 2022 09:55:34 -0500 Received: by mail-wr1-x433.google.com with SMTP id w14so6773367wru.8 for ; Fri, 11 Nov 2022 06:55:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=XsIUPL4URppAX7w6NGrUdBT/BUmCRhwxzbv6AwfzKCA=; b=HtrhliDQn7ww5CSLs9qkjc3/H9NCaHO6AI326r3eZ27wZVABgVxI2mwwi77VAmRWaS Ygtb2k/snzSDMeYrPzRSEk4+9pEjIe61a4XzMWmmI8JI0BInwgbH1nMDf0AnfIRWMfFp /fGRvFR2lbrPzwG7E4faFgHoojXljvMymXHFBRTR9QoxlbSJuuIuw8rvd0jwT6X3Nhtu aO5OoX69iL9nbzkLdwHqpCscjMloH4GXW+lhpYXkQK/nkGtiEZxWHm26bfFaJMxoC6dO c4kjHlKpBgdFq1FZKmIvW2N8PH4kxS/YF0lLUtWMx3VmLlBZC/nYZeklhLDct6c/bDOr lyVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=XsIUPL4URppAX7w6NGrUdBT/BUmCRhwxzbv6AwfzKCA=; b=j91vbJokMZnpSXfvMOcRYtMcs0/8yZWVPItoXwx0HT23OhqgfmfI0YqhFvdbFxyGKU OmJ+sJFYhcfjApspzlIlEGJjiKm/KhdqsT4vnt+HyB1ZIWgGBkxRjxuJ4mkQsZk3w0Yf 8sok/cWt2ifh8jX9koVYJfFEgIn1A2NebL7ktXCOaFFuKrcB0/VQDmfR5q9atGqza2Ka LB/D7euUD/eIVN6EFYF7GePEsJbpa26iuIEtOLsRDpDpH9ZEzcTU064e+3506+xopu14 kbcXh9JoZZQOeYmJWY3evtv/iA9GGcKS1HBvPKFTHX9wcn/0OOL2BK9VekSorf5YRC1p +L1w== X-Gm-Message-State: ANoB5pk/NQ/GfxmzFdXNY11oTWpNQq+6+xiPFpMdhls/seYPnPH58msg NDLtqKsZDJQ+gh8s0hzTirGXOw== X-Received: by 2002:adf:f211:0:b0:23a:43b7:cdd5 with SMTP id p17-20020adff211000000b0023a43b7cdd5mr1445319wro.387.1668178531149; Fri, 11 Nov 2022 06:55:31 -0800 (PST) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id q12-20020a05600c46cc00b003b4ac05a8a4sm11740229wmo.27.2022.11.11.06.55.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Nov 2022 06:55:30 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 16F6E1FFB8; Fri, 11 Nov 2022 14:55:30 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: fam@euphon.net, berrange@redhat.com, f4bug@amsat.org, aurelien@aurel32.net, pbonzini@redhat.com, stefanha@redhat.com, crosa@redhat.com, Stefan Weil , =?utf-8?q?Alex_Benn=C3=A9e?= , Thomas Huth Subject: [PATCH v2 01/12] Run docker probe only if docker or podman are available Date: Fri, 11 Nov 2022 14:55:18 +0000 Message-Id: <20221111145529.4020801-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221111145529.4020801-1-alex.bennee@linaro.org> References: <20221111145529.4020801-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::433; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x433.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Stefan Weil The docker probe uses "sudo -n" which can cause an e-mail with a security warning each time when configure is run. Therefore run docker probe only if either docker or podman are available. That avoids the problematic "sudo -n" on build environments which have neither docker nor podman installed. Fixes: c4575b59155e2e00 ("configure: store container engine in config-host.mak") Signed-off-by: Stefan Weil Message-Id: <20221030083510.310584-1-sw@weilnetz.de> Signed-off-by: Alex Bennée Reviewed-by: Thomas Huth --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index 66928692b0..26c7bc5154 100755 --- a/configure +++ b/configure @@ -1780,7 +1780,7 @@ fi # functions to probe cross compilers container="no" -if test $use_containers = "yes"; then +if test $use_containers = "yes" && (has "docker" || has "podman"); then case $($python "$source_path"/tests/docker/docker.py probe) in *docker) container=docker ;; podman) container=podman ;; From patchwork Fri Nov 11 14:55:19 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: 623746 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp828127pvb; Fri, 11 Nov 2022 06:58:27 -0800 (PST) X-Google-Smtp-Source: AA0mqf7v/XuYR+XoV7OJGr7IkDe+zF+DakYZW5V0droWFBo6/gATMTz62C6dtvZx5QoDjFycyfPO X-Received: by 2002:a37:bc05:0:b0:6f9:de1b:8814 with SMTP id m5-20020a37bc05000000b006f9de1b8814mr1352126qkf.18.1668178707419; Fri, 11 Nov 2022 06:58:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668178707; cv=none; d=google.com; s=arc-20160816; b=hDv0UzeHaoskFNYt1slK34D3391YjlYw86yYpBUHkb751IjoR7MlF6wJs4FbzNMwCZ 7hvpDd+HhNiT1ZZhUHUya9D6WDLyrS4mdnfLq6o4bk8QNM65LZTdt7heehCDuMpIVL8O R/s2wxz/kbOirJA5VZDj8qPdRdKjVE2RJ5oDCKf5ZhGFWqS9PgdwwyplVbUJIiGSH4oC dRH5gMB2GDutl5iaTk3zsJ8td+OOAhMX0PhC4hSfEnV4pI0Iu5napEY2LxZOItVb/AEC Yt9oq0HgQpGcStGANjSkVgnp7/EmBBjN9U7WgcNtTn4HFtZPY931IJU8gnIfgQX81RjC ZmkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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:cc:to :from:dkim-signature; bh=75StTBtdrjatadUr5+DBEpHqiRy77mt4SctT5IRzcL0=; b=y4SKfFHfhgIjEjhziqHp2kKz+vMe+TgttYTglYiDlmNioudtOiFEVIh0Qoi4HFxQ2U GoX3MlEYV8T5O8QYbpeR09SAl1aLaW7VFg6b/dnaX/OdFo52U2s81Sa2nh5kL61Kv1NX Gl7fVEdk11FftNO/7TWHzkDVBug+mJByZxCckaspiWotIdwtRDrqRh0bZpQCrONnXLXW dHv/Z6cGhgFi735lyhc7JyAw75QK6llBzHOMpo4Z2DAJ9+pLhmBMTj/vFZC8flVP81Aq ENk+BZSLwtXccwt+4X5v9m+vuYi74xIulqm+9Nd/GavOQjjNhNvfMnZ0z0M7Gh7vCw6x dcWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ztsHlHrP; 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=pass (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 gd11-20020a05622a5c0b00b0039cb84b2f4csi1065519qtb.763.2022.11.11.06.58.27 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 11 Nov 2022 06:58:27 -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=pass header.i=@linaro.org header.s=google header.b=ztsHlHrP; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1otVRa-00074R-4a; Fri, 11 Nov 2022 09:55:46 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1otVRR-00070h-Ld for qemu-devel@nongnu.org; Fri, 11 Nov 2022 09:55:38 -0500 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1otVRO-0007wc-T1 for qemu-devel@nongnu.org; Fri, 11 Nov 2022 09:55:36 -0500 Received: by mail-wm1-x32c.google.com with SMTP id i10-20020a1c3b0a000000b003cfd36eff5fso655660wma.3 for ; Fri, 11 Nov 2022 06:55:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=75StTBtdrjatadUr5+DBEpHqiRy77mt4SctT5IRzcL0=; b=ztsHlHrPcLJPcjESV0+FxRD8thgTLVajkWt9MP/FxRxNkGNCmIkcoHCqi7pAYsIs9U YsfOXln2gJ3ELN/ystPLYdmb0NDClSf4/a6kRzDiFTdkKwjeBUk0zqaQyoZ3+QfcHokC tRESEmriBYTdvO+lcCLh5h4BMhuzSlntWKdH1ItJOe7xbWdoL8828Olf88SAQtyA5Ly3 WVzMxXB52D9e4sTIj23seyn8GahD1YMymZpZxawMfO8MK8EbfB45Gx0jL/Vs6TlfAJ0e xnXb/XD9o+2mZdSFwPnuRJrO/QKvxj8e7sTky+7ghAvmadLyW2Kk7fjOvmCJwKUOtu3p uZ6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=75StTBtdrjatadUr5+DBEpHqiRy77mt4SctT5IRzcL0=; b=rZeoKNqVEzv8uD+aq7k5EefF8mg/QT1XZrLjFP7sJGij7jWncydSFHqUWP5HePExAC u+ETjp6UZXzaUH1pBB7FxagChVsiDso/FSHAYRsgfNICUcZwEsQs9bir5wMsTT3t4AvW HIt/HwsB85ZRjGf+95euQBM5rP2yYpgrZEYl8g7G4Cir/UtbheYJs51GighOdR5naoKV WVkEDVUToaAeUPJ0pECVw63/LH/Gti2XTV0vQaz58wuRYtqBuI4N/R+SAv6tl/AjzSuJ vK8CYIIYKhDyCvzadgzrux1X4vQ5BxZEIUR7Ega0FW68+FHzbgLhM20/XW4rHfedSkDQ dQOw== X-Gm-Message-State: ANoB5pl6yzzxI1HFla5oaP9yua/C68BMc3TYKtjA9KKuWy5M6QA29/ps 0LwctIuyY9SDx/5k7dyrFc504g== X-Received: by 2002:a05:600c:358e:b0:3cf:8b53:747f with SMTP id p14-20020a05600c358e00b003cf8b53747fmr1537819wmq.192.1668178532563; Fri, 11 Nov 2022 06:55:32 -0800 (PST) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id b3-20020adff903000000b002366fb99cdasm2126461wrr.50.2022.11.11.06.55.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Nov 2022 06:55:31 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 2E41B1FFBA; Fri, 11 Nov 2022 14:55:30 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: fam@euphon.net, berrange@redhat.com, f4bug@amsat.org, aurelien@aurel32.net, pbonzini@redhat.com, stefanha@redhat.com, crosa@redhat.com, =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Beraldo Leal Subject: [PATCH v2 02/12] tests/avocado: improve behaviour waiting for login prompts Date: Fri, 11 Nov 2022 14:55:19 +0000 Message-Id: <20221111145529.4020801-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221111145529.4020801-1-alex.bennee@linaro.org> References: <20221111145529.4020801-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org This attempts to deal with the problem of login prompts not being guaranteed to be terminated with a newline. The solution to this is to peek at the incoming data looking to see if we see an up-coming match before we fall back to the old readline() logic. The reason to mostly rely on readline is because I am occasionally seeing the peek stalling despite data being there. This seems kinda hacky and gross so I'm open to alternative approaches and cleaner python code. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé --- v2 - remove superfluous /r/n --- tests/avocado/avocado_qemu/__init__.py | 89 +++++++++++++++++++++++++- 1 file changed, 88 insertions(+), 1 deletion(-) diff --git a/tests/avocado/avocado_qemu/__init__.py b/tests/avocado/avocado_qemu/__init__.py index 910f3ba1ea..20cba57161 100644 --- a/tests/avocado/avocado_qemu/__init__.py +++ b/tests/avocado/avocado_qemu/__init__.py @@ -131,6 +131,58 @@ def pick_default_qemu_bin(bin_prefix='qemu-system-', arch=None): return path return None +def _peek_ahead(console, min_match, success_message): + """ + peek ahead in the console stream keeping an eye out for the + success message. + + Returns some message to process or None, indicating the normal + readline should occur. + """ + console_logger = logging.getLogger('console') + peek_len = 0 + retries = 0 + + while True: + try: + old_peek_len = peek_len + peek_ahead = console.peek(min_match).decode() + peek_len = len(peek_ahead) + + # if we get stuck too long lets just fallback to readline + if peek_len <= old_peek_len: + retries += 1 + if retries > 10: + return None + + # if we see a newline in the peek we can let safely bail + # and let the normal readline() deal with it + if peek_ahead.endswith(('\n', '\r')): + return None + + # if we haven't seen enough for the whole message but the + # first part matches lets just loop again + if len(peek_ahead) < min_match and \ + success_message[:peek_len] in peek_ahead: + continue + + # if we see the whole success_message we are done, consume + # it and pass back so we can exit to the user + if success_message in peek_ahead: + return console.read(peek_len).decode() + + # of course if we've seen enough then this line probably + # doesn't contain what we are looking for, fallback + if peek_len > min_match: + return None + + except UnicodeDecodeError: + console_logger.log("error in decode of peek") + return None + + # we should never get here + return None + def _console_interaction(test, success_message, failure_message, send_string, keep_sending=False, vm=None): @@ -139,17 +191,52 @@ def _console_interaction(test, success_message, failure_message, vm = test.vm console = vm.console_socket.makefile(mode='rb', encoding='utf-8') console_logger = logging.getLogger('console') + + # Establish the minimum number of bytes we would need to + # potentially match against success_message + if success_message is not None: + min_match = len(success_message) + else: + min_match = 0 + + console_logger.debug("looking for %d:(%s), sending %s (always=%s)", + min_match, success_message, send_string, keep_sending) + while True: + msg = None + + # First send our string, optionally repeating the send next + # cycle. if send_string: vm.console_socket.sendall(send_string.encode()) if not keep_sending: send_string = None # send only once + + # If the console has no data to read we briefly + # sleep before continuing. + if not console.readable(): + time.sleep(0.1) + continue + try: - msg = console.readline().decode().strip() + + # First we shall peek ahead for a potential match to cover waiting + # for lines without any newlines. + if min_match > 0: + msg = _peek_ahead(console, min_match, success_message) + + # otherwise we block here for a full line + if not msg: + msg = console.readline().decode().strip() + except UnicodeDecodeError: + console_logger.debug("skipped unicode error") msg = None + + # if nothing came out we continue and try again if not msg: continue + console_logger.debug(msg) if success_message is None or success_message in msg: break From patchwork Fri Nov 11 14:55:20 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: 623736 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp827329pvb; Fri, 11 Nov 2022 06:57:03 -0800 (PST) X-Google-Smtp-Source: AA0mqf6bT4zi8ynIRbxY2LrgSB3k3zonYUQP0NFO5ZLhpKkZcbq+S56bn76Pgud5y+W+HNwAsHN+ X-Received: by 2002:ad4:4e2d:0:b0:4bb:6419:ecfb with SMTP id dm13-20020ad44e2d000000b004bb6419ecfbmr2055655qvb.109.1668178623435; Fri, 11 Nov 2022 06:57:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668178623; cv=none; d=google.com; s=arc-20160816; b=Hf7QJP4gdZO/w87hJ9HSSS4VAj8tqeiPEkgEULPYJZNymhleTeG9ydWJeA/smfi0QD 2riCLmfTxVGQiD+jKLGWKALkrEZeAgbK12CevX6XTie3aGxV33GyR5jJFR/f7IG1JIei 4k9R8t+HW9Hzd50J8Md56Lri6C9l9x8XWl40vWWiKlnY7XugEc/2sFvV0AQn1ydht/ei mHuYEwgVB2XELJ2boWpQN4ecxhw2/OZewPaRN+se+UEfv3/12MmuLaO/RAGT2hKFfIQ0 QMGixqtzQvut6WVxHgRzwBUZEIiKBfpGHeScGn07IchXTXIExoZbOvxAYoDjFfpZuGjf HEOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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:cc:to :from:dkim-signature; bh=qBC/zqhe+w8c2MXv32aYnBZCDh2hCBt3ueKfoisA7Og=; b=VjK3ewShJ7JO7Wm/pXjI4CG+vE4MsE8ahWV3p51F2M4I4UdCoeVv7jHqB3BN3rjXTs hR0FegE1CQpHEE9yfWQ2OQhEaniFu81Ptsgq2OjZ7/+/G9bOnVmdvhsHmRZUdTu2i8WU 43sFZVeHO+XKRVWBQwMJk44OfmZ6xzvpyXTtxNcP8fpgurtM7TE/G2pWtF88lIXIOmLQ pvIw/WNGVLfnkLxhb7NiPQHWP6gyeeTuA5Oe3CqPgSxHZ/2p//dil0A/VKhsezhOkmxD Uu8bwx/dO+olFW557S8jhPjHslgk37+HBkLPJVRMHnHlo9158A7f5cnRwkAdezfLsPfp gInw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gp5Zjraz; 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=pass (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 jt13-20020a05621427ed00b004bb92787ecfsi954996qvb.108.2022.11.11.06.57.03 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 11 Nov 2022 06:57:03 -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=pass header.i=@linaro.org header.s=google header.b=gp5Zjraz; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1otVRc-000761-PS; Fri, 11 Nov 2022 09:55:48 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1otVRZ-00073e-IO for qemu-devel@nongnu.org; Fri, 11 Nov 2022 09:55:45 -0500 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1otVRR-0007wr-E8 for qemu-devel@nongnu.org; Fri, 11 Nov 2022 09:55:45 -0500 Received: by mail-wr1-x42e.google.com with SMTP id o4so6796685wrq.6 for ; Fri, 11 Nov 2022 06:55:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=qBC/zqhe+w8c2MXv32aYnBZCDh2hCBt3ueKfoisA7Og=; b=gp5Zjrazc6exjxIuGhuX/4RSkoj+jz2xD3mKno/aoPch/sgpDIxGdBR+YQajbE7/aK ZfKFqP2UYTyZQ0JSDWshKsSZMrW5s+2a37zEI8H5qHLiRV6y8OjGzkltZEU/CvfiAWPR Ji6twZe1TnxjoPRo8GK5pFM0YQEwC+g2e0ZagQYLpcuCa8SoWT/sWUrZXMVoqV7TcyFB PR0U0I0+Xxk9AVUg9ZoGHrfh3KZFonUktDUAYZ7FrHZO3eRkQsMy64qnpbXR490dlwYJ FOcSv1cDG1IIrS/x5y4C7buh5ZQWzhZUjNrYM2STkc4GT4QAXrgU+trxkkWC4ymFAmur X6ag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=qBC/zqhe+w8c2MXv32aYnBZCDh2hCBt3ueKfoisA7Og=; b=7A8tSvcCAcmXTQQE/1lAxjk5GJtTlBkl4QL9hxhQwcv7hOYTsvkvVpVOEGKTjefbfl ybn6EuR2xmAs5tTxfbOac7RYO8Ir+Aaj8cini69dufQufLJgCxQ9oEjOMbEz8u5pW2P9 sqOGsVfPtWX7VYlQkP8nDuuerEoEajIg+lnFDcVJupuPEchiSDiP6wcqOBMfduGQWHRH 8Sg7DD4FkMm7F1dMNARSUdoewa5X/rs4jAxr4zjvi78/cbolxyEhgg5MvcsCJSJZGSI7 LXicW/J894iUbxPZXsvCwB6vvPWFokll1utaLkMdCzSTf/+3KP93VSlPNXRBqh5JOtX2 1m5A== X-Gm-Message-State: ANoB5pl9GNfsDk+2TCo6AwikvylnNByk5Hgc4d6JWHxNQQYM0hsgh67T SIEhqPl3+Qlugz1uDixXiCn3aQ== X-Received: by 2002:adf:e78c:0:b0:236:704f:29f4 with SMTP id n12-20020adfe78c000000b00236704f29f4mr1486225wrm.11.1668178534336; Fri, 11 Nov 2022 06:55:34 -0800 (PST) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id a26-20020a05600c225a00b003c21ba7d7d6sm2941674wmm.44.2022.11.11.06.55.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Nov 2022 06:55:31 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 44DB01FFBB; Fri, 11 Nov 2022 14:55:30 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: fam@euphon.net, berrange@redhat.com, f4bug@amsat.org, aurelien@aurel32.net, pbonzini@redhat.com, stefanha@redhat.com, crosa@redhat.com, =?utf-8?q?C=C3=A9dric_Le_Goater?= , =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Philippe_M?= =?utf-8?q?athieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Beraldo Leal Subject: [PATCH v2 03/12] tests/avocado/machine_aspeed.py: Reduce noise on the console for SDK tests Date: Fri, 11 Nov 2022 14:55:20 +0000 Message-Id: <20221111145529.4020801-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221111145529.4020801-1-alex.bennee@linaro.org> References: <20221111145529.4020801-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42e; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Cédric Le Goater The Aspeed SDK images are based on OpenBMC which starts a lot of services. The output noise on the console can break from time to time the test waiting for the logging prompt. Change the U-Boot bootargs variable to add "quiet" to the kernel command line and reduce the output volume. This also drops the test on the CPU id which was nice to have but not essential. Signed-off-by: Cédric Le Goater Message-Id: <20221104075347.370503-1-clg@kaod.org> Signed-off-by: Alex Bennée --- tests/avocado/machine_aspeed.py | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/tests/avocado/machine_aspeed.py b/tests/avocado/machine_aspeed.py index fba6527026..1fc385e1c8 100644 --- a/tests/avocado/machine_aspeed.py +++ b/tests/avocado/machine_aspeed.py @@ -12,6 +12,7 @@ from avocado_qemu import wait_for_console_pattern from avocado_qemu import exec_command from avocado_qemu import exec_command_and_wait_for_pattern +from avocado_qemu import interrupt_interactive_console_until_pattern from avocado.utils import archive from avocado import skipIf @@ -182,6 +183,8 @@ def test_arm_ast2600_evb_buildroot(self): class AST2x00MachineSDK(QemuSystemTest): + EXTRA_BOOTARGS = ' quiet' + # FIXME: Although these tests boot a whole distro they are still # slower than comparable machine models. There may be some # optimisations which bring down the runtime. In the meantime they @@ -194,7 +197,7 @@ def wait_for_console_pattern(self, success_message, vm=None): failure_message='Kernel panic - not syncing', vm=vm) - def do_test_arm_aspeed_sdk_start(self, image, cpu_id): + def do_test_arm_aspeed_sdk_start(self, image): self.require_netdev('user') self.vm.set_console() self.vm.add_args('-drive', 'file=' + image + ',if=mtd,format=raw', @@ -202,9 +205,13 @@ def do_test_arm_aspeed_sdk_start(self, image, cpu_id): self.vm.launch() self.wait_for_console_pattern('U-Boot 2019.04') - self.wait_for_console_pattern('## Loading kernel from FIT Image') + interrupt_interactive_console_until_pattern( + self, 'Hit any key to stop autoboot:', 'ast#') + exec_command_and_wait_for_pattern( + self, 'setenv bootargs ${bootargs}' + self.EXTRA_BOOTARGS, 'ast#') + exec_command_and_wait_for_pattern( + self, 'boot', '## Loading kernel from FIT Image') self.wait_for_console_pattern('Starting kernel ...') - self.wait_for_console_pattern('Booting Linux on physical CPU ' + cpu_id) @skipIf(os.getenv('GITLAB_CI'), 'Running on GitLab') def test_arm_ast2500_evb_sdk(self): @@ -221,7 +228,7 @@ def test_arm_ast2500_evb_sdk(self): archive.extract(image_path, self.workdir) self.do_test_arm_aspeed_sdk_start( - self.workdir + '/ast2500-default/image-bmc', '0x0') + self.workdir + '/ast2500-default/image-bmc') self.wait_for_console_pattern('ast2500-default login:') @skipIf(os.getenv('GITLAB_CI'), 'Running on GitLab') @@ -243,7 +250,7 @@ def test_arm_ast2600_evb_sdk(self): self.vm.add_args('-device', 'ds1338,bus=aspeed.i2c.bus.5,address=0x32'); self.do_test_arm_aspeed_sdk_start( - self.workdir + '/ast2600-default/image-bmc', '0xf00') + self.workdir + '/ast2600-default/image-bmc') self.wait_for_console_pattern('ast2600-default login:') exec_command_and_wait_for_pattern(self, 'root', 'Password:') exec_command_and_wait_for_pattern(self, '0penBmc', 'root@ast2600-default:~#') From patchwork Fri Nov 11 14:55:21 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: 623735 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp827228pvb; Fri, 11 Nov 2022 06:56:50 -0800 (PST) X-Google-Smtp-Source: AA0mqf6ur6ICZZsOl4bBCZ8a/6IbWm9BQqMuOoQp+Lf189HPQHo05s8W/3QWfEiPaGW0cS1ij7wq X-Received: by 2002:ac8:48cc:0:b0:3a5:1bd9:fc1 with SMTP id l12-20020ac848cc000000b003a51bd90fc1mr1574136qtr.315.1668178610738; Fri, 11 Nov 2022 06:56:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668178610; cv=none; d=google.com; s=arc-20160816; b=u2JV/uG0i1CE3YdPbgdt4G+aV+YJeKGEZa8KDbTtapZXgY3FPCuqWdzgHZcZ0wSVqm X8gmOv8Eqvncxxg5IHGQtFLtPgkmdXnLisVYvN3EUx2ZAdTT4iIKZCSWEUxZRotSlxsC SdchsBRj4tHNOO+EdqDmup5exs+6BRktMLeir0M5fsWPjr+OrpRvEqg9ZPtBFPDgH1XP bYapD+em8/UOu16nAlMDGddDswbCN9RhIHGIwptkmX0ecjALIsl+k4B46wWeg+ygKebu 4ujcwUqmfnRpo7becJv6AjjACWy9N8g1vT24CK2nfxyHyn6J2ZGc9J77iV22uRuSq0m3 jyag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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:cc:to :from:dkim-signature; bh=7uXwU/1og6Y5YFCCkzlXH6mHIAZKAJashuR6BqLq8xE=; b=yzh1k/945pSMjX0QctR26I3rkKAOzWym/0hn6xT/CCG6cQgJ/g87ovhZ1FBsVm/o2I 30OHQtbs4c6F7Ttz75hOZN1AGTIf/kulEU14RwTO+BeldmdGeBfr6GeOadx0wjb8elxp C+gThZPwmfN6XjTbMgXCtZyeDJAgRk92lweAeowv0TP80Z8IwR5OmAijUVkROrtG+i6o 66AFjGyuQRUJE7QHptE5H/Glhm44J543PZtHjGA766e1rH6oLnljm3t56KjJZ3NVqh9J Tn7NWJ1B1W4xWHtpt5k5FYMNnGm6NSDF7JQ/kJdn7bYk6q9ZVGcuBWkKdVxvj+lQMdM3 YIYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="hISuD/8o"; 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=pass (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 az32-20020a05620a172000b006fa0d6673e0si1076902qkb.138.2022.11.11.06.56.50 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 11 Nov 2022 06:56:50 -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=pass header.i=@linaro.org header.s=google header.b="hISuD/8o"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1otVRW-00072u-SP; Fri, 11 Nov 2022 09:55:42 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1otVRU-00072j-Vh for qemu-devel@nongnu.org; Fri, 11 Nov 2022 09:55:40 -0500 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1otVRR-0007ws-EY for qemu-devel@nongnu.org; Fri, 11 Nov 2022 09:55:40 -0500 Received: by mail-wm1-x32b.google.com with SMTP id t25-20020a1c7719000000b003cfa34ea516so5644537wmi.1 for ; Fri, 11 Nov 2022 06:55:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=7uXwU/1og6Y5YFCCkzlXH6mHIAZKAJashuR6BqLq8xE=; b=hISuD/8oCArKVnAiTPxR6SY2cVCunPN/PNrA6NKRnggfjKVi75e841i50s9ERTXpsF OB0Hclo2GKqviJSRwTTR2zd6HZ2cd+GHsCoxHwMJxD/JRHvWmRtgmCbVvmlU/LQnhqWD cPdf2BqLKj7JqAvNUM4iUc1vo0M+hNz/8TvddrlSXDWTUZM4FQLYeVSnRXOaQoREZcSS VjHKGbHG2nqMZjlZa7SBFo4OlC/RoNKcear6xo5O+9qpcqrU5VYGY4C6dif88jfEyZ6+ DNrLEs+I2V7FmlAoO9gzddNL55UgnAmV+XEN/FxFwDI7SmCGX2op9JGdIwcyEVJ1lnsH uv6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7uXwU/1og6Y5YFCCkzlXH6mHIAZKAJashuR6BqLq8xE=; b=r9bKdNNDu46NTzvRUPzrXaGE4MRgR91VBTkgJD0SpxpUeW4A6JGm1pRpuWWza0HGBK 6/R/94vnAYBUuIwXXG+vSPlRJcjnU7fsCCNAX8V8KNwjOAg31edJRkUFAz4eM5Eel9iD I4dLXwyTHS3ZMvSVz0znxOcob0+BO10gM0UI6g4NtUSI4rpBDAmsurzXZa9XjBwFhgMi W/HkN2e2+ncQrDX7ggp9DyldUvfhcnak7bQcketoq08FdErqTaKbZucAD8tphdT7a+yA 2c70sgKCkVwUObqt76PfYYAMGyWg0Yyd7O+hGN1AbNzVra/4WNChpzheQuD1E6BHTLtc Gg6A== X-Gm-Message-State: ANoB5pnvCEKUU6IC60L7EUbsz2m8Oq6gu9dCNUf4+PJ23aNuF+tcs5aF v2HWHKT/PIKpQVkLJNMcqlK7NQ== X-Received: by 2002:a1c:730a:0:b0:3cf:89c3:3837 with SMTP id d10-20020a1c730a000000b003cf89c33837mr1467779wmb.92.1668178534787; Fri, 11 Nov 2022 06:55:34 -0800 (PST) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id cy6-20020a056000400600b002416ecb8c33sm1802202wrb.105.2022.11.11.06.55.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Nov 2022 06:55:32 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 5ECD41FFBC; Fri, 11 Nov 2022 14:55:30 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: fam@euphon.net, berrange@redhat.com, f4bug@amsat.org, aurelien@aurel32.net, pbonzini@redhat.com, stefanha@redhat.com, crosa@redhat.com, =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Thomas Huth , Wainer dos Santos Moschetta , Beraldo Leal Subject: [PATCH v2 04/12] tests/docker: allow user to override check target Date: Fri, 11 Nov 2022 14:55:21 +0000 Message-Id: <20221111145529.4020801-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221111145529.4020801-1-alex.bennee@linaro.org> References: <20221111145529.4020801-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32b; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org This is useful when trying to bisect a particular failing test behind a docker run. For example: make docker-test-clang@fedora \ TARGET_LIST=arm-softmmu \ TEST_COMMAND="meson test qtest-arm/qos-test" \ J=9 V=1 Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé --- v1 - fix s/target /target./ - CHECK_TARGET -> TEST_COMMAND --- tests/docker/Makefile.include | 2 ++ tests/docker/common.rc | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include index c87f14477a..fc7a3b7e71 100644 --- a/tests/docker/Makefile.include +++ b/tests/docker/Makefile.include @@ -184,6 +184,7 @@ docker: @echo ' TARGET_LIST=a,b,c Override target list in builds.' @echo ' EXTRA_CONFIGURE_OPTS="..."' @echo ' Extra configure options.' + @echo ' TEST_COMMAND="..." Override the default `make check` target.' @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' @@ -230,6 +231,7 @@ docker-run: docker-qemu-src $(if $(NETWORK),$(if $(subst $(NETWORK),,1),--net=$(NETWORK)),--net=none) \ -e TARGET_LIST=$(subst $(SPACE),$(COMMA),$(TARGET_LIST)) \ -e EXTRA_CONFIGURE_OPTS="$(EXTRA_CONFIGURE_OPTS)" \ + -e TEST_COMMAND="$(TEST_COMMAND)" \ -e V=$V -e J=$J -e DEBUG=$(DEBUG) \ -e SHOW_ENV=$(SHOW_ENV) \ $(if $(NOUSER),, \ diff --git a/tests/docker/common.rc b/tests/docker/common.rc index e6f8cee0d6..9a33df2832 100755 --- a/tests/docker/common.rc +++ b/tests/docker/common.rc @@ -63,12 +63,12 @@ check_qemu() { # default to make check unless the caller specifies if [ $# = 0 ]; then - INVOCATION="check" + INVOCATION="${TEST_COMMAND:-make $MAKEFLAGS check}" else - INVOCATION="$@" + INVOCATION="make $MAKEFLAGS $@" fi - make $MAKEFLAGS $INVOCATION + $INVOCATION } test_fail() From patchwork Fri Nov 11 14:55:22 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: 623743 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp827881pvb; Fri, 11 Nov 2022 06:57:59 -0800 (PST) X-Google-Smtp-Source: AA0mqf4URi97LiAO8xGuSieLi4KVmtPMTzMaYP47H3sGvGrPYjR/W1X5vV7zOMzvD2P/KzlA+/1c X-Received: by 2002:a05:620a:12d9:b0:6f9:dd9b:5450 with SMTP id e25-20020a05620a12d900b006f9dd9b5450mr1338567qkl.156.1668178679305; Fri, 11 Nov 2022 06:57:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668178679; cv=none; d=google.com; s=arc-20160816; b=tx6iXiG7gYaOdIaFyjmcPPAauSs6nPZDn0nFSoy3ZtjyVfcR99GomKIiEk9XP5QSe5 S7DgNJER5kSn73ltEhfTFkwkr9399kpY2DzfgOA+3vJMvUx0FqF/gXYUxLQpGDmwqmKb FAzatC0SeSbI2DlitMS561WffsSNCclzyZSM0OC/SkXM6n8560KXU+zC+74C/tig0Lap aoJmrAN7AuQG9wxarTtVCi6xRBNloqtozxXJ4v0p4Brcs6XLkQ2JrDy71lAHSqlnNZxG AUeK2wtTgYyURexXqPusMEsRi5IvIKa8a8VKi/FrW7aRDOCs+KEa5IhAwlMQqlkx5Ou9 CAMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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:cc:to :from:dkim-signature; bh=PETkHCmmDlOk/l4eNJN9a+MTbBUaCZh7Q5yajW/EJQg=; b=XAy5lIulCN3o6ZA+McIiaQQ4JilWGnPrJ83Oq+HbqvqbIak4E0enn0wusGmRatuH9i uei86fbUPuZdP4utdsStZkmZDCXNEf9950VjLcP0ui5jAuElnM0MYljOJmK2tmGVDrQv FKr10eGC7UlfvRknMxiMoQoPI7Dx+ji18ssPFlLxj3U/UY7fWIk2hQ8xlWKGI4eXFGQr qQvtVbDTAxxbe1dki3mH0Umhq8D7GDCu8YKbmOp99FQ6IKmCbEP6zs67FrlljFnTfy9p dVSqJYuee2d12pedxH6hdSMShOEtlnpZK+Pt0jH+YLGAt1koJHsVr8yMpWZvl0o8i82p AanQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lmqNFhAP; 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=pass (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 jx12-20020a0562142b0c00b004b7127d45c8si983209qvb.220.2022.11.11.06.57.59 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 11 Nov 2022 06:57: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=pass header.i=@linaro.org header.s=google header.b=lmqNFhAP; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1otVRa-00074k-S4; Fri, 11 Nov 2022 09:55:46 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1otVRW-00072v-Os for qemu-devel@nongnu.org; Fri, 11 Nov 2022 09:55:42 -0500 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1otVRS-0007wV-4N for qemu-devel@nongnu.org; Fri, 11 Nov 2022 09:55:42 -0500 Received: by mail-wr1-x431.google.com with SMTP id cl5so6774578wrb.9 for ; Fri, 11 Nov 2022 06:55:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=PETkHCmmDlOk/l4eNJN9a+MTbBUaCZh7Q5yajW/EJQg=; b=lmqNFhAPd0uq4pdqXqI6JeP+inMkacYALfhJKy83/YTHUEOpoS0sAJU1TMa93K2siT crmNJ4Z9G8gnS33GWwGTBa04gmSm61Bzc9UAonZnqfJhxJcYljT6Qxvfq3l5nTpb2PwX vK4Gexd9TLd7ytpemHeDlW6ucnlOKqPtt1zVuOMvYP8xgaenzkSG/5He7a8PieYlznPs t5k7nwoApKHliG31NZKXAxgu2hm9c70I99LI/r/l2K4G2J+fxRTTHirN7UpYAgtOTbFH 03BOgZCKhmbimhfzBfHxGqY/BlTm85BVVl9Cbrd0vpGk9tIOtRjEcVbduyq9nlwhlVbx YO4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=PETkHCmmDlOk/l4eNJN9a+MTbBUaCZh7Q5yajW/EJQg=; b=E2kJRIGi4TJYq4d9fhMQwsSXsGgX6e4BbG0a8F089U6PC1risEtSzVpWv89tRZv3n/ /eRfqyZNXNiZLhmSX0afB3wApHFWZBAPdODVzCLCsVywrZjvor7YnC0sFJeM4ZrSXRF6 RnTXPLFKd8OU3ahQ3VCUIBlD3Qi19G46z3N3/zyW/+ObLsBnw0Tyt/en2TWw+KSAPGod Ire2UAt+REhJIOyoUuCXJTG3GV90+pU+9ynKHjHXLB2Zl8RgJSdp6obky4ilfkBpoef3 w6izP5fkTRYow7tyYXzl64fk53RZMHSiVpYb04opaBMJ9dBGH8mNF8KmZRrP5DqArN71 duug== X-Gm-Message-State: ANoB5pkf/iwoov3swsoGUAB5Pw0hX8ULNPOBdzuq8FAMaEwerTZWOEGw wcVDPS/NxrcdK75ljLmOEHW1Qg== X-Received: by 2002:adf:fc8c:0:b0:235:9aae:35a6 with SMTP id g12-20020adffc8c000000b002359aae35a6mr1396708wrr.686.1668178536152; Fri, 11 Nov 2022 06:55:36 -0800 (PST) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id i11-20020a05600c354b00b003b4ff30e566sm3815281wmq.3.2022.11.11.06.55.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Nov 2022 06:55:32 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 7BB3A1FFBD; Fri, 11 Nov 2022 14:55:30 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: fam@euphon.net, berrange@redhat.com, f4bug@amsat.org, aurelien@aurel32.net, pbonzini@redhat.com, stefanha@redhat.com, crosa@redhat.com, =?utf-8?q?Alex_Benn=C3=A9e?= Subject: [PATCH v2 05/12] docs/devel: add a maintainers section to development process Date: Fri, 11 Nov 2022 14:55:22 +0000 Message-Id: <20221111145529.4020801-6-alex.bennee@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221111145529.4020801-1-alex.bennee@linaro.org> References: <20221111145529.4020801-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::431; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x431.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org We don't currently have a clear place in the documentation to describe the roles and responsibilities of a maintainer. Lets create one so we can. I've moved a few small bits out of other files to try and keep everything in one place. Signed-off-by: Alex Bennée Reviewed-by: Stefan Hajnoczi Reviewed-by: Paolo Bonzini Message-Id: <20221012121152.1179051-2-alex.bennee@linaro.org> --- v2 - s/roll/role - s/projects/project's - mention looking after the long term health of area - add a section on becoming a reviewer - expand becoming section - add footnote about key signing --- docs/devel/code-of-conduct.rst | 2 + docs/devel/index-process.rst | 1 + docs/devel/maintainers.rst | 106 +++++++++++++++++++++++ docs/devel/submitting-a-pull-request.rst | 12 +-- 4 files changed, 113 insertions(+), 8 deletions(-) create mode 100644 docs/devel/maintainers.rst diff --git a/docs/devel/code-of-conduct.rst b/docs/devel/code-of-conduct.rst index 195444d1b4..f734ed0317 100644 --- a/docs/devel/code-of-conduct.rst +++ b/docs/devel/code-of-conduct.rst @@ -1,3 +1,5 @@ +.. _code_of_conduct: + Code of Conduct =============== diff --git a/docs/devel/index-process.rst b/docs/devel/index-process.rst index d0d7a200fd..d50dd74c3e 100644 --- a/docs/devel/index-process.rst +++ b/docs/devel/index-process.rst @@ -8,6 +8,7 @@ Notes about how to interact with the community and how and where to submit patch code-of-conduct conflict-resolution + maintainers style submitting-a-patch trivial-patches diff --git a/docs/devel/maintainers.rst b/docs/devel/maintainers.rst new file mode 100644 index 0000000000..05110909d1 --- /dev/null +++ b/docs/devel/maintainers.rst @@ -0,0 +1,106 @@ +.. _maintainers: + +The Role of Maintainers +======================= + +Maintainers are a critical part of the project's contributor ecosystem. +They come from a wide range of backgrounds from unpaid hobbyists +working in their spare time to employees who work on the project as +part of their job. Maintainer activities include: + + - reviewing patches and suggesting changes + - collecting patches and preparing pull requests + - tending to the long term health of their area + - participating in other project activities + +They are also human and subject to the same pressures as everyone else +including overload and burnout. Like everyone else they are subject +to project's :ref:`code_of_conduct` and should also be exemplars of +excellent community collaborators. + +The MAINTAINERS file +-------------------- + +The `MAINTAINERS +`__ +file contains the canonical list of who is a maintainer. The file +is machine readable so an appropriately configured git (see +:ref:`cc_the_relevant_maintainer`) can automatically Cc them on +patches that touch their area of code. + +The file also describes the status of the area of code to give an idea +of how actively that section is maintained. + +.. list-table:: Meaning of support status in MAINTAINERS + :widths: 25 75 + :header-rows: 1 + + * - Status + - Meaning + * - Supported + - Someone is actually paid to look after this. + * - Maintained + - Someone actually looks after it. + * - Odd Fixes + - It has a maintainer but they don't have time to do + much other than throw the odd patch in. + * - Orphan + - No current maintainer. + * - Obsolete + - Old obsolete code, should use something else. + +Please bear in mind that even if someone is paid to support something +it does not mean they are paid to support you. This is open source and +the code comes with no warranty and the project makes no guarantees +about dealing with bugs or features requests. + + + +Becoming a reviewer +------------------- + +Most maintainers start by becoming subsystem reviewers. While anyone +is welcome to review code on the mailing list getting added to the +MAINTAINERS file with a line like:: + + R: Random Hacker + +will ensure that patches touching a given subsystem will automatically +be CC'd to you. + +Becoming a maintainer +--------------------- + +Maintainers are volunteers who put themselves forward or have been +asked by others to keep an eye on an area of code. They have generally +demonstrated to the community, usually via contributions and code +reviews, that they have a good understanding of the subsystem. They +are also trusted to make a positive contribution to the project and +work well with the other contributors. + +The process is simple - simply send a patch to the list that updates +the ``MAINTAINERS`` file. Sometimes this is done as part of a larger +series when a new sub-system is being added to the code base. This can +also be done by a retiring maintainer who nominates their replacement +after discussion with other contributors. + +Once the patch is reviewed and merged the only other step is to make +sure your GPG key is signed. + +.. _maintainer_keys: + +Maintainer GPG Keys +~~~~~~~~~~~~~~~~~~~ + +GPG is used to sign pull requests so they can be identified as really +coming from the maintainer. If your key is not already signed by +members of the QEMU community, you should make arrangements to attend +a `KeySigningParty `__ (for +example at KVM Forum) or make alternative arrangements to have your +key signed by an attendee. Key signing requires meeting another +community member **in person** [#]_ so please make appropriate +arrangements. + +.. [#] In recent pandemic times we have had to exercise some + flexibility here. Maintainers still need to sign their pull + requests though. diff --git a/docs/devel/submitting-a-pull-request.rst b/docs/devel/submitting-a-pull-request.rst index c9d1e8afd9..a4cd7ebbb6 100644 --- a/docs/devel/submitting-a-pull-request.rst +++ b/docs/devel/submitting-a-pull-request.rst @@ -53,14 +53,10 @@ series) and that "make check" passes before sending out the pull request. As a submaintainer you're one of QEMU's lines of defense against bad code, so double check the details. -**All pull requests must be signed**. If your key is not already signed -by members of the QEMU community, you should make arrangements to attend -a `KeySigningParty `__ (for -example at KVM Forum) or make alternative arrangements to have your key -signed by an attendee. Key signing requires meeting another community -member \*in person\* so please make appropriate arrangements. By -"signed" here we mean that the pullreq email should quote a tag which is -a GPG-signed tag (as created with 'gpg tag -s ...'). +**All pull requests must be signed**. By "signed" here we mean that +the pullreq email should quote a tag which is a GPG-signed tag (as +created with 'gpg tag -s ...'). See :ref:`maintainer_keys` for +details. **Pull requests not for master should say "not for master" and have "PULL SUBSYSTEM whatever" in the subject tag**. If your pull request is From patchwork Fri Nov 11 14:55:23 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: 623739 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp827656pvb; Fri, 11 Nov 2022 06:57:39 -0800 (PST) X-Google-Smtp-Source: AA0mqf5PebWgLa4oh6R0BLUrQVuoIMFy26CsJfp5uXFa0/dp9MVvTjbU5rL3jv6hpFruBGrN4YLW X-Received: by 2002:a37:e306:0:b0:6fa:23d1:856f with SMTP id y6-20020a37e306000000b006fa23d1856fmr1348201qki.564.1668178659257; Fri, 11 Nov 2022 06:57:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668178659; cv=none; d=google.com; s=arc-20160816; b=q3PSObjzY2Shd5aIl1hTmwnZuRsO93cdlzfEstMUXcR+YUKzH/I8QsMni0K18d4jaI hc/aLUYl4vI19XRUukuvBQH7sRnRq6XuxCN6vD9r4K/gSXSSvuNkwa6XAgf0wqVSVtbf 3oUwvwH3ra9l+TAJk5PMHkX4HjlENU4Wh5eUd2RlYIr8zK3tEf6h4XW1mzniNpKz1duU CxpSnr7IA2EmUdVTyY4LOb/RUuGM/y6PxIa6YoxgapTZvbV8Ub3N/6pDnfhkiXMscb0q e+hfzXp2xgyx1AqMivJuw4WlxPz/lfNkAYjTp77OXf6dfAz3Mr0x48kArCcNXkuJ19SV ORiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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:cc:to :from:dkim-signature; bh=U0bUaw8dD9ywC6S/a5dl4BRNFGfCaE47JrvKC4nt86Q=; b=pcXH0Kg/TdPHRlxXmhFSZztBspTVAdESPMXJ4/QhFLPcTPH3sw9eBPdbNSBVfM91D/ JF6VLxJYBTNCKlakb5oAx67F4OUNlSuWepqJlaYcj+vDISDFqZg77UuDVlRBJdF+pc3o p/3R8pz+rilqOBQvOu+P39kHYoJBleTc6ElEmc3Aw/z1Wtk00LPFpGj7aVFU9L/h23Dy 01cbFoYFbg5Ud+NpYd4vGOtJxOHajgDs0L/69nDMHZzyJ7ni/CzdsEzJtxRPzEfA53j5 pysU30FSZbqY0ODkgVFNBHOIH7k/jdTqEWo33zycWB9J25ZBJMRdaY41Zx46zQLq/ZgH mQwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=sIG5iSMC; 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=pass (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 ge6-20020a05621427c600b004bb993d9884si968185qvb.229.2022.11.11.06.57.39 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 11 Nov 2022 06:57:39 -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=pass header.i=@linaro.org header.s=google header.b=sIG5iSMC; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1otVRc-00075L-Cf; Fri, 11 Nov 2022 09:55:48 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1otVRW-00072s-Cl for qemu-devel@nongnu.org; Fri, 11 Nov 2022 09:55:42 -0500 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1otVRT-0007wS-Hb for qemu-devel@nongnu.org; Fri, 11 Nov 2022 09:55:42 -0500 Received: by mail-wr1-x433.google.com with SMTP id w14so6773668wru.8 for ; Fri, 11 Nov 2022 06:55:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=U0bUaw8dD9ywC6S/a5dl4BRNFGfCaE47JrvKC4nt86Q=; b=sIG5iSMC/omS9k1NJKAw5LBpio5CRXti6av7czKWEtxG+GPka1zuKgL/RwjXb7YHDL W29dLwrIDXABGqamAVAYs9w1aQ2QUXWDRoBm0Qes+6ohkyEUXoLAdb3nKxvWFuUk8Z5F xwg754ePJbrSQall5Fj/lEYpmktclvQxbvbF387tn4Fi13BeIRMqN2um8DGR3X9+cxHc 6zNifyiuE0/grvVogzBqB9Ne0mI+h1bPPCggiLNDQX1S1U8B1gCCaXadvaG2HOE3DpEg gxHfZRuY1BFckcNTZHSi/kue1J/MBpwlze8pF1+fDoM5FB2O6X/J39/H7h9iQMcCr8aW uchw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=U0bUaw8dD9ywC6S/a5dl4BRNFGfCaE47JrvKC4nt86Q=; b=O/lkgw3xkoWjBQAxHgZgHS+K8Opqu58bRZCTe36SWSlt/vDtfNO6spQopm6Ef5xUuk FZAf7Ugb9yPh2Q1jFlAIafhDSqn2i/E3/EQZvvrmV/Na2b2PgIZw53mToBlNwC6BmuGZ BNhnzWTyQTUWR1KKXou/032qgEgwIxPrhCgKhgr7oooTKNjhA/2WYw5ZB6Sy8yZKkL/V 75TTf8nYIGJK1pK6UJ35zrxugOzHqQ3LkjM7II7TzfT4X1mBMjF2VWOoJKCowFG2wLG2 SIusylbnmwZAbODT16WMMqc6VLTN1jhVcLMofCaDFAGEU39mn0tfuAnurLq1I4YpPem4 wP/g== X-Gm-Message-State: ANoB5pmrR2S1I5koCevNeEbrWwBQlwAqxgoEgi39bxHmXTLG3TezEYmJ X+WvltsgFOU3SKf0fdydltu6Vw== X-Received: by 2002:adf:db4e:0:b0:236:bad6:44df with SMTP id f14-20020adfdb4e000000b00236bad644dfmr1390631wrj.489.1668178535683; Fri, 11 Nov 2022 06:55:35 -0800 (PST) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id r8-20020a05600c2f0800b003c701c12a17sm8502540wmn.12.2022.11.11.06.55.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Nov 2022 06:55:32 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 911ED1FFBE; Fri, 11 Nov 2022 14:55:30 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: fam@euphon.net, berrange@redhat.com, f4bug@amsat.org, aurelien@aurel32.net, pbonzini@redhat.com, stefanha@redhat.com, crosa@redhat.com, =?utf-8?q?Alex_Benn=C3=A9e?= Subject: [PATCH v2 06/12] docs/devel: make language a little less code centric Date: Fri, 11 Nov 2022 14:55:23 +0000 Message-Id: <20221111145529.4020801-7-alex.bennee@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221111145529.4020801-1-alex.bennee@linaro.org> References: <20221111145529.4020801-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::433; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x433.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org We welcome all sorts of patches. Signed-off-by: Alex Bennée Reviewed-by: Stefan Hajnoczi Reviewed-by: Paolo Bonzini Message-Id: <20221012121152.1179051-3-alex.bennee@linaro.org> --- docs/devel/submitting-a-patch.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/devel/submitting-a-patch.rst b/docs/devel/submitting-a-patch.rst index fec33ce148..9c7c4331f3 100644 --- a/docs/devel/submitting-a-patch.rst +++ b/docs/devel/submitting-a-patch.rst @@ -3,11 +3,11 @@ Submitting a Patch ================== -QEMU welcomes contributions of code (either fixing bugs or adding new -functionality). However, we get a lot of patches, and so we have some -guidelines about submitting patches. If you follow these, you'll help -make our task of code review easier and your patch is likely to be -committed faster. +QEMU welcomes contributions to fix bugs, add functionality or improve +the documentation. However, we get a lot of patches, and so we have +some guidelines about submitting them. If you follow these, you'll +help make our task of code review easier and your patch is likely to +be committed faster. This page seems very long, so if you are only trying to post a quick one-shot fix, the bare minimum we ask is that: From patchwork Fri Nov 11 14:55:24 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: 623738 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp827450pvb; Fri, 11 Nov 2022 06:57:14 -0800 (PST) X-Google-Smtp-Source: AA0mqf4DPySeqr76/DcNgXhg8QIvQ6mFZtNmCJsOUbW+ecgRd4GITeL9KNkGAoVDM607pmt1tWlB X-Received: by 2002:a05:622a:4808:b0:3a5:be2:9a04 with SMTP id fb8-20020a05622a480800b003a50be29a04mr1583638qtb.402.1668178634547; Fri, 11 Nov 2022 06:57:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668178634; cv=none; d=google.com; s=arc-20160816; b=X0DRmN2KBonjmgDbflRBsiqErY78+BE7jFHuXBLCEKxoGXsUpjGgek3+zRcIP5DYZU oKyg7AZpsMYgqW+ukOvsCzNyyx5pOcR96Idg7IvvLAJ73LVMJMLYRDLwiY9gRrFf2Ef1 b6tc6PSZ7Q5Hh7WvAMN6T41BMoKqu/97oLKOJpbLW2ejY2mE05wVLG+/i5FF+b2R7pNA S7gU1Lg8XeRtuQkQjt499yzh/P6+7goYPX5r3sfrUm46FSZiukNF4JcJm/z0UdYOr4YU ZXW8e3uOflBqn+2/mS1r8VPhfTzMAajXJu/ErraQfemGKgxy7YTALL5TdJgamJIavTL+ hp9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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:cc:to :from:dkim-signature; bh=Tx51MAAfbml8CiT50HNaT+ihFTBqcLj/nxt/MFriuNA=; b=OziyjNgAlS4HDprqI6z5U6m99vfr4SaQcDiOumAuNEIMTYaofcfpVq2+ZMkh66mCvy MjWsmrHzmQTHt+yAsSAgIIAE2ERC0fYBhLDgrF0HxtQw7TbrH42t0Mmb+gXelPb5pH7w MIproeFlF+6GGWTzNqW+tgVaTz+wdfEbEUKCeTjvdKNqy3Pxskw2BuR0WFXBzYP0YTJg l3jlXMAevzheQof0EMhwrYp9kxJ8FpWipTL1S7IE7Dp6pysJGRVpV0o+ubXtfAw/gSWn RsTrPsFlwndC6pF7ArJn8FKY2NgIzOxUuQNhwMzWJfRTBEe72H9oVfbgfspw1D4AVXAq VZnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zHIJYHDP; 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=pass (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 d15-20020ac851cf000000b003984706c7c4si1023769qtn.356.2022.11.11.06.57.14 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 11 Nov 2022 06:57: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=pass header.i=@linaro.org header.s=google header.b=zHIJYHDP; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1otVRb-00075B-OO; Fri, 11 Nov 2022 09:55:47 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1otVRW-00072w-QG for qemu-devel@nongnu.org; Fri, 11 Nov 2022 09:55:42 -0500 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1otVRT-0007xS-IS for qemu-devel@nongnu.org; Fri, 11 Nov 2022 09:55:42 -0500 Received: by mail-wm1-x334.google.com with SMTP id m7-20020a05600c090700b003cf8a105d9eso3285052wmp.5 for ; Fri, 11 Nov 2022 06:55:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Tx51MAAfbml8CiT50HNaT+ihFTBqcLj/nxt/MFriuNA=; b=zHIJYHDPPlQgEPEMWsPKCWMwdePRvj8e9G/sTzxGSX7YrSxB4BeED0NVQBkerYmpJr BSTY5Je18CIP7suUj0MbbvUX0+o5z4s3OBRTSnmelnBZjMQUzhw0TCGRGIVFPyc+KNuD pc+BIh2/IKr4GWN/i3GkgMJkK4A1moCbDrDnek9/fCAIe2MMeofHGjxm4X+bkRliVT23 LvfLwRha4pM6gwCYHXc1Ix5MA/ZyOEoOfVPaEmtQp8tzUhrNbwQ6Qq+lOV0sveggb0bp Nz6/fmGoS8wPGUOJrFzjzvcxJVHuScEbml1IwT1yXbzTtN6Xx0FQDmVtQYhfjrL8f1ll HEjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Tx51MAAfbml8CiT50HNaT+ihFTBqcLj/nxt/MFriuNA=; b=npTB5aDBDHNqx3NJ0ByIDdoD5IsljuJDww+jVCF9ErK6tCLk8hHMfNlvaMrPebqRus Wc942aY8ubUXwXIuxv1bHfwcrYdAcQfer3yV6ctcaTDNb9l45r80qHQlgmZgTK4VWjVM PBdr2tIXNGwHDvSUk085IILzhMPsPEXbUi8/gm2w9pETHHLgUjqDA7TzyfP/L/vVLz/2 7kMqftK0X8FgYfH8uvNKsqcPLyhdfIuVWOK09GkEdUII4gZtNHEQ8SGaXrDDLqzBGw6Y 4WvjjZxNVnskHF+7yiJ9IkgVvbjuaKAtS7Nm7W++AtSdDQTGUmOs0KPyTj1sdr6RpES4 emTg== X-Gm-Message-State: ANoB5pncf0Lbjf8tmyuFuqYz9j86FwDlqbfPiCQ9YvXBRbIKLh23+NS5 t4UtcY7tz28hTUjD14Mgypipfw== X-Received: by 2002:a7b:c04a:0:b0:3cf:a5b8:2a09 with SMTP id u10-20020a7bc04a000000b003cfa5b82a09mr1473816wmc.125.1668178537379; Fri, 11 Nov 2022 06:55:37 -0800 (PST) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id y15-20020a5d614f000000b0022ae401e9e0sm2126489wrt.78.2022.11.11.06.55.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Nov 2022 06:55:32 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id A78B41FFBF; Fri, 11 Nov 2022 14:55:30 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: fam@euphon.net, berrange@redhat.com, f4bug@amsat.org, aurelien@aurel32.net, pbonzini@redhat.com, stefanha@redhat.com, crosa@redhat.com, =?utf-8?q?Alex_Benn=C3=A9e?= Subject: [PATCH v2 07/12] docs/devel: simplify the minimal checklist Date: Fri, 11 Nov 2022 14:55:24 +0000 Message-Id: <20221111145529.4020801-8-alex.bennee@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221111145529.4020801-1-alex.bennee@linaro.org> References: <20221111145529.4020801-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x334.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org The bullet points are quite long and contain process tips. Move those bits of the bullet to the relevant sections and link to them. Use a table for nicer formatting of the checklist. Signed-off-by: Alex Bennée Reviewed-by: Stefan Hajnoczi Reviewed-by: Paolo Bonzini Message-Id: <20221012121152.1179051-4-alex.bennee@linaro.org> --- v2 - emphasise a Real Name should be used - s/therefor/therefore/ --- docs/devel/submitting-a-patch.rst | 75 ++++++++++++++++++++----------- 1 file changed, 49 insertions(+), 26 deletions(-) diff --git a/docs/devel/submitting-a-patch.rst b/docs/devel/submitting-a-patch.rst index 9c7c4331f3..1f2bde0625 100644 --- a/docs/devel/submitting-a-patch.rst +++ b/docs/devel/submitting-a-patch.rst @@ -12,25 +12,18 @@ be committed faster. This page seems very long, so if you are only trying to post a quick one-shot fix, the bare minimum we ask is that: -- You **must** provide a Signed-off-by: line (this is a hard - requirement because it's how you say "I'm legally okay to contribute - this and happy for it to go into QEMU", modeled after the `Linux kernel - `__ - policy.) ``git commit -s`` or ``git format-patch -s`` will add one. -- All contributions to QEMU must be **sent as patches** to the - qemu-devel `mailing list `__. - Patch contributions should not be posted on the bug tracker, posted on - forums, or externally hosted and linked to. (We have other mailing lists too, - but all patches must go to qemu-devel, possibly with a Cc: to another - list.) ``git send-email`` (`step-by-step setup - guide `__ and `hints and - tips `__) - works best for delivering the patch without mangling it, but - attachments can be used as a last resort on a first-time submission. -- You must read replies to your message, and be willing to act on them. - Note, however, that maintainers are often willing to manually fix up - first-time contributions, since there is a learning curve involved in - making an ideal patch submission. +.. list-table:: Minimal Checklist for Patches + :widths: 35 65 + :header-rows: 1 + + * - Check + - Reason + * - Patches contain Signed-off-by: Real Name + - States you are legally able to contribute the code. See :ref:`patch_emails_must_include_a_signed_off_by_line` + * - Sent as patch emails to ``qemu-devel@nongnu.org`` + - The project uses an email list based workflow. See :ref:`submitting_your_patches` + * - Be prepared to respond to review comments + - Code that doesn't pass review will not get merged. See :ref:`participating_in_code_review` You do not have to subscribe to post (list policy is to reply-to-all to preserve CCs and keep non-subscribers in the loop on the threads they @@ -229,6 +222,19 @@ bisection doesn't land on a known-broken state. Submitting your Patches ----------------------- +The QEMU project uses a public email based workflow for reviewing and +merging patches. As a result all contributions to QEMU must be **sent +as patches** to the qemu-devel `mailing list +`__. Patch +contributions should not be posted on the bug tracker, posted on +forums, or externally hosted and linked to. (We have other mailing +lists too, but all patches must go to qemu-devel, possibly with a Cc: +to another list.) ``git send-email`` (`step-by-step setup guide +`__ and `hints and tips +`__) +works best for delivering the patch without mangling it, but +attachments can be used as a last resort on a first-time submission. + .. _if_you_cannot_send_patch_emails: If you cannot send patch emails @@ -314,10 +320,12 @@ git repository to fetch the original commit. Patch emails must include a ``Signed-off-by:`` line ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -For more information see `SubmittingPatches 1.12 -`__. -This is vital or we will not be able to apply your patch! Please use -your real name to sign a patch (not an alias or acronym). +Your patches **must** include a Signed-off-by: line. This is a hard +requirement because it's how you say "I'm legally okay to contribute +this and happy for it to go into QEMU". The process is modelled after +the `Linux kernel +`__ +policy. If you wrote the patch, make sure your "From:" and "Signed-off-by:" lines use the same spelling. It's okay if you subscribe or contribute to @@ -327,6 +335,11 @@ include a "From:" line in the body of the email (different from your envelope From:) that will give credit to the correct author; but again, that author's Signed-off-by: line is mandatory, with the same spelling. +There are various tooling options for automatically adding these tags +include using ``git commit -s`` or ``git format-patch -s``. For more +information see `SubmittingPatches 1.12 +`__. + .. _include_a_meaningful_cover_letter: Include a meaningful cover letter @@ -397,9 +410,19 @@ Participating in Code Review ---------------------------- All patches submitted to the QEMU project go through a code review -process before they are accepted. Some areas of code that are well -maintained may review patches quickly, lesser-loved areas of code may -have a longer delay. +process before they are accepted. This will often mean a series will +go through a number of iterations before being picked up by +:ref:`maintainers`. You therefore should be prepared to +read replies to your messages and be willing to act on them. + +Maintainers are often willing to manually fix up first-time +contributions, since there is a learning curve involved in making an +ideal patch submission. However for the best results you should +proactively respond to suggestions with changes or justifications for +your current approach. + +Some areas of code that are well maintained may review patches +quickly, lesser-loved areas of code may have a longer delay. .. _stay_around_to_fix_problems_raised_in_code_review: From patchwork Fri Nov 11 14:55:25 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: 623740 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp827705pvb; Fri, 11 Nov 2022 06:57:42 -0800 (PST) X-Google-Smtp-Source: AA0mqf6qgVFk7qrfRmLcjwExmYvFQvfQ1xOQnWPlNFuJIrBTE64/TTheB/pwfaWa1q24tSmB6hwM X-Received: by 2002:a05:622a:1cc6:b0:39c:eb15:b6df with SMTP id bc6-20020a05622a1cc600b0039ceb15b6dfmr1537182qtb.518.1668178662096; Fri, 11 Nov 2022 06:57:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668178662; cv=none; d=google.com; s=arc-20160816; b=YsJOXYFldSMCDw7Uj78tsKDELlXWTLGySIRdagBF49WFxd/i5/e8S2pl7uhKzAyICj 1HfkxBrd8QinNGr6/8qGqA7xexo5xVPrle5WOh2ovd7G1EiHKaOkggfhNFR8HNYGbhLG +Sj977rpW1275fSINNig/9045SPYh18oYp5RZG2n2YApVe6Vd29nWUdkaa5iuun0HCsw myb692hRpYBqQ+3UEBEA6i8splDy7cMBmh11FS0LbHbf5TH1j9c0LLfpl/o8QXCOogdC ay6DJJNKj8tmQWmEQRiPXpK3wXkD52Smh9pecOlKfsseTA8aJaVsRkEp5ElMBbssLLp2 3QaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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:cc:to :from:dkim-signature; bh=yLNK2qdPNMQMvzK3A+Wa0kPh913JqNLXh3QyXKK7U+k=; b=xqn6Rb3zGq9w0EurBYNXTkbWKvLvYQnPHBl32p2JUj1Zdvp8CQiLDsHFXAPvIwd/8V Fo4SK5I7kjaJkkZWA7McL+Z8O+rsZnrI5IAJ6RR1t7MDKKw0nImmZrzJAHBZ71C8Nox7 F10D7MzTaaLUcW6dwkD3MXPzYxf2QwCsioXjX8Im3dOr+fMc8ETN5raMhNd2Nj3hJ48S k2W7ysQIPZXhEiSE6GMYOYtKyXtbB3dGBPJ4Kx6KUSw2Pebv1itIviZkj4jq2DAecpj2 Kanh4jL+/CS2DoMR3yyDxQ2UEiPcUaeWBzgmdurbru4/nbYGZggXgu5pd7BcDVGMhC+k BDWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=BoeQrQnI; 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=pass (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 q5-20020ad45745000000b004af9e63b490si1061363qvx.4.2022.11.11.06.57.42 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 11 Nov 2022 06:57:42 -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=pass header.i=@linaro.org header.s=google header.b=BoeQrQnI; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1otVRb-00075C-NE; Fri, 11 Nov 2022 09:55:47 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1otVRW-00072t-DN for qemu-devel@nongnu.org; Fri, 11 Nov 2022 09:55:42 -0500 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1otVRT-0007xV-Hx for qemu-devel@nongnu.org; Fri, 11 Nov 2022 09:55:42 -0500 Received: by mail-wm1-x32b.google.com with SMTP id t4so3072008wmj.5 for ; Fri, 11 Nov 2022 06:55:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=yLNK2qdPNMQMvzK3A+Wa0kPh913JqNLXh3QyXKK7U+k=; b=BoeQrQnI2ZGynBzAvlcqSMhgTLDrnrzj5VQILDx2IiaEyT0k5ab4id+mD6gswK1tlg RjVH2YqCPaMmyykL1JEhreuc56uXeYnBBE4360FNR+HeZHEfwGmn6q8tzGi18Ynj15JO qhnJqnkU+P08rGX122no8HIBYBdWfAUk0Rzp96dbcmN9kb0H1cf2WLSFMCUTYsGg992Y Rp1SNWIhCWil30LpnAZsl3xIbJmjO74i8kUZupjUOFqMcimURqR+IW1KesYJD59yFqoM yJNV4jNncqzBIAtCB5Mdgr3KXUNzz2DPXc/KpVQhdyLYolq/1va1+1ulju18al8eAJxq 6ioQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=yLNK2qdPNMQMvzK3A+Wa0kPh913JqNLXh3QyXKK7U+k=; b=ShDmYgi6zINtqc7XaVfG1ofk/KHctqDk4Yy2z1CqEMuKj0pN2/7Uxb2/Pq/J71riFG JvEFD81nMyF2ITx0Y9f+iSfrMlmqgxZR3+InqgTWlt7ogELND8ZEii7BCJd5Ucn40R5z Uyubv9Q5IcazzoArOicrFAXjL2rkhA3BPt6Bq1+dwNN+HrRnAgVuFnT5Ste0Y/KKxOkK COytcJJK4Ks81EUrQ3MUj7I6sYAsxWKEb66ICPQkwQpUXrqimunRdpa3OvW6t55irbYB eTVSKV+YRHMESbHAW3qxjMoS2FHx8upcsPsUyr3qsiCbA8WZ2a4aw0Owr3u2E3tkRFsW 18Mw== X-Gm-Message-State: ANoB5pnhqoLsHZMhoW7ryU99WbT21256KKiQkZCkb84RRQeMcg35Ofjn t+pFReLX2RFmwGa5ZkVbOAIxCQ== X-Received: by 2002:a7b:c4d3:0:b0:3cf:88e7:f808 with SMTP id g19-20020a7bc4d3000000b003cf88e7f808mr1492201wmk.200.1668178537813; Fri, 11 Nov 2022 06:55:37 -0800 (PST) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id n2-20020a05600c3b8200b003b476cabf1csm3672104wms.26.2022.11.11.06.55.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Nov 2022 06:55:32 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id BD5D71FFC0; Fri, 11 Nov 2022 14:55:30 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: fam@euphon.net, berrange@redhat.com, f4bug@amsat.org, aurelien@aurel32.net, pbonzini@redhat.com, stefanha@redhat.com, crosa@redhat.com, =?utf-8?q?Alex_Benn=C3=A9e?= , Markus Armbruster Subject: [PATCH v2 08/12] docs/devel: try and improve the language around patch review Date: Fri, 11 Nov 2022 14:55:25 +0000 Message-Id: <20221111145529.4020801-9-alex.bennee@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221111145529.4020801-1-alex.bennee@linaro.org> References: <20221111145529.4020801-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32b; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org It is important that contributors take the review process seriously and we collaborate in a respectful way while avoiding personal attacks. Try and make this clear in the language. Signed-off-by: Alex Bennée Reviewed-by: Markus Armbruster Reviewed-by: Stefan Hajnoczi Reviewed-by: Paolo Bonzini Message-Id: <20221012121152.1179051-5-alex.bennee@linaro.org> --- docs/devel/submitting-a-patch.rst | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/docs/devel/submitting-a-patch.rst b/docs/devel/submitting-a-patch.rst index 1f2bde0625..80e8693bb6 100644 --- a/docs/devel/submitting-a-patch.rst +++ b/docs/devel/submitting-a-patch.rst @@ -434,14 +434,20 @@ developers will identify bugs, or suggest a cleaner approach, or even just point out code style issues or commit message typos. You'll need to respond to these, and then send a second version of your patches with the issues fixed. This takes a little time and effort on your part, but -if you don't do it then your changes will never get into QEMU. It's also -just polite -- it is quite disheartening for a developer to spend time -reviewing your code and suggesting improvements, only to find that -you're not going to do anything further and it was all wasted effort. +if you don't do it then your changes will never get into QEMU. + +Remember that a maintainer is under no obligation to take your +patches. If someone has spent the time reviewing your code and +suggesting improvements and you simply re-post without either +addressing the comment directly or providing additional justification +for the change then it becomes wasted effort. You cannot demand others +merge and then fix up your code after the fact. When replying to comments on your patches **reply to all and not just the sender** -- keeping discussion on the mailing list means everybody -can follow it. +can follow it. Remember the spirit of the :ref:`code_of_conduct` and +keep discussions respectful and collaborative and avoid making +personal comments. .. _pay_attention_to_review_comments: From patchwork Fri Nov 11 14:55:26 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: 623741 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp827766pvb; Fri, 11 Nov 2022 06:57:49 -0800 (PST) X-Google-Smtp-Source: AA0mqf58QCKrfsiokzzXEoJ3RunrIXiYlSlD52TpW5GJnockvX9Ys4pVf5/D+Tno2nHfrPMq/kvK X-Received: by 2002:a05:622a:54e:b0:3a5:7cf8:1a6e with SMTP id m14-20020a05622a054e00b003a57cf81a6emr1605611qtx.48.1668178669086; Fri, 11 Nov 2022 06:57:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668178669; cv=none; d=google.com; s=arc-20160816; b=RTw9MdXOzE2K4xN1BVY/Ij8ZeFcS6ilqFpe5Z2vOWDKzsq7Vp+UmR636nafeRNqoow wTN3EeDjM+FcmJsNuJwpMdLYiy8f6aNCAxnRNpxR++5QXW8mKWLOax33mYMfwljpO5N6 oAED7dZZmPyfyX932FngxQSiWr1EKuF+JISv+VfrCqm7HZX/VXXKQzT0/n5COWbk7/IT LkJa8sDGiu4Usw+OmJmzNUhVjRa0h1mKg75XsK6PHG5aRscuTz1+L0mHr1h8iO88Lpe9 QD6yy9gS47uYtA0q//8ePUgCgRX/bYk2o2h2zuHmkehmM6qo7JO7638psZ2yrCAzMZ7h 85/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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:cc:to :from:dkim-signature; bh=xz/+zZudDZVBoYNxMc0z6HI0lRrD/gYGRwz0JYOqFX8=; b=dMUMnRKxuVqWJPdXvIfm2MW8TmtmYxOYfT81gWYPxCA+1NB3fPBp/V9zaNIAQN7i4x 63vbwQ7S70/GCIlYkG0w/K2X01piIOHL/OfsE5ih7S2QD01M7HGNh3pIphktTU9CZI9e b85vhk1Qk/7o9Y5WB8RHpg9DLX9BjKl9Zah6AYBGyoHGqNqzsa2QXPN6diyzfO7So426 9WNSogdjRV4JZ62ifbplDWTlwaomlao2F1PVpvHrMH5ebrDE9bXl/zOSb1eu9jQNntPZ Rmfry/P9Q+MHZw9R37v45Vbsz5TFC927WhGPlO8xTHQyM43BrsMUAPzG761zTzxJLGC2 P/uw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wqB85alr; 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=pass (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 ga15-20020a05622a590f00b0039cc64bcb3fsi1106233qtb.36.2022.11.11.06.57.48 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 11 Nov 2022 06:57:49 -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=pass header.i=@linaro.org header.s=google header.b=wqB85alr; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1otVRa-00074m-Va; Fri, 11 Nov 2022 09:55:47 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1otVRZ-00073d-EP for qemu-devel@nongnu.org; Fri, 11 Nov 2022 09:55:45 -0500 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1otVRW-0007yI-Eq for qemu-devel@nongnu.org; Fri, 11 Nov 2022 09:55:44 -0500 Received: by mail-wr1-x431.google.com with SMTP id y16so6770377wrt.12 for ; Fri, 11 Nov 2022 06:55:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=xz/+zZudDZVBoYNxMc0z6HI0lRrD/gYGRwz0JYOqFX8=; b=wqB85alrjz15FAC8JVT/wxBDv23j8WuRbzxe9zLMGxDeSBmmXDT7uRts4XGwBruhLQ ft6gMdJK+nh/xtXIMENVeoxep2iAPqbVA0Wo2ybbejq1aEwgbYuoutwVriBSJ3Sbkm8x CCPCH2VqY0xz+7qxYpXSSU4OBer+aWr8CTj569ohuXuezT4oVyOxNzQitkwYmDi0xN+q BrojgPcASs215mUy5+2GwIBvbvgHPuSewPqVetdVXpD2bd4TZc3YAfmOJFYjZyyAhBWw Fl3lGOJqqp6Bl78R4RcK5lHJDEFbOP+tut3xEB6BYZrl1rZ9VhfWtW3w8PcBS5R7fy7G N34Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xz/+zZudDZVBoYNxMc0z6HI0lRrD/gYGRwz0JYOqFX8=; b=WJep4GYzS2Xa3mfY35oWkcUSN377RWE2cJeMaAHbn18iRgwlRq7DRkTqhLP3ESVz/9 PT5tT1nj4EezHXtiVVj0GRRaAH7ub50rRudOgdILVkDI62CbuI+D3i2rJ7deb6O6UdQk 02gMqbjgQIiadpen1bgR8q5YC0heepku2FF7DKCBoygBqlNgqBO68q0yAxqgzBvrj8KA nFQqbpFlY+475GUR6m2tazRSihge7rSnZkRJ5srTMmqeitz3uaeA8TXqCmT12AZi2SFG SrFQU407TwHwCrmOJ7lWzEMKx8mHB2Zog7GrmNW8Nmy7+5uogQgS+XP9a00/+RhYiMEv nmoA== X-Gm-Message-State: ANoB5pm2I38fbBR3YJmXfeyAW4de4GSLm+AKZX1Yytm0HDbpS/ugQkbm GcsmFyEre5004ruGdkA2DREQEA== X-Received: by 2002:a05:6000:181a:b0:236:6fc5:e624 with SMTP id m26-20020a056000181a00b002366fc5e624mr1449175wrh.110.1668178540953; Fri, 11 Nov 2022 06:55:40 -0800 (PST) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id v23-20020a1cf717000000b003c6c4639ac6sm2993443wmh.34.2022.11.11.06.55.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Nov 2022 06:55:38 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id D66B31FFC1; Fri, 11 Nov 2022 14:55:30 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: fam@euphon.net, berrange@redhat.com, f4bug@amsat.org, aurelien@aurel32.net, pbonzini@redhat.com, stefanha@redhat.com, crosa@redhat.com, =?utf-8?q?Alex_Benn=C3=A9e?= , Idan Horowitz , Alexandre Iooss , Mahmoud Mandour Subject: [PATCH v2 09/12] tests/plugins: add a new vcpu state tracking plugin Date: Fri, 11 Nov 2022 14:55:26 +0000 Message-Id: <20221111145529.4020801-10-alex.bennee@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221111145529.4020801-1-alex.bennee@linaro.org> References: <20221111145529.4020801-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::431; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x431.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Although we call qemu_plugin_register_vcpu_idle_cb() in the bb test we don't really exercise the rest of the state change callbacks. Add a new test that tests the whole API. [AJB: I wrote this in an attempt to flush out a reproducer for #1195 although so far no joy.] Signed-off-by: Alex Bennée Cc: Idan Horowitz ---- v2 - and min max tracking - fix { style on get_timestamp --- tests/plugin/vcpu.c | 153 +++++++++++++++++++++++++++++++++++++++ tests/plugin/meson.build | 2 +- 2 files changed, 154 insertions(+), 1 deletion(-) create mode 100644 tests/plugin/vcpu.c diff --git a/tests/plugin/vcpu.c b/tests/plugin/vcpu.c new file mode 100644 index 0000000000..f4fa518420 --- /dev/null +++ b/tests/plugin/vcpu.c @@ -0,0 +1,153 @@ +/* + * Test plugin for exercising the vcpu event callbacks. These exist + * for when vcpus are created and destroyed (especially in linux-user + * where vcpu ~= thread) and when they pause and restart (generally + * for wfi and the like in system emulation). + * + * Copyright (c) 2022 Linaro Ltd + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#include +#include +#include +#include +#include +#include +#include + +#include + +QEMU_PLUGIN_EXPORT int qemu_plugin_version = QEMU_PLUGIN_VERSION; + +typedef struct { + uint64_t start_time_ns; + uint64_t idle_count; + uint64_t last_idle_ts; + uint64_t min_idle_ns; + uint64_t max_idle_ns; + uint64_t total_idle_ns; + uint64_t exit_time_ns; +} VCPUData; + +static GMutex expand_counts_lock; +static GArray *counts; /* array of VCPUData */ +static bool sys_emu; + +/* + * Fetch VCPU data for a given index, allocate if required. + */ +static VCPUData *get_vcpu_data(int cpu_index) +{ + if (cpu_index >= counts->len) { + g_mutex_lock(&expand_counts_lock); + counts = g_array_set_size(counts, cpu_index + 1); + g_mutex_unlock(&expand_counts_lock); + } + /* race if set size re-allocs? */ + return &g_array_index(counts, VCPUData, cpu_index); +} + +static uint64_t get_timestamp(void) +{ + struct timespec ts; + clock_gettime(CLOCK_MONOTONIC, &ts); + return ts.tv_sec * 1000000000LL + ts.tv_nsec; +} + +static void vcpu_init(qemu_plugin_id_t id, unsigned int cpu_index) +{ + VCPUData *d = get_vcpu_data(cpu_index); + d->start_time_ns = get_timestamp(); + d->min_idle_ns = UINT64_MAX; +} + +static void vcpu_idle(qemu_plugin_id_t id, unsigned int cpu_index) +{ + VCPUData *d = get_vcpu_data(cpu_index); + d->last_idle_ts = get_timestamp(); + d->idle_count++; +} + +static void vcpu_resume(qemu_plugin_id_t id, unsigned int cpu_index) +{ + VCPUData *d = get_vcpu_data(cpu_index); + uint64_t now = get_timestamp(); + uint64_t delta = now - d->last_idle_ts; + d->total_idle_ns += delta; + if (delta > d->max_idle_ns) { + d->max_idle_ns = delta; + } else if (delta < d->min_idle_ns) { + d->min_idle_ns = delta; + } +} + +static void vcpu_exit(qemu_plugin_id_t id, unsigned int cpu_index) +{ + VCPUData *d = get_vcpu_data(cpu_index); + d->exit_time_ns = get_timestamp(); +} + +/* + * Report our final stats + */ +static void plugin_exit(qemu_plugin_id_t id, void *p) +{ + g_autoptr(GString) report = g_string_new(""); + const char *vcpu_or_thread = sys_emu ? "vcpu" : "thread"; + int i; + + g_string_printf(report, "Exit: we had a total of %d %ss\n", + counts->len, vcpu_or_thread); + + for (i = 0; i < counts->len; i++) { + VCPUData *d = &g_array_index(counts, VCPUData, i); + + /* FIXME: we never see vcpu_exit for the main thread */ + if (!d->exit_time_ns) { + d->exit_time_ns = get_timestamp(); + } + + g_string_append_printf(report, "%s %d: %"PRId64" µs lifetime", + vcpu_or_thread, i, + (d->exit_time_ns - d->start_time_ns) / 1000); + if (d->idle_count) { + uint64_t idle_us = d->total_idle_ns / 1000; + uint64_t idle_avg = d->total_idle_ns / d->idle_count; + g_string_append_printf(report, ", %"PRId64" idles, %" + PRId64 " µs total idle time, %" + PRId64 " ns min, %" + PRId64 " ns max, %" + PRId64 " ns per idle", + d->idle_count, idle_us, + d->min_idle_ns, d->max_idle_ns, idle_avg); + } + g_string_append_printf(report, "\n"); + } + qemu_plugin_outs(report->str); +} + + +QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugin_id_t id, + const qemu_info_t *info, + int argc, char **argv) +{ + int entries = 2; + + if (info->system_emulation) { + entries = info->system.max_vcpus; + sys_emu = true; + } + + counts = g_array_sized_new(true, true, sizeof(VCPUData), entries); + g_mutex_init(&expand_counts_lock); + + qemu_plugin_register_vcpu_init_cb(id, vcpu_init); + qemu_plugin_register_vcpu_idle_cb(id, vcpu_idle); + qemu_plugin_register_vcpu_resume_cb(id, vcpu_resume); + qemu_plugin_register_vcpu_exit_cb(id, vcpu_exit); + + qemu_plugin_register_atexit_cb(id, plugin_exit, NULL); + return 0; +} diff --git a/tests/plugin/meson.build b/tests/plugin/meson.build index 2bbfc4b19e..8c6b232183 100644 --- a/tests/plugin/meson.build +++ b/tests/plugin/meson.build @@ -1,5 +1,5 @@ t = [] -foreach i : ['bb', 'empty', 'insn', 'mem', 'syscall'] +foreach i : ['bb', 'empty', 'insn', 'mem', 'syscall', 'vcpu'] t += shared_module(i, files(i + '.c'), include_directories: '../../include/qemu', dependencies: glib) From patchwork Fri Nov 11 14:55:27 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: 623742 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp827862pvb; Fri, 11 Nov 2022 06:57:57 -0800 (PST) X-Google-Smtp-Source: AA0mqf6L2PvJ7rZ4ppcUnHv1Wkbm1shCUawpcGjiyZT70pV1vozeLGtMMefuCjwVTIqfx54qBBxU X-Received: by 2002:ac8:5ad0:0:b0:39c:c7db:1559 with SMTP id d16-20020ac85ad0000000b0039cc7db1559mr1598798qtd.47.1668178677560; Fri, 11 Nov 2022 06:57:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668178677; cv=none; d=google.com; s=arc-20160816; b=l6DExdI+jd17UDEF0ezRei6Lkp8t7PPZYHY8rgFZNSm+abRWeNM73zofhaO54F6eyL cvUJFFTrFqyxd51PdjXAHfZrBCaYeDg9wiCi2yK9m8eDL6snt/C9GsdbxxdFivqwg7vp u8p6wRVaOk7+HcWhUIt32SUuUfCNycCGCUXAuqvqswKnmBSg3o7OAGlksPQyhtXzmZp8 Qely6vlqZOkxMKEq+otu2PDO+nM9VDoJwK4ZcbMKbb9gTI8B45EaXeBTANmVhja7GpUw ZyQkQEvyG/LV2Fyq8OJRleaws00K0VWMH6JkJ4oHPvD9qRtATplAHdTf+7gmiDNT7RzA sF9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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:cc:to :from:dkim-signature; bh=WRTLAcdznhrZedskLf6RFnKz3rdvDI3Rrzd5Vwnc2gw=; b=toXilURmwf+n7iWL2AiVezGtFUDp4LfVYtevjKMvW93wUT7qTvq7B/GKgbCcWUJIus t/gkHSS3EvNpm/pi5TvE58c5L2+CNhjXuiQMD+mAxTEpU46WM+qaY3PBw+wKkmHaPgHY eD64HqFXJWYaVkFj/qfm+HjPXktA6xgii4Y7Zxuef81lHPN/ZadVY5DmWkcBfJJ44rn6 qVg0+DYeJrnH+w+xJHfhBbE/v5VrhqIdQW8n0cFjQZkHHI3LbHqkjQWUoouthKRMg8NI UvWrNlpTPB3MHgHsYu67wBDoLj7qEy2fZ34oJ1SsKwXllW5y//F0wm4N3tsp/dNpkyl5 ca6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Sh+y+Lb4; 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=pass (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 q10-20020a05620a2a4a00b006bc65379d9fsi1091969qkp.144.2022.11.11.06.57.57 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 11 Nov 2022 06:57:57 -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=pass header.i=@linaro.org header.s=google header.b=Sh+y+Lb4; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1otVRd-00076T-3L; Fri, 11 Nov 2022 09:55:49 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1otVRY-00073V-89 for qemu-devel@nongnu.org; Fri, 11 Nov 2022 09:55:45 -0500 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1otVRU-0007xm-Ra for qemu-devel@nongnu.org; Fri, 11 Nov 2022 09:55:43 -0500 Received: by mail-wm1-x336.google.com with SMTP id m7-20020a05600c090700b003cf8a105d9eso3285106wmp.5 for ; Fri, 11 Nov 2022 06:55:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=WRTLAcdznhrZedskLf6RFnKz3rdvDI3Rrzd5Vwnc2gw=; b=Sh+y+Lb4IUJ8Fl45EFZQNU27hNoNU14n3vGgT+9YA1zz9paCMu7U8Q328Qxef61Wne BC8Flz2WtUfuniXiVvosYsAHoisSVBa88e1noBrKEGl/EzVwQrVY2zOmHQAlxOzWO2Ox WcNu5GMm3crIJJjQtFejExJBAd4oxiafEIvF5fUQ81uNXByuoXh6NfAY/hp+NjL7kikb QpLOsto4U6KDHY2b1JwcZcsHnyPB1ip71v0COt/lhjuCDJMZUtfhMKJ6cwvHQsV/J+nF A6ORYyCEcWfQvDjSW5dMva8RRsTkWvM7fuElJrLSX3LZufQvQbiLL4BCL/rtfMc3LTYL crMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=WRTLAcdznhrZedskLf6RFnKz3rdvDI3Rrzd5Vwnc2gw=; b=JEzuj3IBXlmKtRF3cFpFRYIHHGpTB0/BbhqTlg6o4Y4LXwu0pZoqWHMtcwAbgLqHrP arYT/bUyJ9PZb6LgTOX7DEtoN5i43IEUyUV54cve/4L/lBp34m5Mydo3dl4tW6Qi0HS9 /v0IGGaKBxLJksoGLdEWCplnCFGTawDEa7Y3uont2KKYULcbu0vG7tl3s28aiTqr08xW g71ej3taKSPJ0oYrVyEbUf1SYFdCwgp7C9j95gaU1MIxzpK5fbcl/IJh5w9V2S7ej3/o s4C43F2XRdViO+MySFUP7qN4PYOEV/Io5NMNNtJMJQBppsTYe3ajEhj4Mq+ouNVDj/YO iAdw== X-Gm-Message-State: ANoB5pmnPFTTzxFZGXwiRlAgKO82Yh4AriDr89JMLGRAq6n76GNSmq2o SuqS+b84vGaecEJoia6ygfKlTw== X-Received: by 2002:a05:600c:19c7:b0:3cf:7066:cf53 with SMTP id u7-20020a05600c19c700b003cf7066cf53mr1492095wmq.135.1668178539520; Fri, 11 Nov 2022 06:55:39 -0800 (PST) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id l22-20020a05600c16d600b003cf4eac8e80sm3614909wmn.23.2022.11.11.06.55.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Nov 2022 06:55:38 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id EDCE81FFC2; Fri, 11 Nov 2022 14:55:30 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: fam@euphon.net, berrange@redhat.com, f4bug@amsat.org, aurelien@aurel32.net, pbonzini@redhat.com, stefanha@redhat.com, crosa@redhat.com, Peter Maydell , =?utf-8?q?Alex_?= =?utf-8?q?Benn=C3=A9e?= , =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= , Wainer dos Santos Moschetta , Beraldo Leal Subject: [PATCH v2 10/12] tests/avocado: Raise timeout for boot_linux.py:BootLinuxPPC64.test_pseries_tcg Date: Fri, 11 Nov 2022 14:55:27 +0000 Message-Id: <20221111145529.4020801-11-alex.bennee@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221111145529.4020801-1-alex.bennee@linaro.org> References: <20221111145529.4020801-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::336; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x336.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Peter Maydell On my machine, a debug build of QEMU takes about 260 seconds to complete this test, so with the current timeout value of 180 seconds it always times out. Double the timeout value to 360 so the test definitely has enough time to complete. Signed-off-by: Peter Maydell Signed-off-by: Alex Bennée Message-Id: <20221110142901.3832318-1-peter.maydell@linaro.org> --- tests/avocado/boot_linux.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/avocado/boot_linux.py b/tests/avocado/boot_linux.py index 571d33882a..2be4be395d 100644 --- a/tests/avocado/boot_linux.py +++ b/tests/avocado/boot_linux.py @@ -116,7 +116,7 @@ class BootLinuxPPC64(LinuxTest): :avocado: tags=arch:ppc64 """ - timeout = 180 + timeout = 360 def test_pseries_tcg(self): """ From patchwork Fri Nov 11 14:55:28 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: 623737 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp827449pvb; Fri, 11 Nov 2022 06:57:14 -0800 (PST) X-Google-Smtp-Source: AA0mqf5SJHW/naeLY40DneMNFAsCKkZJc+nZAElnqTbBR4cjRP3FljuhGapgkt++T+OPjLXrI9cp X-Received: by 2002:a05:620a:e1b:b0:6ec:c52d:65d4 with SMTP id y27-20020a05620a0e1b00b006ecc52d65d4mr1296351qkm.714.1668178634517; Fri, 11 Nov 2022 06:57:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668178634; cv=none; d=google.com; s=arc-20160816; b=lFCPMi+pHRsR+bphYvwz/mPuij4s1TvWwoQ+l615DIkNZKAmdw3eJNwemEDMJd/8sw Ia+ZBK7oT2d9wb3JEVncC9oZjaIpVFlUsvRMbFMUkY/Rqn0yTEkksdWzqHdFbwzrgTde /ifsd690ZIXhFHEPyhaHVjc6pFMfyzETlI4kPovHrqxqxDX5h9BDL59Z+xUq7S0h/ZQE R1jC5FX+lphEdehEQfwSx6abMIulttk1RvaDIGTrbWTmrnsP+qCrvA6iwbgq5cqpyFSh TRM2S1BkBRQhJFEa0ivHecVqcL2m8CI4UpfwS1Iyv24BDhiNOZzfanr8QA9RERZgTowy kn0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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:cc:to :from:dkim-signature; bh=GVzdQxsHhnuYq5mRH3xtvS6YyI7O0gS+e+/HR5H+7a8=; b=K6yDAhmOk6WnCuPq2ESX7FK+omHhC2ajbdJUbZ9QJT+bEMOxOj1cT0cdjiAHPDKpb4 1v6i1XNKo4s9PStpMC6y432h4ru7BXzlXLWmoY8UejScL4QvUQCHErd4U4Y8Lm8ASsY7 E0uKjAng+NFmDrVwFUcm3QqkWXmLRkVYyNOE2D1dSq7MhtiQIchqH8NI6ARXYDQK0EpU 89jRS0Gqsv9NhykmknU5JIHqkKVd0TH5T7OPGbHyeePqumgQTehPMTjoRVQu19EWGW+P djLK15BL075yrjivx3qNY5woiXi6Nt7SZvZE3poEFC5bbqMATOGNXhA9Zd1t+asmWmKz HiIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mBcf2Kfb; 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=pass (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 d18-20020a05620a137200b006f765f6aa33si1062649qkl.52.2022.11.11.06.57.14 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 11 Nov 2022 06:57: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=pass header.i=@linaro.org header.s=google header.b=mBcf2Kfb; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1otVRb-00075A-KP; Fri, 11 Nov 2022 09:55:47 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1otVRY-00073W-8N for qemu-devel@nongnu.org; Fri, 11 Nov 2022 09:55:45 -0500 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1otVRV-0007xo-UU for qemu-devel@nongnu.org; Fri, 11 Nov 2022 09:55:43 -0500 Received: by mail-wm1-x333.google.com with SMTP id p13-20020a05600c468d00b003cf8859ed1bso3300483wmo.1 for ; Fri, 11 Nov 2022 06:55:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=GVzdQxsHhnuYq5mRH3xtvS6YyI7O0gS+e+/HR5H+7a8=; b=mBcf2KfbKpC5B1l0tpd425lKEVZ7Is3T0ONaIHhl7IzOlxnLCV1nodqvvfc21fvIy2 1IaajB3RE3Yt7gUhpTNJMiJ9BnosOe7hpXeYupli2zenk7lVo2rvD56Ao60HPfifp67m wVQ/ppmXYR/KeD6+6itBrs4a84g5AS3eRz/kpbhbq5AbfHJPKKnU55Qoc5/DgDr4I6Qj NpNoYoz8GcjFoWqtS8ssfPf5FdzADkaCzwwWF+c+r5JEJh5eNk9uoPD1cJOSALT+3Ugu Xjry66L9KJF6toLpbeYRhkPeZaht992LRt0k34H3k/8BHmZwuj9rSCAdf/i6MAgxgVIp 4qRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=GVzdQxsHhnuYq5mRH3xtvS6YyI7O0gS+e+/HR5H+7a8=; b=vIRmsg5JNNfBiImoEwPKAVN3zloP9b8GGdpGS8qY8hKxh14RqmtZMXjKgYnscwK/Pp 8R+nE8q2HuOb7ANBlqJ9b8E1s2xiZKhWGm8nbg8080qDjN5MihHjgh2zKqizUKLcf4EL mLtgim56yeNSx98g0akdtvSTiMqng1akzpksUzll298qqVfa2KfjhYr8C6xhV818jhny N8SkP3DnTwkDAbm+ve5oXinPTDUi4aSoDcUD/A8sye/nCw3YRjp6OcXiliHQ1R7P2u2s J543fKFuwsN24roiNLB/N78knogxkwwZB7f3QCxCPg/V0Ic1RUzQengI2ZvBIxbLz7y+ hCMg== X-Gm-Message-State: ANoB5pnAZGYArqZh2sdR5Iq/3aHNyIaZxoEbBpM2mqbz0tfoa81chAGW 7nRM0ICF18qL8H2zEM9GwPhDeg== X-Received: by 2002:a05:600c:43d6:b0:3cf:a18d:39b1 with SMTP id f22-20020a05600c43d600b003cfa18d39b1mr1447850wmn.149.1668178539906; Fri, 11 Nov 2022 06:55:39 -0800 (PST) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id t67-20020a1c4646000000b003cfa622a18asm8890923wma.3.2022.11.11.06.55.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Nov 2022 06:55:38 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 109141FFC3; Fri, 11 Nov 2022 14:55:31 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: fam@euphon.net, berrange@redhat.com, f4bug@amsat.org, aurelien@aurel32.net, pbonzini@redhat.com, stefanha@redhat.com, crosa@redhat.com, =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Thomas Huth , Wainer dos Santos Moschetta , Beraldo Leal Subject: [PATCH v2 11/12] gitlab: integrate coverage report Date: Fri, 11 Nov 2022 14:55:28 +0000 Message-Id: <20221111145529.4020801-12-alex.bennee@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221111145529.4020801-1-alex.bennee@linaro.org> References: <20221111145529.4020801-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x333.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org This should hopefully give is nice coverage information about what our tests (or at least the subset we are running) have hit. Ideally we would want a way to trigger coverage on tests likely to be affected by the current commit. Signed-off-by: Alex Bennée Acked-by: Stefan Hajnoczi --- .gitlab-ci.d/buildtest.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.d/buildtest.yml b/.gitlab-ci.d/buildtest.yml index 7173749c52..d21b4a1fd4 100644 --- a/.gitlab-ci.d/buildtest.yml +++ b/.gitlab-ci.d/buildtest.yml @@ -494,7 +494,17 @@ check-gprof-gcov: IMAGE: ubuntu2004 MAKE_CHECK_ARGS: check after_script: - - ${CI_PROJECT_DIR}/scripts/ci/coverage-summary.sh + - cd build + - gcovr --xml-pretty --exclude-unreachable-branches --print-summary + -o coverage.xml --root ${CI_PROJECT_DIR} . *.p + coverage: /^\s*lines:\s*\d+.\d+\%/ + artifacts: + name: ${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHA} + expire_in: 2 days + reports: + coverage_report: + coverage_format: cobertura + path: build/coverage.xml build-oss-fuzz: extends: .native_build_job_template From patchwork Fri Nov 11 14:55:29 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: 623745 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp828072pvb; Fri, 11 Nov 2022 06:58:20 -0800 (PST) X-Google-Smtp-Source: AA0mqf7b7Qlt3v8tAK4mrfKWMtSz379oS06Cb6Wcnd8BJNF3P3XBAHTRQxKCt/Tqelj5bdyspzoE X-Received: by 2002:a05:6214:5913:b0:4bb:59c1:3ded with SMTP id lp19-20020a056214591300b004bb59c13dedmr2222841qvb.68.1668178700406; Fri, 11 Nov 2022 06:58:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668178700; cv=none; d=google.com; s=arc-20160816; b=OhB/JnjoY91xmPOHKSG8FLwyi0bn3ssuEMwsQ22rxweG87e8HXLXOhH/QVxVpwdBtq BFnvbLmRBZHrbc/rvGB1kDcNR6ikOuRU0wcLIbgga5/MJKt+s8mEfr9vgYl1nLYOfgPk MrCTj9S0CpA+xiulWpnWSpf7sUuKuOG7CFlJs9Tw/AZ4kxdZ4774dV4BztopCcT2EHg1 4HN7TotRNcLiy22kCvg4M6AILxparrhb7YfnmM8e4K/cOyqPnFHBu3wx54m857ZXUdCe 1KSWch4G0bTDucTm4fbrdMY68fwf+OZajg1oUh+9UFhe4AWijWMwmpGLibn6i5fNkgQB 7oUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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:cc:to :from:dkim-signature; bh=3w4mX1qsjSiPO0pJ/lfZfSTSL+aAl8Bv1zC1N3BSyI8=; b=YSoVMef2PWX8lJugrZios7ctTTdc3/oitvh3SmD3rWenBT6IjSonjvxdqHnalHLgR8 lIWfY51gBeVvoIz8MaJCk4SYeMn+Azo4vNqEn6o5VUYg8VWBCQe2PCFb6t8gzUCvfe5i qZF9oo7P9DuLhxBjJrutk9/ouMVXmIIvSDCNJUr2IZSfO/lgwJX+NlIJFUENhJvbJX58 lJ/VBHS7Dca1O98c4yueHV+RYRhfKajtRKx/WFwncPWK9Mkuw++zl+az+q+7NxyFZqRa Sm89hbf4egtqayxv/XxVq8MpzQn7SPUv5E2l7bKAcxP6khxGMC/iCWKiqvNcKxvfKIY+ a6RA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fMTvIFFD; 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=pass (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 gh9-20020a05621429c900b004b9e3d82eb6si1010770qvb.161.2022.11.11.06.58.20 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 11 Nov 2022 06:58:20 -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=pass header.i=@linaro.org header.s=google header.b=fMTvIFFD; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1otVRa-00074i-P0; Fri, 11 Nov 2022 09:55:46 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1otVRZ-00073c-Dz for qemu-devel@nongnu.org; Fri, 11 Nov 2022 09:55:45 -0500 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1otVRW-0007yP-KT for qemu-devel@nongnu.org; Fri, 11 Nov 2022 09:55:45 -0500 Received: by mail-wr1-x434.google.com with SMTP id l14so6808453wrw.2 for ; Fri, 11 Nov 2022 06:55:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=3w4mX1qsjSiPO0pJ/lfZfSTSL+aAl8Bv1zC1N3BSyI8=; b=fMTvIFFDCorfBpb/boI/HoBjuSOj1lrwBEdBgCRLf/iRw1+F//eR6oStfvCoMXWMnG nO/yAOIb6SctuwUgcLfA2mF1qJZRxigh1NCFKiO2iFYHxW+lvNJwNFbJ2uJ6jSXJwXt2 4daJd8KEHWXYfZ4YIRQoQBYlUEQRtSt+vgdlksKrwDiz7XDvGba3/K1BMR8qofMCu6yV 19jbbF8xMRPhLYcLGyXv5/LTBs4HsDeu3Z/4v6ypdy99BJ3aHZYa6aC270leKVO40Sli cx2RPyvkLN8tRQAZ+Hu2009uUzn2yFJacOvQJkIXZAE3IMj0NaFW/apUtIuU1gV28Hpx XIQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=3w4mX1qsjSiPO0pJ/lfZfSTSL+aAl8Bv1zC1N3BSyI8=; b=oQBeVnmCtf/mmWDTJgOt8FjXMjiRv9CEyAFkzYRIJ9yHFfiaGU5wlujlJAXBPYJYkU 6ce0kYSGtkpO6RUWAJjoxK778ovMHlZPHZ/MKjmjhd09sINoNxjQ3fMxZnVduxKSD0Mo OJO1oMaqlDbuLhozYGSmjuhzwjO1yGN/rZhI+sUhdiUNoed/F3vDVUBrBIanUUEGKqmD QtprJ9kkkiJSkLz6RRmaQYR0w0Jtp0b3XC6gmv4JIGqB5T5alHlzdqHv6PzIXIzq4Xwq GA81ArSwSFSccVCnlpHiQV2GUVsCd6KepWg4gTH0SGanKOGM0P02Uzq6Oudt/x3meQH5 cPyg== X-Gm-Message-State: ANoB5pkj4SPSgaxHjtYyvcQ8B537J43ayp9IcJky1wdmCt4hPFVIvKIV +CCyXLy6octubiNFrPKjHFpvPQ== X-Received: by 2002:adf:e70c:0:b0:236:6578:48ad with SMTP id c12-20020adfe70c000000b00236657848admr1472896wrm.405.1668178541326; Fri, 11 Nov 2022 06:55:41 -0800 (PST) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id n19-20020a05600c3b9300b003b4c979e6bcsm9831705wms.10.2022.11.11.06.55.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Nov 2022 06:55:38 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 26F421FFC4; Fri, 11 Nov 2022 14:55:31 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: fam@euphon.net, berrange@redhat.com, f4bug@amsat.org, aurelien@aurel32.net, pbonzini@redhat.com, stefanha@redhat.com, crosa@redhat.com, =?utf-8?q?Alex_Benn=C3=A9e?= , Peter Maydell , qemu-arm@nongnu.org (open list:ARM cores) Subject: [PATCH v2 12/12] hw/intc: add implementation of GICD_IIDR to Arm GIC Date: Fri, 11 Nov 2022 14:55:29 +0000 Message-Id: <20221111145529.4020801-13-alex.bennee@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221111145529.4020801-1-alex.bennee@linaro.org> References: <20221111145529.4020801-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x434.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org a66a24585f (hw/intc/arm_gic: Implement read of GICC_IIDR) implemented this for the CPU interface register. The fact we don't implement it shows up when running Xen with -d guest_error which is definitely wrong because the guest is perfectly entitled to read it. Lightly re-factor this region of registers and also add a comment to the function in case anyway was under the illusion we only return bytes from a function called readb. Signed-off-by: Alex Bennée --- v2 - checkpatch fixes. --- hw/intc/arm_gic.c | 44 ++++++++++++++++++++++++++++++-------------- 1 file changed, 30 insertions(+), 14 deletions(-) diff --git a/hw/intc/arm_gic.c b/hw/intc/arm_gic.c index 492b2421ab..65b1ef7151 100644 --- a/hw/intc/arm_gic.c +++ b/hw/intc/arm_gic.c @@ -941,6 +941,10 @@ static void gic_complete_irq(GICState *s, int cpu, int irq, MemTxAttrs attrs) gic_update(s); } +/* + * Although this is named a byte read we don't always return bytes and + * rely on the calling function oring bits together. + */ static uint32_t gic_dist_readb(void *opaque, hwaddr offset, MemTxAttrs attrs) { GICState *s = (GICState *)opaque; @@ -954,23 +958,35 @@ static uint32_t gic_dist_readb(void *opaque, hwaddr offset, MemTxAttrs attrs) cpu = gic_get_current_cpu(s); cm = 1 << cpu; if (offset < 0x100) { - if (offset == 0) { /* GICD_CTLR */ - if (s->security_extn && !attrs.secure) { - /* The NS bank of this register is just an alias of the - * EnableGrp1 bit in the S bank version. - */ - return extract32(s->ctlr, 1, 1); - } else { - return s->ctlr; + if (offset < 0xc) { + switch (offset) { + case 0: /* GICD_CTLR[7:0] */ + { + if (s->security_extn && !attrs.secure) { + /* + * The NS bank of this register is just an alias of the + * EnableGrp1 bit in the S bank version. + */ + return extract32(s->ctlr, 1, 1); + } else { + return s->ctlr; + } } - } - if (offset == 4) - /* Interrupt Controller Type Register */ - return ((s->num_irq / 32) - 1) + case 4: /* GIC_TYPER - Interrupt Controller Type Register */ + { + return ((s->num_irq / 32) - 1) | ((s->num_cpu - 1) << 5) | (s->security_extn << 10); - if (offset < 0x08) - return 0; + } + case 8: /* GICD_IIDR - Implementer ID Register */ + { + return 0x43b; /* Arm JEP106 identity */ + } + default: + /* return 0 for high bits of above */ + return 0; + } + } if (offset >= 0x80) { /* Interrupt Group Registers: these RAZ/WI if this is an NS * access to a GIC with the security extensions, or if the GIC