From nobody Wed Nov 27 04:53:22 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=quarantine dis=none) header.from=virtuozzo.com ARC-Seal: i=1; a=rsa-sha256; t=1700655388; cv=none; d=zohomail.com; s=zohoarc; b=m78SbYH3Bm+AAIm5mtRjYe5ZDx9EHGTn+Ijd/twj1hAaY/CxOFmk/DY4+CWhjd2Dfki3qPD9oc+3k+wbHZWwLiLXvH0lCPxsig28rfD+cGdzf0UWGbPOtyyj5xqmTT7sLrjbVd/l1SOuGlPxXig+SbL/gmR/pIF4P72dsYrLDuw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1700655388; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=gzEdt4IIz7mke04dLp4NFBEK7maOCy0uinMh9XRkmf8=; b=G23tXCVZW1JECjkxpDSfP4e4hm2+7gVsiU7iAazwJPkr3ffIoARJTysE/Kb0BTgvuqOVpHJCP09+SoIfnML/r+jm9enDaEPj1ERfGn71I7MVS/l9SA+KPd5z202kRBJHr2CNjZS9MwLJZbEInsMJ6/INcYhlqg4G00zB8Ubg2vI= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1700655388012366.71444930911025; Wed, 22 Nov 2023 04:16:28 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r5m8y-0007hE-7h; Wed, 22 Nov 2023 07:15: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 1r5m8u-0007eN-40; Wed, 22 Nov 2023 07:15:46 -0500 Received: from relay.virtuozzo.com ([130.117.225.111]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r5m8s-0006ky-18; Wed, 22 Nov 2023 07:15:43 -0500 Received: from [130.117.225.1] (helo=dev005.ch-qa.vzint.dev) by relay.virtuozzo.com with esmtp (Exim 4.96) (envelope-from ) id 1r5m7Z-004kUj-36; Wed, 22 Nov 2023 13:15:26 +0100 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=virtuozzo.com; s=relay; h=MIME-Version:Message-Id:Date:Subject:From: Content-Type; bh=gzEdt4IIz7mke04dLp4NFBEK7maOCy0uinMh9XRkmf8=; b=qiLNIx5dMtcQ GnZNTJgEDGV0RAr5IeQbUrBa8nKS7/z+I6M9Meo5aOxxP3qArZDRNgIYVdpT/3cH2BZ/I4lprMmNz 8AnUlv3V58EK58pKP6bbQnd/UWkUu7LYqdq4sH5DH98e9bN5XkTfQqVwMzIqfJhv1gOxMyGf1u8VX MelhNWoswts1+vEYHbPMIw4geQdkSM9ZcW7P3AHfGBM1e72mU+/meIfZpm8b3cLvgeX03TBtp5R7x I0wqoVh+gH3B1RQHAOVlJDB2VsGycvHOMRIwMFBLygQWxSdGnCOGLe/7ujH1KQiHgTU23J0lkKH7y hBJ50Zo9s/R9+goIhIfqpg==; From: Andrey Drobyshev To: qemu-block@nongnu.org Cc: qemu-devel@nongnu.org, hreitz@redhat.com, kwolf@redhat.com, andrey.drobyshev@virtuozzo.com, den@virtuozzo.com Subject: [PATCH] iotests: fix default MT detection Date: Wed, 22 Nov 2023 14:15:38 +0200 Message-Id: <20231122121538.32903-1-andrey.drobyshev@virtuozzo.com> X-Mailer: git-send-email 2.39.3 MIME-Version: 1.0 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=130.117.225.111; envelope-from=andrey.drobyshev@virtuozzo.com; helo=relay.virtuozzo.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, T_SCC_BODY_TEXT_LINE=-0.01 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 @virtuozzo.com) X-ZM-MESSAGEID: 1700655388809100003 Content-Type: text/plain; charset="utf-8" MT is being detected based on "-M help" output, and we're searching for the line ending with " (default)". However, in downstream one of the MTs marked as deprecated might become the default, in which case this logic breaks as the line would now end with " (default) (deprecated)". To fix potential issues here, let's relax that requirement and detect the mere presence of " (default)" line instead. Signed-off-by: Andrey Drobyshev --- tests/qemu-iotests/testenv.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qemu-iotests/testenv.py b/tests/qemu-iotests/testenv.py index e67ebd254b..3ff38f2661 100644 --- a/tests/qemu-iotests/testenv.py +++ b/tests/qemu-iotests/testenv.py @@ -40,7 +40,7 @@ def get_default_machine(qemu_prog: str) -> str: =20 machines =3D outp.split('\n') try: - default_machine =3D next(m for m in machines if m.endswith(' (defa= ult)')) + default_machine =3D next(m for m in machines if ' (default)' in m) except StopIteration: return '' default_machine =3D default_machine.split(' ', 1)[0] --=20 2.39.3