From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yw1-x112d.google.com (mail-yw1-x112d.google.com [IPv6:2607:f8b0:4864:20::112d]) by sourceware.org (Postfix) with ESMTPS id 9BA633858D32 for ; Mon, 12 Feb 2024 14:07:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9BA633858D32 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 9BA633858D32 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::112d ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1707746876; cv=none; b=EexdC54n/3wjRn2u8MTXNCID0Yq9ZixeNloG5RWnYKTul3z4nad8hDP3KKcp5ZdnLdW4wV8KdWe6nPIK+wCCWY1sQkpIkuNEkgHGv/w8lXHNkPGlxgJFaCzj4O4zSMy6VDXgYDUKYzMG5q7FopeUtkmnLINpb57ch/YYxdPEFyE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1707746876; c=relaxed/simple; bh=MNzL0xgk6oRoBYbJyUmQO1ySz7qPD+m8jh4e2ZY8EvM=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=Uq8EuqwDeMNfv0JTB8eumrXjj12YLe1aiX5XXfakC7//WdLWpPdxSw6G6PmyoplwBGdX6mQEcW1i9uVoTBPItqr6SLYeKzFsUf0c7UFEXkd2/XoT6qf+4acMxk0BYD9ig5LHMPhAfM9B4NEX3UNMzlzsdwqUADlYAb8XBScyqvM= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-yw1-x112d.google.com with SMTP id 00721157ae682-604aab67616so26565747b3.2 for ; Mon, 12 Feb 2024 06:07:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707746871; x=1708351671; darn=sourceware.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=VKu1F8URlGTG5mOzf4kPGPMNNWts1ySbwZDKazMNWs8=; b=mI3ymPJ00w11+Of89zSDcVIJpauRBvAO2Hr96c38qNM0irLXb/a/5z1/aP0IwmmhLY qawhJTAzhGiPimSIw3XpelXyWKjfdVBiQpFxKlX15U2YnRdWx8hdCh9XggeQN2yTNi+v c+gBjpvuh0ZWEI2LHH4zd1uW7rYxsktWF0LJ2dkh1baYkkoSB8IRZ3syr6SV8rAkKziX 7tcOttIzQM58qpQK4mCBXtAuIdGL8vXWn05A9Kujg8fSmjd7yHBREV5uptWVvQotGkOF 5+dPiN1OfhCaObM4FDnzD/ZF/ny+NK/lo2r8DHYxNUMyRNAq7w3hUHfju6r5rA9Ii8sx CM9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707746871; x=1708351671; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VKu1F8URlGTG5mOzf4kPGPMNNWts1ySbwZDKazMNWs8=; b=PWndhzu3fJnurMcsunZlWdtObw4pZdifgxTt7EVSf7UWBdiF5dmsSPTQpuqVEy6uLk pHTfG8xJFwJClmekkRigYVHySwx5sGyi3MoKh3sS8TWv3B8EuAnzRDW/dBomqnU8OtZm XK2rk0wxbj9Oq3ZdZXfclxDaeTR33Wr4c3n79Ke0Zx3Ho+cmKtaT6kHR761VGCjSg93R BMIU/1FMVLvSxFLoWCh7yOHpmhAfKyUtHn8aZeL1ByyPA1GTiKbOYP1gOWOBXIfXWO78 u+z9I1x589ceIUw8tpN+AT+p+EhShyuKop23539IfproRXdK4J7IK3LmHljQb8hVbtV2 3xSA== X-Gm-Message-State: AOJu0Yzlca0UiQfGmBxVabCU77slWnSFR00BUjh7n+mwcb320/rtNvew ySbVuBziWYx48PPFgKrsnOGhqbEcHk3tVjwFHnPe8ItYVuZaWLPbbxLfrlABOvXYw+hz+NtAYmi QmJEK84keKdIPRVO6aq67nwCastLS8DcE X-Google-Smtp-Source: AGHT+IEVVOkMI+ZTF8jGRm1WKw6TPIskeSJKN8s+zjlKdC7UDPR0rhffwEe7O95VpTuBuUXkPed9p3EVmds2LAQW31A= X-Received: by 2002:a0d:dd12:0:b0:5ff:5867:e675 with SMTP id g18-20020a0ddd12000000b005ff5867e675mr3725731ywe.28.1707746870923; Mon, 12 Feb 2024 06:07:50 -0800 (PST) MIME-Version: 1.0 References: <20240212133532.159366-1-hjl.tools@gmail.com> <87le7pbxrf.fsf@oldenburg3.str.redhat.com> <87bk8lbwzs.fsf@oldenburg3.str.redhat.com> In-Reply-To: <87bk8lbwzs.fsf@oldenburg3.str.redhat.com> From: "H.J. Lu" Date: Mon, 12 Feb 2024 06:07:15 -0800 Message-ID: Subject: Re: [PATCH] test_printers_common.py: Remove invalid escape sequence To: Florian Weimer Cc: libc-alpha@sourceware.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-3020.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,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: On Mon, Feb 12, 2024 at 6:03=E2=80=AFAM Florian Weimer = wrote: > > * 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 esca= pe 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= _common.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 testi= ng. > >> > gdb =3D pexpect.spawn(gdb_invocation, echo=3DFalse, timeout=3Dt= imeout, > >> > 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 > Pilot error. Sent v2. --=20 H.J.