Patchwork tests: try and scrub away IP addresses with $LOCALIP

login
register
mail settings
Submitter Augie Fackler
Date Nov. 30, 2017, 9:29 p.m.
Message ID <c302e8e1948355a38128.1512077380@augie-macbookpro2.roam.corp.google.com>
Download mbox | patch
Permalink /patch/25836/
State Accepted
Headers show

Comments

Augie Fackler - Nov. 30, 2017, 9:29 p.m.
# HG changeset patch
# User Augie Fackler <augie@google.com>
# Date 1511993262 18000
#      Wed Nov 29 17:07:42 2017 -0500
# Node ID c302e8e1948355a38128905db7c880ec2454e81b
# Parent  02e348000fb6eb411306d2c67c9c053351d189cc
tests: try and scrub away IP addresses with $LOCALIP

I'm not 100% sure this is sane, but it seems like a reasonable thing
to do...
Yuya Nishihara - Dec. 1, 2017, 1:28 p.m.
On Thu, 30 Nov 2017 16:29:40 -0500, Augie Fackler wrote:
> # HG changeset patch
> # User Augie Fackler <augie@google.com>
> # Date 1511993262 18000
> #      Wed Nov 29 17:07:42 2017 -0500
> # Node ID c302e8e1948355a38128905db7c880ec2454e81b
> # Parent  02e348000fb6eb411306d2c67c9c053351d189cc
> tests: try and scrub away IP addresses with $LOCALIP
> 
> I'm not 100% sure this is sane, but it seems like a reasonable thing
> to do...

Seems fine, queued, thanks.
Yuya Nishihara - Dec. 1, 2017, 1:37 p.m.
On Fri, 1 Dec 2017 22:28:29 +0900, Yuya Nishihara wrote:
> On Thu, 30 Nov 2017 16:29:40 -0500, Augie Fackler wrote:
> > # HG changeset patch
> > # User Augie Fackler <augie@google.com>
> > # Date 1511993262 18000
> > #      Wed Nov 29 17:07:42 2017 -0500
> > # Node ID c302e8e1948355a38128905db7c880ec2454e81b
> > # Parent  02e348000fb6eb411306d2c67c9c053351d189cc
> > tests: try and scrub away IP addresses with $LOCALIP
> > 
> > I'm not 100% sure this is sane, but it seems like a reasonable thing
> > to do...
> 
> Seems fine, queued, thanks.

Dropped because several tests have to be updated.
Augie Fackler - Dec. 4, 2017, 10:30 p.m.
> On Dec 1, 2017, at 08:37, Yuya Nishihara <yuya@tcha.org> wrote:
> 
> On Fri, 1 Dec 2017 22:28:29 +0900, Yuya Nishihara wrote:
>> On Thu, 30 Nov 2017 16:29:40 -0500, Augie Fackler wrote:
>>> # HG changeset patch
>>> # User Augie Fackler <augie@google.com>
>>> # Date 1511993262 18000
>>> #      Wed Nov 29 17:07:42 2017 -0500
>>> # Node ID c302e8e1948355a38128905db7c880ec2454e81b
>>> # Parent  02e348000fb6eb411306d2c67c9c053351d189cc
>>> tests: try and scrub away IP addresses with $LOCALIP
>>> 
>>> I'm not 100% sure this is sane, but it seems like a reasonable thing
>>> to do...
>> 
>> Seems fine, queued, thanks.
> 
> Dropped because several tests have to be updated.

Yeah, I can't make this work reliably. We'll have to live with check-code rules.

Patch

diff --git a/tests/common-pattern.py b/tests/common-pattern.py
--- a/tests/common-pattern.py
+++ b/tests/common-pattern.py
@@ -33,7 +33,7 @@  substitutions = [
      br'$USUAL_BUNDLE2_CAPS$'
     ),
     # HTTP log dates
-    (br' - - \[\d\d/.../2\d\d\d \d\d:\d\d:\d\d] "GET',
-     br' - - [$LOGDATE$] "GET'
+    (br'[0-9a-f.:-]+ - - \[\d\d/.../2\d\d\d \d\d:\d\d:\d\d] "GET',
+     br'$LOCALIP - - [$LOGDATE$] "GET'
     ),
 ]