From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id CF3363858D32 for ; Mon, 12 Feb 2024 14:03:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CF3363858D32 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org CF3363858D32 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1707746622; cv=none; b=aEDkUSU0n6nLJ5jf4tfHB3nFZ9cD1IOWrLvyoqqVOhmnYKd/z5ge51r5N+rjyI21O7g0eBes1e9fT02xqGAlhDKpJ1+2MOhRScrYIsTVEKByzC0GkRzuLqbkcLm6embARx0qkY55OUNp0z4hFaFxhd8C6wWmGWlAr8SJryB+A9k= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1707746622; c=relaxed/simple; bh=6XiymCjtZWdicE2XiDxnmenN+no7fxHUIPoA7UCnv6g=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=P69/xNb5GPJuFX//rp1VwbFyam8MYxtUKVpBctbJ6f67IsDyNCEdvu6bIV1UKlP27IMJytbX9WbHmTjmy8ACTajy+cHVFFd849JsfhvtbQFbtjXoJG9Z5Vh7J1CrlufHS/FyvfzqUlcCzUOv946dHDtTmSkH6QHSrjRwzxmR3lg= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1707746620; 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=Wh4Gc+G6UoL3V9VVPX9P3otbUHe9wo5dLrOdoOR5Qr4=; b=Nx/NbDM4M1JAqANDwDiBpiosLERVTRp96Xsnhz57k52TMthQ3M+0m5LXRrLaUIWfgKIaPv KEV+dl30IfH23y5SLWLVR6jEYseZyyyJk1PbMc3F8LPW0YsyK3ns85/6f4UbdnF04w7IQa q3dmSfgpaMRjyHQZsWN5BK3Ilrn01T8= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-649-VywAbUsnPWKHVq7EH-pdzg-1; Mon, 12 Feb 2024 09:03:38 -0500 X-MC-Unique: VywAbUsnPWKHVq7EH-pdzg-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 6A32C88D01E; Mon, 12 Feb 2024 14:03:37 +0000 (UTC) Received: from oldenburg3.str.redhat.com (unknown [10.39.192.236]) by smtp.corp.redhat.com (Postfix) with ESMTPS id F0A37492C2E; Mon, 12 Feb 2024 14:03:36 +0000 (UTC) From: Florian Weimer To: "H.J. Lu" Cc: libc-alpha@sourceware.org Subject: Re: [PATCH] test_printers_common.py: Remove invalid escape sequence References: <20240212133532.159366-1-hjl.tools@gmail.com> <87le7pbxrf.fsf@oldenburg3.str.redhat.com> Date: Mon, 12 Feb 2024 15:03:35 +0100 In-Reply-To: (H. J. Lu's message of "Mon, 12 Feb 2024 05:55:47 -0800") Message-ID: <87bk8lbwzs.fsf@oldenburg3.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.3 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.10 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-11.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: * H. J. Lu: > On Mon, Feb 12, 2024 at 5:47=E2=80=AFAM Florian Weimer wrote: >> >> * H. J. Lu: >> >> > Remove '\(' and '\)' from test_printers_common.py which aren't valid >> > Python escape sequences. This fixes the test warning: >> > >> > .../scripts/test_printers_common.py:101: SyntaxWarning: invalid escape= sequence '\(' >> > --- >> > scripts/test_printers_common.py | 2 +- >> > 1 file changed, 1 insertion(+), 1 deletion(-) >> > >> > diff --git a/scripts/test_printers_common.py b/scripts/test_printers_c= ommon.py >> > index bf700966ac..7085a2fbc2 100644 >> > --- a/scripts/test_printers_common.py >> > +++ b/scripts/test_printers_common.py >> > @@ -98,7 +98,7 @@ try: >> > # If everything's ok, spawn the gdb process we'll use for testing= . >> > gdb =3D pexpect.spawn(gdb_invocation, echo=3DFalse, timeout=3Dtim= eout, >> > encoding=3Dencoding) >> > - gdb_prompt =3D u'\(gdb\)' >> > + gdb_prompt =3D u'(gdb)' >> > gdb.expect(gdb_prompt) >> > >> > except pexpect.ExceptionPexpect as exception: >> >> This changes the string, you should use: >> >> + gdb_prompt =3D u'\\(gdb\\)' >> > > This change, \\( and \\), causes: > > FAIL: nptl/test-cond-printers > FAIL: nptl/test-condattr-printers > FAIL: nptl/test-mutex-printers > FAIL: nptl/test-mutexattr-printers > FAIL: nptl/test-rwlock-printers > FAIL: nptl/test-rwlockattr-printers > > My change doesn't have any regression. I don't understand that. Python 2.7.5 and 3.11.7 treat u'\(gdb\)' as u'\\(gdb\\)'. Thanks, Florian