From nobody Wed Nov 27 18:47:32 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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1697617772; cv=none; d=zohomail.com; s=zohoarc; b=cPR6B9yYyg5Nm2CKZ4uw9WF0OzWwM7DQYUEQDkuOIkOmUhTzwmbj25IbM0oRrrZDcMCMEzf7ySmsTRYMGe4KUewX4srIRV0nj1kThENwBHSIC8rf3cenUbVe64Ov4OVud0LgUSDXDjMGqNnuyNHbKMgXMD/uWO012WbVzynxkxY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1697617772; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=yLArINKdo6Ey6TFV8Luh6W8bJ4ZGOIGe53j+qUGkQVg=; b=jyhCrKH3P3AuIlVDFVIglat+3MBRghoh4LEuQNNdWXbHn/dulJIZzf8eoeF5Y33yjEfKSnBEYzZ3szyVtlijY6R96SBtHH8BR4BP5/lSW96o81ettgB834RVX0ci5H2YRZSnu/Ki7d9Qfan86Ty6Puijhns3S2E/VgsXGaOaj8E= 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 169761777204292.26741362885923; Wed, 18 Oct 2023 01:29:32 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qt1up-0001gp-OS; Wed, 18 Oct 2023 04:28:31 -0400 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 1qt1uo-0001f5-A1 for qemu-devel@nongnu.org; Wed, 18 Oct 2023 04:28:30 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qt1um-0003eP-Rx for qemu-devel@nongnu.org; Wed, 18 Oct 2023 04:28:30 -0400 Received: from mail-ej1-f69.google.com (mail-ej1-f69.google.com [209.85.218.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-138-_yYRWlstNYiu6mK1B-xK7A-1; Wed, 18 Oct 2023 04:28:21 -0400 Received: by mail-ej1-f69.google.com with SMTP id a640c23a62f3a-9be8013f2d1so292905766b.3 for ; Wed, 18 Oct 2023 01:28:21 -0700 (PDT) Received: from [192.168.10.118] ([2001:b07:6468:f312:63a7:c72e:ea0e:6045]) by smtp.gmail.com with ESMTPSA id mm27-20020a170906cc5b00b009929ab17be0sm1178768ejb.162.2023.10.18.01.28.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 01:28:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1697617708; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yLArINKdo6Ey6TFV8Luh6W8bJ4ZGOIGe53j+qUGkQVg=; b=ieFgjvYihUN6PaeRw6iEpTGFX1dx5CVL1xKkruIE+D/l7fioZLoO6uqPgrSr4JIoa/p/CW UVOHJjiumjgwaghWXkkwopSqbYjvK0GYU0gVVMbIXjFvZq8lCyT3o/QHc8nThH1Y6xp2TZ FsGc7lngBjVZ7XOAa5X/9uXTFz5Kk28= X-MC-Unique: _yYRWlstNYiu6mK1B-xK7A-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697617700; x=1698222500; 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=yLArINKdo6Ey6TFV8Luh6W8bJ4ZGOIGe53j+qUGkQVg=; b=VBtEqMf8wH+C5UuYzDX+JushJYLzAsJNyw2Vw595lvkoM1xtGgrOGnT07yhF65uBCG G27ardjM27tE/Hemd5J842W3gBvcL89QK3hHEPgJj50F3fYhbhv/YFjDjS8F3ZzgcTbk 7xIciGb5nUpHnzhbJSSWJxKpkE9WAiIo1nzdTiN6vfjCgDu/OxMpDA/MpLBMbQY3g7N4 HfKydXg2GdOC5UxqYKrCxjLmhQbUuskLaW5LxyTw+uK6YcHg7bMLmHbF+XrapiLf4YG/ xN+k9/JjutWdonJTvI6TLaX9GFjz1Xz5pdJQs2sPfEYvqZmZvkRoBV/FEIVtdxOMLd4L lHIw== X-Gm-Message-State: AOJu0Yz4JCQGPPOgr5trVKA1iB0+Wanmctdw+cLe3+tWY67XxcAkjyVM mLgIWr0mek9hORaPz714EGcSeM7hwcqAzhNzKISl13I9wgKfv9VF2v/RJ3Qxq2jBzVP6bXUgTmN iy77FmEdEHCFDpYxEnmgLcqoryxcrtrGsEoGop0BEEaDRspXtg4GkExjkIijh3oe5Ki3dBc0T/8 w= X-Received: by 2002:a17:907:7b81:b0:9be:9d5f:6967 with SMTP id ne1-20020a1709077b8100b009be9d5f6967mr3454164ejc.69.1697617700207; Wed, 18 Oct 2023 01:28:20 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG9HjFisCyhljM+i6ujaAanuuLkm4DcJSLab9W1NHEh4oioiHcaV2yCuj8Y42oFYbyUSmNuPA== X-Received: by 2002:a17:907:7b81:b0:9be:9d5f:6967 with SMTP id ne1-20020a1709077b8100b009be9d5f6967mr3454149ejc.69.1697617699769; Wed, 18 Oct 2023 01:28:19 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: qemu-stable@nongnu.org Subject: [PULL 13/32] tests/vm: avoid invalid escape in Python string Date: Wed, 18 Oct 2023 10:27:33 +0200 Message-ID: <20231018082752.322306-14-pbonzini@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231018082752.322306-1-pbonzini@redhat.com> References: <20231018082752.322306-1-pbonzini@redhat.com> 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=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1697617773981100007 Content-Type: text/plain; charset="utf-8" This is an error in Python 3.12; fix it by using a raw string literal or by double-escaping the backslash. Cc: qemu-stable@nongnu.org Signed-off-by: Paolo Bonzini --- tests/vm/basevm.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py index 8aef4cff967..61725b83254 100644 --- a/tests/vm/basevm.py +++ b/tests/vm/basevm.py @@ -331,8 +331,8 @@ def console_init(self, timeout =3D None): def console_log(self, text): for line in re.split("[\r\n]", text): # filter out terminal escape sequences - line =3D re.sub("\x1b\[[0-9;?]*[a-zA-Z]", "", line) - line =3D re.sub("\x1b\([0-9;?]*[a-zA-Z]", "", line) + line =3D re.sub("\x1b\\[[0-9;?]*[a-zA-Z]", "", line) + line =3D re.sub("\x1b\\([0-9;?]*[a-zA-Z]", "", line) # replace unprintable chars line =3D re.sub("\x1b", "", line) line =3D re.sub("[\x00-\x1f]", ".", line) @@ -530,7 +530,7 @@ def get_qemu_version(qemu_path): and return the major number.""" output =3D subprocess.check_output([qemu_path, '--version']) version_line =3D output.decode("utf-8") - version_num =3D re.split(' |\(', version_line)[3].split('.')[0] + version_num =3D re.split(r' |\(', version_line)[3].split('.')[0] return int(version_num) =20 def parse_config(config, args): --=20 2.41.0