[PATCH] test-logtoprocess: fix the regular expression

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH] test-logtoprocess: fix the regular expression

Jun Wu
# HG changeset patch
# User Jun Wu <[hidden email]>
# Date 1487265078 28800
#      Thu Feb 16 09:11:18 2017 -0800
# Node ID ea77104f008e26351dde0b168432b8d903c4f240
# Parent  677049d4e7cadc6acfc557ef1ee8acf783c76e1d
# Available At https://bitbucket.org/quark-zju/hg-draft
#              hg pull https://bitbucket.org/quark-zju/hg-draft -r ea77104f008e
test-logtoprocess: fix the regular expression

Previously, the test fails if the block time is >= 10 ms, like:

  -  uiblocked stdio [0-9]+.[0-9]* ms command [0-9]+.[0-9]* ms (re)
  +  uiblocked stdio 0.0100135803223 ms command 23.8537788391 ms

This patch fixes the regular expression so the dot will be matched
correctly.

diff --git a/tests/test-logtoprocess.t b/tests/test-logtoprocess.t
--- a/tests/test-logtoprocess.t
+++ b/tests/test-logtoprocess.t
@@ -68,3 +68,3 @@ Confirm that logging blocked time catche
 
   $ hg log
-  uiblocked stdio [0-9]+.[0-9]* ms command [0-9]+.[0-9]* ms (re)
+  uiblocked stdio [0-9]+\.[0-9]* ms command [0-9]+\.[0-9]* ms (re)
_______________________________________________
Mercurial-devel mailing list
[hidden email]
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] test-logtoprocess: fix the regular expression

Augie Fackler-2
On Thu, Feb 16, 2017 at 09:14:52AM -0800, Jun Wu wrote:
> # HG changeset patch
> # User Jun Wu <[hidden email]>
> # Date 1487265078 28800
> #      Thu Feb 16 09:11:18 2017 -0800
> # Node ID ea77104f008e26351dde0b168432b8d903c4f240
> # Parent  677049d4e7cadc6acfc557ef1ee8acf783c76e1d
> # Available At https://bitbucket.org/quark-zju/hg-draft
> #              hg pull https://bitbucket.org/quark-zju/hg-draft -r ea77104f008e
> test-logtoprocess: fix the regular expression

You still have two problems!

(queued, many thanks for the fix)

>
> Previously, the test fails if the block time is >= 10 ms, like:
>
>   -  uiblocked stdio [0-9]+.[0-9]* ms command [0-9]+.[0-9]* ms (re)
>   +  uiblocked stdio 0.0100135803223 ms command 23.8537788391 ms
>
> This patch fixes the regular expression so the dot will be matched
> correctly.
>
> diff --git a/tests/test-logtoprocess.t b/tests/test-logtoprocess.t
> --- a/tests/test-logtoprocess.t
> +++ b/tests/test-logtoprocess.t
> @@ -68,3 +68,3 @@ Confirm that logging blocked time catche
>
>    $ hg log
> -  uiblocked stdio [0-9]+.[0-9]* ms command [0-9]+.[0-9]* ms (re)
> +  uiblocked stdio [0-9]+\.[0-9]* ms command [0-9]+\.[0-9]* ms (re)
> _______________________________________________
> Mercurial-devel mailing list
> [hidden email]
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
_______________________________________________
Mercurial-devel mailing list
[hidden email]
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] test-logtoprocess: fix the regular expression

Jun Wu
Excerpts from Augie Fackler's message of 2017-02-16 12:18:56 -0500:

> On Thu, Feb 16, 2017 at 09:14:52AM -0800, Jun Wu wrote:
> > # HG changeset patch
> > # User Jun Wu <[hidden email]>
> > # Date 1487265078 28800
> > #      Thu Feb 16 09:11:18 2017 -0800
> > # Node ID ea77104f008e26351dde0b168432b8d903c4f240
> > # Parent  677049d4e7cadc6acfc557ef1ee8acf783c76e1d
> > # Available At https://bitbucket.org/quark-zju/hg-draft 
> > #              hg pull https://bitbucket.org/quark-zju/hg-draft  -r ea77104f008e
> > test-logtoprocess: fix the regular expression
>
> You still have two problems!
>
> (queued, many thanks for the fix)

Actually this does not fix the problem as I thought. Please drop this :/
_______________________________________________
Mercurial-devel mailing list
[hidden email]
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] test-logtoprocess: fix the regular expression

Augie Fackler-2

> On Feb 16, 2017, at 12:36, Jun Wu <[hidden email]> wrote:
>
> Excerpts from Augie Fackler's message of 2017-02-16 12:18:56 -0500:
>> On Thu, Feb 16, 2017 at 09:14:52AM -0800, Jun Wu wrote:
>>> # HG changeset patch
>>> # User Jun Wu <[hidden email]>
>>> # Date 1487265078 28800
>>> #      Thu Feb 16 09:11:18 2017 -0800
>>> # Node ID ea77104f008e26351dde0b168432b8d903c4f240
>>> # Parent  677049d4e7cadc6acfc557ef1ee8acf783c76e1d
>>> # Available At https://bitbucket.org/quark-zju/hg-draft 
>>> #              hg pull https://bitbucket.org/quark-zju/hg-draft  -r ea77104f008e
>>> test-logtoprocess: fix the regular expression
>>
>> You still have two problems!
>>
>> (queued, many thanks for the fix)
>
> Actually this does not fix the problem as I thought. Please drop this :/

Dropped, make sure to `hg touch` it so you don't lose your copy.
_______________________________________________
Mercurial-devel mailing list
[hidden email]
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] test-logtoprocess: fix the regular expression

Martin von Zweigbergk via Mercurial-devel
On Thu, Feb 16, 2017 at 10:02 AM, Augie Fackler <[hidden email]> wrote:

>
>> On Feb 16, 2017, at 12:36, Jun Wu <[hidden email]> wrote:
>>
>> Excerpts from Augie Fackler's message of 2017-02-16 12:18:56 -0500:
>>> On Thu, Feb 16, 2017 at 09:14:52AM -0800, Jun Wu wrote:
>>>> # HG changeset patch
>>>> # User Jun Wu <[hidden email]>
>>>> # Date 1487265078 28800
>>>> #      Thu Feb 16 09:11:18 2017 -0800
>>>> # Node ID ea77104f008e26351dde0b168432b8d903c4f240
>>>> # Parent  677049d4e7cadc6acfc557ef1ee8acf783c76e1d
>>>> # Available At https://bitbucket.org/quark-zju/hg-draft
>>>> #              hg pull https://bitbucket.org/quark-zju/hg-draft  -r ea77104f008e
>>>> test-logtoprocess: fix the regular expression
>>>
>>> You still have two problems!
>>>
>>> (queued, many thanks for the fix)
>>
>> Actually this does not fix the problem as I thought. Please drop this :/

I think the problem is not with the regex, but with the test runner
and the async behavior of logtoprocess. logtoprocess.py says:

"Scripts are run asynchronously as detached daemon processes; mercurial will
not ensure that they exit cleanly."

I suspect that makes the test runner not match it with the regex.

>
> Dropped, make sure to `hg touch` it so you don't lose your copy.
> _______________________________________________
> Mercurial-devel mailing list
> [hidden email]
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
_______________________________________________
Mercurial-devel mailing list
[hidden email]
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] test-logtoprocess: fix the regular expression

Jun Wu
Excerpts from Martin von Zweigbergk's message of 2017-02-16 10:29:39 -0800:

> On Thu, Feb 16, 2017 at 10:02 AM, Augie Fackler <[hidden email]> wrote:
> >
> >> On Feb 16, 2017, at 12:36, Jun Wu <[hidden email]> wrote:
> >>
> >> Excerpts from Augie Fackler's message of 2017-02-16 12:18:56 -0500:
> >>> On Thu, Feb 16, 2017 at 09:14:52AM -0800, Jun Wu wrote:
> >>>> # HG changeset patch
> >>>> # User Jun Wu <[hidden email]>
> >>>> # Date 1487265078 28800
> >>>> #      Thu Feb 16 09:11:18 2017 -0800
> >>>> # Node ID ea77104f008e26351dde0b168432b8d903c4f240
> >>>> # Parent  677049d4e7cadc6acfc557ef1ee8acf783c76e1d
> >>>> # Available At https://bitbucket.org/quark-zju/hg-draft 
> >>>> #              hg pull https://bitbucket.org/quark-zju/hg-draft   -r ea77104f008e
> >>>> test-logtoprocess: fix the regular expression
> >>>
> >>> You still have two problems!
> >>>
> >>> (queued, many thanks for the fix)
> >>
> >> Actually this does not fix the problem as I thought. Please drop this :/
>
> I think the problem is not with the regex, but with the test runner
> and the async behavior of logtoprocess. logtoprocess.py says:
>
> "Scripts are run asynchronously as detached daemon processes; mercurial will
> not ensure that they exit cleanly."
>
> I suspect that makes the test runner not match it with the regex.

Yeah. I'm just about to send the fix. It appends "| head -n 1" to solve the
problem.
_______________________________________________
Mercurial-devel mailing list
[hidden email]
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel