From nobody Thu May 2 20:08:03 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1667899467; cv=none; d=zohomail.com; s=zohoarc; b=LGYvwCN4WGyU9mE6DBD4k+6Env6qHYEINpegaTGTpHJLAh9bhw9bRG7Jk/3kwc4mENyg4jlbHaI6tHinCh64gockwAPC/IAS4TRTL2vd8W6nq+wik6b/vI6U1A40WukMio6BFcz03PvXkUeP9xeJRSiQ7xQUGAa0iHbW+z6ks4s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1667899467; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=XsIUPL4URppAX7w6NGrUdBT/BUmCRhwxzbv6AwfzKCA=; b=VgxB+7Jp+t1hrONrSeAZQMXoMdeuUPephtJHqHowaslaujj9/35mMajTWh0KMjex8ritna9xOkjBY196fpc3UXAAAKYA6ZjXSv7c4Ifb4lNKAeWmzNu4iMEcVHZQ/M/42etaPgpIk6OAPaTAF/Kck0Cttr2wJ6Lf9LZ5kL2Bd0w= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1667899467270797.4530016143807; Tue, 8 Nov 2022 01:24:27 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1osKpC-0007Da-Ar; Tue, 08 Nov 2022 04:23:18 -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 1osKp7-0007CK-5X for qemu-devel@nongnu.org; Tue, 08 Nov 2022 04:23:13 -0500 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1osKp4-0005mb-VR for qemu-devel@nongnu.org; Tue, 08 Nov 2022 04:23:12 -0500 Received: by mail-wm1-x32f.google.com with SMTP id m7-20020a05600c090700b003cf8a105d9eso8650722wmp.5 for ; Tue, 08 Nov 2022 01:23:10 -0800 (PST) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id c2-20020a5d4f02000000b002366553eca7sm9519221wru.83.2022.11.08.01.23.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Nov 2022 01:23:08 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 3CE1F1FFB8; Tue, 8 Nov 2022 09:23:08 +0000 (GMT) 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=W5CvJjaZeWufGA+5W/omDak7/5f8CoqAIkChf0pWDiIq05dkeNceeKUEtRJCdYB7FN N3pAUJyRsOr3E+dRfcwsxblg9SWi6j7+EWxKUFRnonQ1xOQ0u6Kt7SS0JHvcD1jrxluq n5uTWcaInCx1zopeeqULNVcpOnErP8Ng01922eA+fskQsIZhY7dg20SlYehVMdeE7OVw O3nR7BYItRRgTrwRdwatYXjNYLa1wGfiPAndWHzsfDOy2QnNUECVlxYwpK47Wz1xHgjr i3AtjX6jZ7lIwQb95ms4Zakfy6UcopoItVnjzwXJZrVXWfrtsgOgeN6E1wWdOcOiUJVH Ig9w== 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=e/orVsSXxXsquZ2Bg4aJpIm9Zzc4+Hl8z0dIZhPVFTC4RQSb6eDcs8np/Xm6RMq6tl PJadb3kz6bHzW6m65i/vSqljOskOppNEonCTdd/y55KGHivW5plfNyv4VPYOYJszlReb 136+MTKny6fedLhX+zj/VD737/IbxZrNO8JpQ7SSncl06VGWqv8UE/YsXWBWC9s/EPhY zGYz57KbmHAD50OJYZPSGa/aWiUCLqZqmw7Q/FqoO7k3lX9f3e9UVyO6aYYdr6RMbTgc INAS3qB2AISWkKsnG5Za5cBNx6IfXRz8tSHUgcAe+TcRee5gU0MBZ9Da5VSElR/p2WtT R5XQ== X-Gm-Message-State: ACrzQf0Js0EWcFOlv21yaMTiGEwfE9Mt680teRd8GzIkJA1fVu3VEPeD 3o0Dvg5R/8yp/lwv4o6PTgKabQ== X-Google-Smtp-Source: AMsMyM641Lgianvp3QAw6i6ZSH5fq7aWKzaKhYLl2rlEhzQqJRuq8jz9tEnSoqG6JCEk7vtKWk51oQ== X-Received: by 2002:a05:600c:4e45:b0:3cf:3e69:9351 with SMTP id e5-20020a05600c4e4500b003cf3e699351mr47101397wmq.2.1667899389460; Tue, 08 Nov 2022 01:23:09 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=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=20Benn=C3=A9e?= , Thomas Huth Subject: [PATCH v1 1/9] Run docker probe only if docker or podman are available Date: Tue, 8 Nov 2022 09:23:00 +0000 Message-Id: <20221108092308.1717426-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221108092308.1717426-1-alex.bennee@linaro.org> References: <20221108092308.1717426-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32f; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1667899469627100003 From: Stefan Weil The docker probe uses "sudo -n" which can cause an e-mail with a security w= arning 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 neit= her 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=C3=A9e --- 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 =20 container=3D"no" -if test $use_containers =3D "yes"; then +if test $use_containers =3D "yes" && (has "docker" || has "podman"); then case $($python "$source_path"/tests/docker/docker.py probe) in *docker) container=3Ddocker ;; podman) container=3Dpodman ;; --=20 2.34.1 From nobody Thu May 2 20:08:03 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1667899443; cv=none; d=zohomail.com; s=zohoarc; b=gFggg89OV2XTcyv8xwibnHQAFqOUb0fxzjgxprRpyZf4MWgNv/0PwPTXCLv9FKmvOJleWvC+JsQEztgMiCkeM8nbfO2teGWDTz89gqn/BnalAwv5zRYSamLpAv6Sp1fLDuOwBytY9DMWVh1nWOg0fd+0BIKY3UOWhekX/uaCNI0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1667899443; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=uigyf6qq9Am7cRVFYV/7zGs4tD3SV3rZRcR/12kbTNw=; b=kN+wNYu3Vme8XJvVPkFSupoQ++v/wVRJNZ788BAbtRJXHYn3Nzn4PFwf8a+Ftbr99pI8X3BPdr4kD0ZO2wNVO7WQp9HvuiXb72zW+ZdzvOabWCj0gLAhj2cme2bwgj0F7i6CnV62cTwtxwL6bFyMDmF10AsKQT8E3SHdwuXBzUo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 166789944302850.191639543251085; Tue, 8 Nov 2022 01:24:03 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1osKpF-0007EO-Nf; Tue, 08 Nov 2022 04:23:21 -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 1osKp9-0007Cx-GL for qemu-devel@nongnu.org; Tue, 08 Nov 2022 04:23:16 -0500 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1osKp6-0005oA-9l for qemu-devel@nongnu.org; Tue, 08 Nov 2022 04:23:15 -0500 Received: by mail-wr1-x435.google.com with SMTP id l14so19990880wrw.2 for ; Tue, 08 Nov 2022 01:23:11 -0800 (PST) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id fc15-20020a05600c524f00b003cf57329221sm15459328wmb.14.2022.11.08.01.23.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Nov 2022 01:23:09 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 5434D1FFBA; Tue, 8 Nov 2022 09:23:08 +0000 (GMT) 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=uigyf6qq9Am7cRVFYV/7zGs4tD3SV3rZRcR/12kbTNw=; b=gMVXpVuwCKTklzwH67pRe0XXCetjVfuv/THCWKn8zhrIJXv6T3rrflI0NRVuy+dbFV ainMGfNgtL6qEnDWLiUdEf1eXS78Oc3JQpjd5QYklFsfmJ0sLj6UqtGpP/DhpGnJWUsf wSKjBASh56XrOpRGD/W3/LP/SOzMS5vTPTX9jedtN3RgDFglVY94G5Okx4jkdxkslDqD G5+zijTfy93EFleRpTwt57PY6CRYGy+7F8NNKQb8Ut4ZNLNNts/QU4bWA/Xl679NrG1f ni4aNMNlI1O43bRmRlfLZ5rqC3muUpRu+cjb2BdaU8odP2ZkAV2oOX8attLnOlbp2RwI Kspg== 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=uigyf6qq9Am7cRVFYV/7zGs4tD3SV3rZRcR/12kbTNw=; b=ueEPZCWjSggFGqYOFg7wRMGkw8dliE8mthxBKn9oBWIWhRLdZzg9F4B9LOzWaZJcJC IlfcvtofpGurHEd84DODLK7pwrwLFauKRVfd3LnZxZZPOKUNsmrs245UScmOyc70xHAn ZjhbNl3+sAVeJ3cQjU7O7wmRhIi0qeXmHBChFdVN/IZR3r18SU29Hh9wY1jpPBsQhnIo qTvLqyoeWSz52dLulhdHlIVchAG5U1e/AaZakQk1TN0CPqsvE9vmVJ/OdzXG0hRYJoep fd/ji2Nu7QVCwF1G7yGmqbeG54QhYEhiTEVsqWbmwacAECFTnYTZ1Q2wwZ0ndb+1yW7H 7+iw== X-Gm-Message-State: ACrzQf1J34mYk/L4RcDdNRTbWFXYjbmxqWKr3VdrsXjx+ZR3B25PZLm2 3yUi2H4t/BG6M0qzly6qLL9+bQ== X-Google-Smtp-Source: AMsMyM57atcpmt93uN1LlTCrKzA6tF3bVJK/fJXwFXXaSpwaT3pGJoCgJGtiFn3iDhcpftqowB8JWw== X-Received: by 2002:adf:e40e:0:b0:236:b896:8f55 with SMTP id g14-20020adfe40e000000b00236b8968f55mr32824547wrm.281.1667899390697; Tue, 08 Nov 2022 01:23:10 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=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=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Beraldo Leal Subject: [PATCH v1 2/9] tests/avocado: improve behaviour waiting for login prompts Date: Tue, 8 Nov 2022 09:23:01 +0000 Message-Id: <20221108092308.1717426-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221108092308.1717426-1-alex.bennee@linaro.org> References: <20221108092308.1717426-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::435; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x435.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1667899443264100001 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=C3=A9e Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- 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..d6ff68e171 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=3D'qemu-system-',= arch=3DNone): return path return None =20 +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 =3D logging.getLogger('console') + peek_len =3D 0 + retries =3D 0 + + while True: + try: + old_peek_len =3D peek_len + peek_ahead =3D console.peek(min_match).decode() + peek_len =3D len(peek_ahead) + + # if we get stuck too long lets just fallback to readline + if peek_len <=3D old_peek_len: + retries +=3D 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', '\r\n')): + 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 + =20 def _console_interaction(test, success_message, failure_message, send_string, keep_sending=3DFalse, vm=3DNone): @@ -139,17 +191,52 @@ def _console_interaction(test, success_message, failu= re_message, vm =3D test.vm console =3D vm.console_socket.makefile(mode=3D'rb', encoding=3D'utf-8') console_logger =3D 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 =3D len(success_message) + else: + min_match =3D 0 + + console_logger.debug("looking for %d:(%s), sending %s (always=3D%s)", + min_match, success_message, send_string, keep_sen= ding) + while True: + msg =3D 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 =3D 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 =3D console.readline().decode().strip() + + # First we shall peek ahead for a potential match to cover wai= ting + # for lines without any newlines. + if min_match > 0: + msg =3D _peek_ahead(console, min_match, success_message) + + # otherwise we block here for a full line + if not msg: + msg =3D console.readline().decode().strip() + except UnicodeDecodeError: + console_logger.debug("skipped unicode error") msg =3D 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 --=20 2.34.1 From nobody Thu May 2 20:08:03 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1667899482; cv=none; d=zohomail.com; s=zohoarc; b=dBlouMdgxynBKDsW9zUxSfh9Uz021BFyp5AnTV1Efj+wpezaciGA1aniq3N9g1Uukdpk5yzsPLdkmH4+wAu4Ynn5+RIPWQtNg3QBdqVOGqxkMsLh3A95weGYvl4r+5QXXcWvJNl8jgAFDez5Zdx2Mkfgu4ChspNorZe8PCGpXNw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1667899482; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=qBC/zqhe+w8c2MXv32aYnBZCDh2hCBt3ueKfoisA7Og=; b=fL62g4UCQP911NsIkjkWNUABShrcmSC7KhO/AoSfqncZw3Dr4JYCyNklVIq+SZwuc3tyo3EkRYTSfzarxz8CGalGW+P8Z+bu+ke8JfPyWQdH7CypK+ggSfnmym6ABuenSuEMErzB6I2uNgQS7cIuVlo8wdLvL5aPtVCB9RsSsdc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1667899482930789.8290031626235; Tue, 8 Nov 2022 01:24:42 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1osKpW-0007No-Gz; Tue, 08 Nov 2022 04:23:38 -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 1osKpJ-0007Fk-Po for qemu-devel@nongnu.org; Tue, 08 Nov 2022 04:23:25 -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 1osKp9-0005oi-7L for qemu-devel@nongnu.org; Tue, 08 Nov 2022 04:23:25 -0500 Received: by mail-wm1-x333.google.com with SMTP id v7so8422859wmn.0 for ; Tue, 08 Nov 2022 01:23:14 -0800 (PST) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id j15-20020a5d604f000000b00236705daefesm9550600wrt.39.2022.11.08.01.23.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Nov 2022 01:23:09 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 6B98A1FFBB; Tue, 8 Nov 2022 09:23:08 +0000 (GMT) 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=mo3TP1aGA+/6qyCnthZ1d9uqmrNVikJG5cHs6qEgJsLnOMyQ+eaoUJG0vuZLzHbwmo 0EFJE36UQX4Za3z9lnfIbmeaWENpuiolyD5nq0khPqpyD28Ce4cE9HVdqm62gFoXGMn/ glapaDflqstR+ImKMvJdVDpLNP4T2TwB3gTTDEpeFOZVHwseCnYdTt4Ax/4dm3EA+rK8 3ujZb2yos3DikkwyU2p/nn3XK0L3js7Iou8E8yjRSjGJFg5XQo4tTuG0x1h4Kjc4/mil e77SMFFwAf5Ob0yVUq8yRta9hiV4SsYafKKRt60jHKUZr9RLuh/PpLOTCA0Nq1HI+pIj kKrg== 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=KBFqfLxyTU0EFmRWnlD4NlXOd5/ez7KqlM9FrU6TVWDBx/Xf6sYQKgKcn0+Odtrb9X 2R3QnVlAACEmZPxNchZzEtSxxMq7FDa95mkJdskwa0EOzo0P8tfkMDHStxumAbUIOuSj 1YA45Js1yCwhLJLpXr6SheeI6GOxDkuwARDszdNUftDFVAB71z/UyO1XJgfdIoHnfoxl M/V+89m59PxrwkKKI9enb5QAMx9C1L69ZrZ4HqTn3IgBbhYwD3MoDg9MMlglSIzj2gCy SOG8Cem7nUYoMzRF92TcBujSuPouA9yMzwp82i4Zeoq+FOX00250StIZPCej3Wx+Jrwh T9DA== X-Gm-Message-State: ACrzQf2oN2JvEEflOcEBkWhMht9AAngKRHB8WiR5BiAm+F0TIL6sZllz Dbw+ClF3xuqbtKdtp71NVNvB/w== X-Google-Smtp-Source: AMsMyM6C35+5XyAcX62bY3UepZunivjV1cnzaApQtsk+/x7I/dNu/QffC5XWUARk15nGNL01DqheAw== X-Received: by 2002:a05:600c:2116:b0:3cf:9db5:1e1a with SMTP id u22-20020a05600c211600b003cf9db51e1amr12561695wml.193.1667899392534; Tue, 08 Nov 2022 01:23:12 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=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=20Le=20Goater?= , =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Beraldo Leal Subject: [PATCH v1 3/9] tests/avocado/machine_aspeed.py: Reduce noise on the console for SDK tests Date: Tue, 8 Nov 2022 09:23:02 +0000 Message-Id: <20221108092308.1717426-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221108092308.1717426-1-alex.bennee@linaro.org> References: <20221108092308.1717426-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x333.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1667899483496100001 From: C=C3=A9dric 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=C3=A9dric Le Goater Message-Id: <20221104075347.370503-1-clg@kaod.org> Signed-off-by: Alex Benn=C3=A9e --- 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 =20 @@ -182,6 +183,8 @@ def test_arm_ast2600_evb_buildroot(self): =20 class AST2x00MachineSDK(QemuSystemTest): =20 + EXTRA_BOOTARGS =3D ' 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= =3DNone): failure_message=3D'Kernel panic - not syn= cing', vm=3Dvm) =20 - 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=3D' + image + ',if=3Dmtd,format= =3Draw', @@ -202,9 +205,13 @@ def do_test_arm_aspeed_sdk_start(self, image, cpu_id): self.vm.launch() =20 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, 'as= t#') + 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 ' + c= pu_id) =20 @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) =20 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:') =20 @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=3Daspeed.i2c.bus.5,address=3D0x32'); 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-d= efault:~#') --=20 2.34.1 From nobody Thu May 2 20:08:03 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1667899426; cv=none; d=zohomail.com; s=zohoarc; b=Ox2PEkYqmn+D/qbJG7iJmyrK6k7T2AEQrKgQA8m3Ocj5VrT7Ua2nWiWSI8V2wQdadvuyO8ZkFPjEjh9A1+smx0NluUyt5S+yHFC1+38Qzx5uGtLDP58ksul/kjBW4dKDD0V8oSPXlE29ytwfL3YY+pH0MYdNoG9SRekBISeWZcI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1667899426; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=7uXwU/1og6Y5YFCCkzlXH6mHIAZKAJashuR6BqLq8xE=; b=Wgr2hdEUOPvvpFKNiBigbbVHTLV7ble2jsRP6bSV8gY6eIa97bMCjbryu6HnXfDaCvM/Sa72+eoB+7bNatvMbsu1sV/ydAAOJ3BsFXLv6eEnozjuO8apt3o2HBwrNTs/SP7/Ncu0VboNTBlIGRHUsExKgNQrxq01bYhb1Mz8Uy8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1667899426556455.0503103858075; Tue, 8 Nov 2022 01:23:46 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1osKpJ-0007Fp-VM; Tue, 08 Nov 2022 04:23:25 -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 1osKpB-0007DV-Up for qemu-devel@nongnu.org; Tue, 08 Nov 2022 04:23:17 -0500 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1osKp8-0005oT-Dl for qemu-devel@nongnu.org; Tue, 08 Nov 2022 04:23:17 -0500 Received: by mail-wr1-x435.google.com with SMTP id a14so19964286wru.5 for ; Tue, 08 Nov 2022 01:23:13 -0800 (PST) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id ay15-20020a05600c1e0f00b003c6deb5c1edsm11032025wmb.45.2022.11.08.01.23.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Nov 2022 01:23:09 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 85ED81FFBC; Tue, 8 Nov 2022 09:23:08 +0000 (GMT) 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=yH0ZvAcVvt1bGy2FGEbgsuF7dOcFsPLuKCi0FSL6ftwU7PAMVZA1ZJEW+uJ8I2wWEc sDYUz21gIlMHSR78txluz2Lowl7GCrNdu+KsK62nfXVWXtRZ48By27XYFB84t3rXaUyz G6Nylma9BCS/JJz6OY6+XQ1U6WpHJyjNuVgKE2teAXth8brWX7gGc4WbmkXrYk4jxEwz lC+kuvPctRx84mR63rN5IRDvOyjyczG9aHnNE/zrYJ74imLS2/aDZpU0PPZLuHrs3dfz 63YA7I/zwysuC0NqmAu23F33wyCK/o9FCbAXLi+cIcvc7p/tcOF1Huh69YIvmDyRnEs1 qI2w== 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=pnpWHrfe0cukQwDAZrw4YZXzJqVf5w2peUBUzPAd+9yf7qhH2CZwtJUJwMiYaIMbKo H1xlaBWkpQmRnP7CqAroeICQqUZojyiYOBZTEb3sq5qM/xMtlbzc7fsA57Y/FoKyaej9 O2NxGKDdnW31jyCBCyDuj6U/Cccs/qLJRx99bxcwuto/jYL0RK+bCWg7+boQiElPBRMA FNdYVZr4HMOAtDIJgMb3yytizq3B2M9PRSf0N1ECl3cbIxeOGLSGaU+aII6v+BYOk2zu aVYXdnGj+a9f012PEjaxIe8juVIqKQnNEZt6GHw25M1HBuofnW0GMQX1Ab7rCI1oXA3M neew== X-Gm-Message-State: ACrzQf2OvCNXVPEq8e/a7TEwYxPMpTP7afxl2XdZf8RLOOflNb1yo34b +DDTWrSP3Q8ebIaRgAUMNW3Hxg== X-Google-Smtp-Source: AMsMyM60TEM79xarMEhfq2Jxp76LP2dMWcYDyD+kaU36RhUby8NBbEIQPfy0sfcton6BsQ9s3wIjjw== X-Received: by 2002:a05:6000:1052:b0:236:6e8e:8403 with SMTP id c18-20020a056000105200b002366e8e8403mr34588988wrx.178.1667899391778; Tue, 08 Nov 2022 01:23:11 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=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=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Thomas Huth , Wainer dos Santos Moschetta , Beraldo Leal Subject: [PATCH v1 4/9] tests/docker: allow user to override check target Date: Tue, 8 Nov 2022 09:23:03 +0000 Message-Id: <20221108092308.1717426-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221108092308.1717426-1-alex.bennee@linaro.org> References: <20221108092308.1717426-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::435; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x435.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1667899427201100003 This is useful when trying to bisect a particular failing test behind a docker run. For example: make docker-test-clang@fedora \ TARGET_LIST=3Darm-softmmu \ TEST_COMMAND=3D"meson test qtest-arm/qos-test" \ J=3D9 V=3D1 Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- 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=3Da,b,c Override target list in builds.' @echo ' EXTRA_CONFIGURE_OPTS=3D"..."' @echo ' Extra configure options.' + @echo ' TEST_COMMAND=3D"..." Override the default `make check` targe= t.' @echo ' IMAGES=3D"a b c ..": Restrict available images to subset.' @echo ' TESTS=3D"x y z .." Restrict available tests to subset.' @echo ' J=3D[0..9]* Overrides the -jN parameter for make co= mmands' @@ -230,6 +231,7 @@ docker-run: docker-qemu-src $(if $(NETWORK),$(if $(subst $(NETWORK),,1),--net=3D$(NETWORK)),--net= =3Dnone) \ -e TARGET_LIST=3D$(subst $(SPACE),$(COMMA),$(TARGET_LIST)) \ -e EXTRA_CONFIGURE_OPTS=3D"$(EXTRA_CONFIGURE_OPTS)" \ + -e TEST_COMMAND=3D"$(TEST_COMMAND)" \ -e V=3D$V -e J=3D$J -e DEBUG=3D$(DEBUG) \ -e SHOW_ENV=3D$(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 [ $# =3D 0 ]; then - INVOCATION=3D"check" + INVOCATION=3D"${TEST_COMMAND:-make $MAKEFLAGS check}" else - INVOCATION=3D"$@" + INVOCATION=3D"make $MAKEFLAGS $@" fi =20 - make $MAKEFLAGS $INVOCATION + $INVOCATION } =20 test_fail() --=20 2.34.1 From nobody Thu May 2 20:08:03 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1667899502; cv=none; d=zohomail.com; s=zohoarc; b=L2DI9JVMgGdA3LR5eubupCl2ZM4U6wYyutYVAEe9q1etMt5dyJCy9aaKzqQPquURu9L1RY3z/gah9ejdhfiqdLWPaXcWaM49zDppRfCNRJon80XwLVj9IyT/AQFEirUuyZTA0V7ghwAQRq4E1Kd+CL+Sv546ParEVIJWWUoLp/Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1667899502; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=+Mtx8odvHwCV0bf17EfBgIaZ7U3IJZv+eeZfeBwc4UQ=; b=fDlICjhWdv9DAPWOAk9cSNbdqHKOKC2ob40+27s/Ag1y85LB+1lr/VnDb2H3qD/FMNBYFGcKyef9YpsVr9tnAsH7oW6msy863+f0GGVl6qlh8Z7ZGsS7yNVE5NbSxlnpjnIzL6HyhrjJav2DbTnrz7NBkeIdGGq0SR0WTbRhxDk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1667899502758223.6722034867497; Tue, 8 Nov 2022 01:25:02 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1osKpL-0007GX-Rv; Tue, 08 Nov 2022 04:23:28 -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 1osKpC-0007Dg-Ig for qemu-devel@nongnu.org; Tue, 08 Nov 2022 04:23:18 -0500 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1osKpA-0005p4-7o for qemu-devel@nongnu.org; Tue, 08 Nov 2022 04:23:18 -0500 Received: by mail-wr1-x430.google.com with SMTP id g12so19904049wrs.10 for ; Tue, 08 Nov 2022 01:23:14 -0800 (PST) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id b9-20020a05600010c900b002368424f89esm9713795wrx.67.2022.11.08.01.23.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Nov 2022 01:23:10 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id B16A91FFBD; Tue, 8 Nov 2022 09:23:08 +0000 (GMT) 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=+Mtx8odvHwCV0bf17EfBgIaZ7U3IJZv+eeZfeBwc4UQ=; b=pylU059h9atBQP2HUJ1P2PS5gPhC528RXgxry6KwVPVJPUphbcC7U9294RnSW+1vxy 7G52xLzTQMlkaXzX8tE1ojTe6NDZN91xdDS+96gOQgKvL9qkfRNq/acxVJsmmONzuiwT 0RoBbKFiG2X4WS/ZU2y8NolvEpt/JT4l2Sp2Ny+9LrTDIJsWPk0jUj0hnoCZgUYX/AS+ /6OG5xIZXCclbNAfUrIsRvXAzJhVHgJDTKu9LV0dh8F7RNuHbNeVAKvUjDrsnn9OyINP WmKfY4roK69ctfmrPmJipUJocf67Kb9y0GX5kTY3VSM8s/hXHg+EKy1GjV2qJbG1Q3yQ VBLA== 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=+Mtx8odvHwCV0bf17EfBgIaZ7U3IJZv+eeZfeBwc4UQ=; b=LNjAjjK9FeeZAlT8/IcV+cdMZub81NoOyKfMTbYNEp2Xm5lCETEcARtKIvZmjfSjaR pgG7ZRS7HDWhfnUm1YDNUl4Q/09IrsYzQ2jem+OLArz/9SP+8ANTEDi8upVFoC3nbLLX Sg7y0duZ2KyOmRTwMHVj3tihPAF3W/eUeCtiajtYnotvZbzBUSWzSZOFEdDnrN3g0Q0B UfHLw4DhmNTFC7fxRQYgCYeeFsvzcLgCleFBiweprbFRoh8jlOg4Ps307t0X06nEW5a2 xR7D129y4MI2F7GjRrso2vpZZTGVNGlAI5xNh/0zntSwyPR/VI6WSJMMercGAL7W8HpL b6+w== X-Gm-Message-State: ACrzQf2boyPhLr72jmcLjrGjtgC76aFnEOXwb4E+CZdOd0e/KKKBj8bk v0+leratdarmSdbeAiSdHY+mOA== X-Google-Smtp-Source: AMsMyM7o+8dkKOT21Dl6NyLgXXUlpgQssrxuk38rTG2mYpzszpQf9iqM78gt/GvcoihxEtFQvXdvrg== X-Received: by 2002:a5d:4b51:0:b0:236:88a2:267f with SMTP id w17-20020a5d4b51000000b0023688a2267fmr33450222wrs.461.1667899393939; Tue, 08 Nov 2022 01:23:13 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=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=20Benn=C3=A9e?= , "Michael S. Tsirkin" , Raphael Norwitz , Kevin Wolf , Hanna Reitz , "Dr. David Alan Gilbert" , Viresh Kumar , Mathieu Poirier , qemu-block@nongnu.org (open list:Block layer core), virtio-fs@redhat.com (open list:virtiofs) Subject: [PATCH v1 5/9] hw/virtio: introduce virtio_device_should_start Date: Tue, 8 Nov 2022 09:23:04 +0000 Message-Id: <20221108092308.1717426-6-alex.bennee@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221108092308.1717426-1-alex.bennee@linaro.org> References: <20221108092308.1717426-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x430.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1667899503586100002 The previous fix to virtio_device_started revealed a problem in its use by both the core and the device code. The core code should be able to handle the device "starting" while the VM isn't running to handle the restoration of migration state. To solve this dual use introduce a new helper for use by the vhost-user backends who all use it to feed a should_start variable. We can also pick up a change vhost_user_blk_set_status while we are at it which follows the same pattern. Fixes: 9f6bcfd99f (hw/virtio: move vm_running check to virtio_device_starte= d) Fixes: 27ba7b027f (hw/virtio: add boilerplate for vhost-user-gpio device) Signed-off-by: Alex Benn=C3=A9e Cc: "Michael S. Tsirkin" --- include/hw/virtio/virtio.h | 18 ++++++++++++++++++ hw/block/vhost-user-blk.c | 6 +----- hw/virtio/vhost-user-fs.c | 2 +- hw/virtio/vhost-user-gpio.c | 2 +- hw/virtio/vhost-user-i2c.c | 2 +- hw/virtio/vhost-user-rng.c | 2 +- hw/virtio/vhost-user-vsock.c | 2 +- hw/virtio/vhost-vsock.c | 2 +- 8 files changed, 25 insertions(+), 11 deletions(-) diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h index f41b4a7e64..3191c618f3 100644 --- a/include/hw/virtio/virtio.h +++ b/include/hw/virtio/virtio.h @@ -389,6 +389,24 @@ static inline bool virtio_device_started(VirtIODevice = *vdev, uint8_t status) return vdev->started; } =20 + return status & VIRTIO_CONFIG_S_DRIVER_OK; +} + +/** + * virtio_device_should_start() - check if device startable + * @vdev - the VirtIO device + * @status - the devices status bits + * + * This is similar to virtio_device_started() but also encapsulates a + * check on the VM status which would prevent a device starting + * anyway. + */ +static inline bool virtio_device_should_start(VirtIODevice *vdev, uint8_t = status) +{ + if (vdev->use_started) { + return vdev->started; + } + if (!vdev->vm_running) { return false; } diff --git a/hw/block/vhost-user-blk.c b/hw/block/vhost-user-blk.c index 13bf5cc47a..8feaf12e4e 100644 --- a/hw/block/vhost-user-blk.c +++ b/hw/block/vhost-user-blk.c @@ -222,14 +222,10 @@ static void vhost_user_blk_stop(VirtIODevice *vdev) static void vhost_user_blk_set_status(VirtIODevice *vdev, uint8_t status) { VHostUserBlk *s =3D VHOST_USER_BLK(vdev); - bool should_start =3D virtio_device_started(vdev, status); + bool should_start =3D virtio_device_should_start(vdev, status); Error *local_err =3D NULL; int ret; =20 - if (!vdev->vm_running) { - should_start =3D false; - } - if (!s->connected) { return; } diff --git a/hw/virtio/vhost-user-fs.c b/hw/virtio/vhost-user-fs.c index ad0f91c607..1c40f42045 100644 --- a/hw/virtio/vhost-user-fs.c +++ b/hw/virtio/vhost-user-fs.c @@ -123,7 +123,7 @@ static void vuf_stop(VirtIODevice *vdev) static void vuf_set_status(VirtIODevice *vdev, uint8_t status) { VHostUserFS *fs =3D VHOST_USER_FS(vdev); - bool should_start =3D virtio_device_started(vdev, status); + bool should_start =3D virtio_device_should_start(vdev, status); =20 if (vhost_dev_is_started(&fs->vhost_dev) =3D=3D should_start) { return; diff --git a/hw/virtio/vhost-user-gpio.c b/hw/virtio/vhost-user-gpio.c index 8b40fe450c..677d1c7730 100644 --- a/hw/virtio/vhost-user-gpio.c +++ b/hw/virtio/vhost-user-gpio.c @@ -152,7 +152,7 @@ static void vu_gpio_stop(VirtIODevice *vdev) static void vu_gpio_set_status(VirtIODevice *vdev, uint8_t status) { VHostUserGPIO *gpio =3D VHOST_USER_GPIO(vdev); - bool should_start =3D virtio_device_started(vdev, status); + bool should_start =3D virtio_device_should_start(vdev, status); =20 trace_virtio_gpio_set_status(status); =20 diff --git a/hw/virtio/vhost-user-i2c.c b/hw/virtio/vhost-user-i2c.c index bc58b6c0d1..864eba695e 100644 --- a/hw/virtio/vhost-user-i2c.c +++ b/hw/virtio/vhost-user-i2c.c @@ -93,7 +93,7 @@ static void vu_i2c_stop(VirtIODevice *vdev) static void vu_i2c_set_status(VirtIODevice *vdev, uint8_t status) { VHostUserI2C *i2c =3D VHOST_USER_I2C(vdev); - bool should_start =3D virtio_device_started(vdev, status); + bool should_start =3D virtio_device_should_start(vdev, status); =20 if (vhost_dev_is_started(&i2c->vhost_dev) =3D=3D should_start) { return; diff --git a/hw/virtio/vhost-user-rng.c b/hw/virtio/vhost-user-rng.c index bc1f36c5ac..8b47287875 100644 --- a/hw/virtio/vhost-user-rng.c +++ b/hw/virtio/vhost-user-rng.c @@ -90,7 +90,7 @@ static void vu_rng_stop(VirtIODevice *vdev) static void vu_rng_set_status(VirtIODevice *vdev, uint8_t status) { VHostUserRNG *rng =3D VHOST_USER_RNG(vdev); - bool should_start =3D virtio_device_started(vdev, status); + bool should_start =3D virtio_device_should_start(vdev, status); =20 if (vhost_dev_is_started(&rng->vhost_dev) =3D=3D should_start) { return; diff --git a/hw/virtio/vhost-user-vsock.c b/hw/virtio/vhost-user-vsock.c index 7b67e29d83..9431b9792c 100644 --- a/hw/virtio/vhost-user-vsock.c +++ b/hw/virtio/vhost-user-vsock.c @@ -55,7 +55,7 @@ const VhostDevConfigOps vsock_ops =3D { static void vuv_set_status(VirtIODevice *vdev, uint8_t status) { VHostVSockCommon *vvc =3D VHOST_VSOCK_COMMON(vdev); - bool should_start =3D virtio_device_started(vdev, status); + bool should_start =3D virtio_device_should_start(vdev, status); =20 if (vhost_dev_is_started(&vvc->vhost_dev) =3D=3D should_start) { return; diff --git a/hw/virtio/vhost-vsock.c b/hw/virtio/vhost-vsock.c index 7dc3c73931..aa16d584ee 100644 --- a/hw/virtio/vhost-vsock.c +++ b/hw/virtio/vhost-vsock.c @@ -70,7 +70,7 @@ static int vhost_vsock_set_running(VirtIODevice *vdev, in= t start) static void vhost_vsock_set_status(VirtIODevice *vdev, uint8_t status) { VHostVSockCommon *vvc =3D VHOST_VSOCK_COMMON(vdev); - bool should_start =3D virtio_device_started(vdev, status); + bool should_start =3D virtio_device_should_start(vdev, status); int ret; =20 if (vhost_dev_is_started(&vvc->vhost_dev) =3D=3D should_start) { --=20 2.34.1 From nobody Thu May 2 20:08:03 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1667899414; cv=none; d=zohomail.com; s=zohoarc; b=Te4PF7/ru/aExvoiqS1JJjkI8A+izHODL26ovEZAwuOOiZ3m3Sr/sBskeovqO3oTgYuLgGbMRS18GVPCtUgd4uya0RiJ3SyhAdM40rjQfw5ruRWYgxgKg/llXqcAVtZ3PmjzvPrTnCBWSngG9MC8RQ4PIO48eM79ST709MhRKfY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1667899414; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=PETkHCmmDlOk/l4eNJN9a+MTbBUaCZh7Q5yajW/EJQg=; b=A9LcYqENFFaqt0f0gu3D1CyGF+oM3b0RdRdPOeXYGxjcKVhEIc5vevbs4h5JEL2Ok8Ujpr9nlAx/mjBB5m7EFan43pvaxNpPZsitrCLlpig2pNo30P73adF70ydxsIG3ZmdHMVT7AtElzadTV2HAJxUi5cQepKpW3t0LlSXTAFg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1667899414141766.7854262605749; Tue, 8 Nov 2022 01:23:34 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1osKpG-0007F0-Ov; Tue, 08 Nov 2022 04:23:22 -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 1osKpA-0007Cz-Vs for qemu-devel@nongnu.org; Tue, 08 Nov 2022 04:23:17 -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 1osKp8-0005os-Cz for qemu-devel@nongnu.org; Tue, 08 Nov 2022 04:23:16 -0500 Received: by mail-wm1-x32b.google.com with SMTP id i5-20020a1c3b05000000b003cfa97c05cdso637969wma.4 for ; Tue, 08 Nov 2022 01:23:13 -0800 (PST) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id z17-20020adfec91000000b002366e8eee11sm9508857wrn.101.2022.11.08.01.23.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Nov 2022 01:23:10 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id CF83E1FFBE; Tue, 8 Nov 2022 09:23:08 +0000 (GMT) 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=hPbtvtK/7aEGeHJZpkm4fTHtiVHpzEFss7EumU/eRkqyVZIyvC0m35J6KiCV5OuXJs pumgm04atdVvG+YNmxxP6vePer5bfaKBWfGbLA+Pddf16j+1urASApV3kc+m6AnOrUCa DJnn5jOVCOQ54Y3P54yIwG3f27TBYA0PYUwDRWKJevMzJSG0FYJzP5FtIWUIjwUgAtnV 9das+x+WtVlkjR8G2nzfvtBEPBRKS4DJyja50hpKwBKrPFcTx9f2b5gmFRQxsDbIP9kj CElS34VgLZSbKfKH/NGYrSau+q7REkPUmvjnRfwzv8zG8ZvcLOK+3eK1VP0CkVnhKsa9 B4cg== 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=byGZI2phifqaPXblQ9V2PaDNgSMBx3qLVBzNzRB1TLQcDwGuydS2RFsFAzU5kjZc3O iJz7Nc1YHQkZe60rT3zDpjvNTaqX/RG44oT5RuYNIkyDGnD3vPg99LGWdcRzxsX+/+Lu inZ/O/ZzS1lKstvtMsdnkX70ckhyewci5uYIW8spPbdHDTX7n0kzFzdBIWpfliDbtzEI gTaiS8psba93F7bPyvd6ahSae2m4Z0GO40qNOxKQYA7A4acw2wlUHwupJIYBJ728nw7W rn9m9yI0AwxQ4iR4XiCZnfGPFc76oJwe/THZLhgZdOqXZbaCftmkKx9A7z9EBSF1cDYb ltXQ== X-Gm-Message-State: ACrzQf2aEZ5lJf/iwdYvVNCi/xPrObzIahdy4GMiaJRigJB+l8Isi0Xf S6iSTVBBanwFtujvPWKqIOCOYg== X-Google-Smtp-Source: AMsMyM6csYomq8VuV7oHFu8DzTyBwjBkDsLd9w0hDcO6R9weKfH6LGJJiaUL7alO2OTNOxHOmH+ojQ== X-Received: by 2002:a05:600c:3c82:b0:3b5:60a6:c80f with SMTP id bg2-20020a05600c3c8200b003b560a6c80fmr36754347wmb.199.1667899392914; Tue, 08 Nov 2022 01:23:12 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=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=20Benn=C3=A9e?= Subject: [PATCH v1 6/9] docs/devel: add a maintainers section to development process Date: Tue, 8 Nov 2022 09:23:05 +0000 Message-Id: <20221108092308.1717426-7-alex.bennee@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221108092308.1717426-1-alex.bennee@linaro.org> References: <20221108092308.1717426-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32b; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1667899414940100005 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=C3=A9e 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 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 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 =20 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 +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + +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/submitti= ng-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. =20 -**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. =20 **Pull requests not for master should say "not for master" and have "PULL SUBSYSTEM whatever" in the subject tag**. If your pull request is --=20 2.34.1 From nobody Thu May 2 20:08:03 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1667899550; cv=none; d=zohomail.com; s=zohoarc; b=EqPrXrPdPc/iMAnCEFZ1v3xZ94xPffyEdtNwGbo25VPNxtdFovbZ99gDAPq1hANwaoe9suH+F4Sk3Bu5Vk0HhEmZa/fbfmOxXtrtQp5gkcHbhTyemZQehb5b/Z6aM/uKTLbiT4R7lj3ux0rEEFqLe55urdeXJWHb8fUI5R9R3J0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1667899550; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=U0bUaw8dD9ywC6S/a5dl4BRNFGfCaE47JrvKC4nt86Q=; b=J84Sh0MwO5HOQ2HZ6C8O7M5ilX9FTpIlxTbguHfjMIWaU7Ja+bclcOyJ2F5jxUqxYOcOJoUrsq3hAXidtr+CoqCzS/6SdQxS2ZEYgrAKWjwmIVk8KJJt6yOtGbw8BnE02ADIeFUPEIsUt3NDOxWZ7g9z306qAmEpjjbBN/jfRkY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1667899550068671.5588828232732; Tue, 8 Nov 2022 01:25:50 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1osKpO-0007HA-A4; Tue, 08 Nov 2022 04:23:30 -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 1osKpE-0007ER-Up for qemu-devel@nongnu.org; Tue, 08 Nov 2022 04:23:21 -0500 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1osKpB-0005pP-Cu for qemu-devel@nongnu.org; Tue, 08 Nov 2022 04:23:19 -0500 Received: by mail-wr1-x432.google.com with SMTP id j15so19957175wrq.3 for ; Tue, 08 Nov 2022 01:23:16 -0800 (PST) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id u13-20020a5d434d000000b0023647841c5bsm9553376wrr.60.2022.11.08.01.23.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Nov 2022 01:23:11 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id E42401FFBF; Tue, 8 Nov 2022 09:23:08 +0000 (GMT) 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=qLQHKRlZM4PYVqEZYXi0VpdmRGdlZ4kHL1DfUgmDRmPx+hs3RbDnmmDe0x0C7X6UHc yrX+VUC6b6++fAqWTKBJtz9GBNm0zeK20VvolZx5neAaxggotvlSDoKeuMjW3BWYY6o+ Xq1L94ICZbTn70nhwazmNCSDbGMtswMRKHZnbDaBpA6qk3YzJn1AW0ubhANOKc4VkNSk lw6aDFQpezCMWwrfL/pXRTx5UuWxkUO2CiTj2uZXDhPxXk/aRS+f+OI5/hiUXE7FCRrL cuekS2mYSk5YcuSFfZHStgOjVvfd2J7x5xO5fvj5kWsh5CI2AhnqXLSpE+CE/QLef6dG Gkmg== 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=7/0VWrDf+Fl/XaBxZJ90SvSqkD5kuQZwWG60qmPTKIi0JwScGv+tFLe1fzjEUrz5aq rOna4q2ItXisbUJoIrBKzNPAmTYcSUSIFPAf8q6IfX3ad3RsiwZ1iAoxMMSCfMJC4MD0 HbTS/znfoiNT0dUKrzSN6iPKUnWwwcESCpyBtcDo5I0PnCYToWcuozNj+/adbSnaF/Zd YjuJGur9sAO9IDzRYPkmHy+OiazTMZGnkxDTYuJay9/MroHwWM0q2hiBFN3jGPc9U/Op QHNiIe40GzIwUlHf0QPf4/iR8qWLWHo+gQE70Slnw/ygYAgzCW6Sf2QcCvgJgiJfHkti /60Q== X-Gm-Message-State: ACrzQf34pEbzD00f2lFaKQ2PU0mr8w0PTvyvRdkhprybJbbZHAM1PEfg v3On8GLKyWHvGZe3vMz2f4vjww== X-Google-Smtp-Source: AMsMyM7OcRqwvZIzLqkd0e5EhuCQR+k6BqCnD3665xvxHBjClmCGx9eabB5o9OmycKZRALs0XOuR1g== X-Received: by 2002:a5d:4644:0:b0:236:cb94:4c6c with SMTP id j4-20020a5d4644000000b00236cb944c6cmr29928685wrs.544.1667899394963; Tue, 08 Nov 2022 01:23:14 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=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=20Benn=C3=A9e?= Subject: [PATCH v1 7/9] docs/devel: make language a little less code centric Date: Tue, 8 Nov 2022 09:23:06 +0000 Message-Id: <20221108092308.1717426-8-alex.bennee@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221108092308.1717426-1-alex.bennee@linaro.org> References: <20221108092308.1717426-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::432; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x432.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1667899551807100002 We welcome all sorts of patches. Signed-off-by: Alex Benn=C3=A9e 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-pa= tch.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 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 -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. =20 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: --=20 2.34.1 From nobody Thu May 2 20:08:03 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1667899503; cv=none; d=zohomail.com; s=zohoarc; b=daGlrnrNH9ogvw9zFvyytKYKGgNxY3I/7DWZp2bvoF5tTXRwHqnQtCEYML+s8HjgGL0mTly7NsDGAXvegikhk8zwzDC55NCaYxYL7OztpfWCDPwMw9/Gagewoj3LjhNJzwFXuga897f8fbqhhHUNGPXi+aC9VBJiOuPCg3zNmEY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1667899503; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Tx51MAAfbml8CiT50HNaT+ihFTBqcLj/nxt/MFriuNA=; b=Y4biZ/HFtO6ThWQwf2h4L3t91IpYfGqgyULreHQ90QjpWg9rkBFche15YoPcGampPsHuhHsd5yZ9J6t/TuFK6cmMwVhfx8oIw2oUKHvhBFHLqZ9+bbcqMWwfL+TWFsj9Wh1jjai9II36QGG2nW6pjlZbHaQU4MLFsLEYLjrEuKI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1667899503153366.07036892677036; Tue, 8 Nov 2022 01:25:03 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1osKpU-0007Kd-92; Tue, 08 Nov 2022 04:23:36 -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 1osKpE-0007ES-UR for qemu-devel@nongnu.org; Tue, 08 Nov 2022 04:23:21 -0500 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1osKpB-0005pX-Fg for qemu-devel@nongnu.org; Tue, 08 Nov 2022 04:23:19 -0500 Received: by mail-wr1-x436.google.com with SMTP id j15so19957242wrq.3 for ; Tue, 08 Nov 2022 01:23:17 -0800 (PST) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id k4-20020a05600c168400b003c6f1732f65sm13660697wmn.38.2022.11.08.01.23.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Nov 2022 01:23:11 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 07DFE1FFC0; Tue, 8 Nov 2022 09:23:09 +0000 (GMT) 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=sFDh7eMoitvWm8ag6HcNN0yyPQq8J//5Ar0LNIN1AFkFgIhz/XZCkHFrNbsWf7x2d0 rO2vSXOsn6GrE3qA8cewrnxQ6so01LnsZj7zMW/iQ2HwPQ517XeEIhrq3NvVaJqidkIw goD3ISbDssJpS5BKPqOOFfwmLU7U4p6Yd+YlTb+TZhdp79yIW7NIeqPAtn1mRE1oD0wG zVyBfinh+8BhUW2EpLRPewJkJOOXXB67xMpiSmjtUDlVgTcZfLXYJH8wgoOkmVr3/Xyi iIOsGs5ENHAArIbOwsc49OUfhoyu/Kmtftz/y4uoDi1AlZFizNBHwxtg3SuX5bocLss5 c3HQ== 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=lApGInWOuERg1279BZnBJehIikalVwZGD/wtH8BC7TwPtlOgCDpkPaBXAuiSGlK0vE 2XZpz8/JbIvmNAUPnx73WdVX8PYUTKYeAlWUcyuDwIG28V7ug1c3STPvxrWzc237dfWx uIXu4kBjd5kZL+XKq9CrJaAE3tBsgaRUP9XO38UOLRxQlXc37YFsk55phJ8vie5pWv8v hhC4xr3er3bbr3eaOxOJsocwluSNVwPgzYC4n7J+6e6u8bILCZoNMm80XnFn8Virnca6 dBGTaL7AW5PLmevfR47opFXN3LBAjACIogpf/OMlasy0xTUUElV9jWyEVw99uhQ6BhiJ 9tMA== X-Gm-Message-State: ACrzQf18q1/BtFYSRMX9bk3t5GiTrI1Q6v2YBsaLzehTgZXMUrwjOPRt 9QS950QICnGk7cxYMohl0VKeuA== X-Google-Smtp-Source: AMsMyM5845NIEFhzC+MI7aGG7D80Hi6Au/eW5Eqj6Mr5co6XOB9cw21JOPk6MvAxRV8ZAwr1bZHWWA== X-Received: by 2002:a05:6000:10a:b0:236:6a79:f5cf with SMTP id o10-20020a056000010a00b002366a79f5cfmr33346242wrx.470.1667899395937; Tue, 08 Nov 2022 01:23:15 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=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=20Benn=C3=A9e?= Subject: [PATCH v1 8/9] docs/devel: simplify the minimal checklist Date: Tue, 8 Nov 2022 09:23:07 +0000 Message-Id: <20221108092308.1717426-9-alex.bennee@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221108092308.1717426-1-alex.bennee@linaro.org> References: <20221108092308.1717426-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::436; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x436.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1667899503554100001 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=C3=A9e 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-pa= tch.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: =20 -- 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 list= s 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:`partic= ipating_in_code_review` =20 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 ----------------------- =20 +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: =20 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 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ =20 -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. =20 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 (diffe= rent 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. =20 +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: =20 Include a meaningful cover letter @@ -397,9 +410,19 @@ Participating in Code Review ---------------------------- =20 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. =20 .. _stay_around_to_fix_problems_raised_in_code_review: =20 --=20 2.34.1 From nobody Thu May 2 20:08:03 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1667899604; cv=none; d=zohomail.com; s=zohoarc; b=Yvyw1RrcHudkTwHAs4lrYIEeVoHBQL4CX5k8q4Iq9E67CcbKo/4DJtjG+OocqUcNwjTPLHDSSY99bdrqaoJDIkF/zw+01QneoQciqKa0fcB26rpm5sTh4PfOxTO8/t2E8YHIHrC8UWYeltp0NcTXVXmH0p81PAhF/xUUwPqHkPQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1667899604; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=yLNK2qdPNMQMvzK3A+Wa0kPh913JqNLXh3QyXKK7U+k=; b=cDr8SuNjM2EKNe9N4pLAvkpbadiFPGh4ifSTYUXFz89rFxaQQeG8f2Q0h/qvH5jNS1VRDkt21D55wxzpV9LNd218CrMbGa+JOt4fXQeSjpaLlOZ0XQbgNBtrAVmSORrO2IKGA2yAXORRyJ3dJ++cBTnvdTShd1/4gdbyz43Pik4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1667899604162421.21904073557823; Tue, 8 Nov 2022 01:26:44 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1osKpM-0007H0-Ql; Tue, 08 Nov 2022 04:23:28 -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 1osKpE-0007EQ-U1 for qemu-devel@nongnu.org; Tue, 08 Nov 2022 04:23:21 -0500 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1osKpC-0005pq-CD for qemu-devel@nongnu.org; Tue, 08 Nov 2022 04:23:20 -0500 Received: by mail-wr1-x436.google.com with SMTP id a14so19964651wru.5 for ; Tue, 08 Nov 2022 01:23:17 -0800 (PST) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id s7-20020adfeb07000000b0022a3a887ceasm9538905wrn.49.2022.11.08.01.23.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Nov 2022 01:23:13 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 1E7871FFC1; Tue, 8 Nov 2022 09:23:09 +0000 (GMT) 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=u2Z+YKLP0aPMdHuzajDgrxdi213GM3D/1hKyz/jCvCw/YwUnZcRGbGdCrA/QaxQV/L lCDYOSdZYdgIvQtq5BcwgZ+yzqmTEFC1YHxYGLR1yVNfDi7QdMpWSTAzNG7yH7mo9vBf +2114x2Hm1HY+aXxapYEezSSy3hOUP3fhmTSNPEpuCXlIEBUBvjkC2UMBdOnpMgbbGG2 9C70FXtVJ5ipSUFa3MG2Fk94retDjxzbYGLYXUZc+rXbOZ4CA/rkfQO5emnq7C6ccSQx FhQwHLNfteubtBZ32iwVR2r7UreoQNGClrzNlVMlrGwT/WxWmgYVZIrVEc9pqWXTmUzK yyaQ== 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=NOvnYx91TKV6zvHsgiDB7HQufD6Hae+txjtEiY4tiJ5fte9yz8y72Q8OagH1tUMzI+ JQLzsQl0GusE/BLKg673ZKgvaoHYBdYOzi0yKuQ0rR9zSop7lXW9/uo0Ou7CUhFGBVSJ 8Lwg6LW6I0X4AzXqotavkI8yrGLZZRqOGN+Ad85gJKWKxG+VDqCjo1f2H2CVlSwiMn5c i9Zh9jsKtyU0dJPD5+QbtKh91M9J6pSo7ZZkt1PHKJCDRT0h3+/MnZcRU3LxHwiBDppp 0FkQDrMcTA26M8H5ZY+EuYwQqvH7q1qGWwE9hrH4wpTlHMJw6lwM1vHiHKKDJb4x3Kbo V3Cw== X-Gm-Message-State: ACrzQf0RemTPOiSeJiBci3pLyBwA3niN6oiKmEve6tV0t6AxNJbk3rQZ EwoEoV+NY40/SJWbK2NwUJNyqF88xaWclA== X-Google-Smtp-Source: AMsMyM54Y+9yViienlAebcgJQoSkLcXknIkhbCT9Ig73sse5UW2/8eOu/Jb4qVkPePTou3i9aebRDA== X-Received: by 2002:a5d:644b:0:b0:236:862b:9ef1 with SMTP id d11-20020a5d644b000000b00236862b9ef1mr34495500wrw.691.1667899396924; Tue, 08 Nov 2022 01:23:16 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=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=20Benn=C3=A9e?= , Markus Armbruster Subject: [PATCH v1 9/9] docs/devel: try and improve the language around patch review Date: Tue, 8 Nov 2022 09:23:08 +0000 Message-Id: <20221108092308.1717426-10-alex.bennee@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221108092308.1717426-1-alex.bennee@linaro.org> References: <20221108092308.1717426-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::436; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x436.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1667899606163100001 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=C3=A9e 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-pa= tch.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 a= pproach, 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. =20 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. =20 .. _pay_attention_to_review_comments: =20 --=20 2.34.1