Patchwork test-phase-exchange: stabilize for Windows

login
register
mail settings
Submitter Matt Harbison
Date July 16, 2017, 3:49 a.m.
Message ID <21904723f1ce9ea0fc65.1500176994@Envy>
Download mbox | patch
Permalink /patch/22419/
State Accepted
Headers show

Comments

Matt Harbison - July 16, 2017, 3:49 a.m.
# HG changeset patch
# User Matt Harbison <matt_harbison@yahoo.com>
# Date 1500176793 14400
#      Sat Jul 15 23:46:33 2017 -0400
# Node ID 21904723f1ce9ea0fc6541ee48611ba3ef7128fb
# Parent  389536aff376d32d38f13305021c127245d4126a
test-phase-exchange: stabilize for Windows
Yuya Nishihara - July 16, 2017, 2:33 p.m.
On Sat, 15 Jul 2017 23:49:54 -0400, Matt Harbison wrote:
> # HG changeset patch
> # User Matt Harbison <matt_harbison@yahoo.com>
> # Date 1500176793 14400
> #      Sat Jul 15 23:46:33 2017 -0400
> # Node ID 21904723f1ce9ea0fc6541ee48611ba3ef7128fb
> # Parent  389536aff376d32d38f13305021c127245d4126a
> test-phase-exchange: stabilize for Windows

Queued, thanks.
Katsunori FUJIWARA - July 17, 2017, 3:05 p.m.
At Sat, 15 Jul 2017 23:49:54 -0400,
Matt Harbison wrote:
> 
> # HG changeset patch
> # User Matt Harbison <matt_harbison@yahoo.com>
> # Date 1500176793 14400
> #      Sat Jul 15 23:46:33 2017 -0400
> # Node ID 21904723f1ce9ea0fc6541ee48611ba3ef7128fb
> # Parent  389536aff376d32d38f13305021c127245d4126a
> test-phase-exchange: stabilize for Windows
> 
> diff --git a/tests/test-phases-exchange.t b/tests/test-phases-exchange.t
> --- a/tests/test-phases-exchange.t
> +++ b/tests/test-phases-exchange.t
> @@ -1298,11 +1298,17 @@
>  
>  #endif
>  
> -Test that clone behaves like pull and doesn't
> -publish changesets as plain push does
> +Test that clone behaves like pull and doesn't publish changesets as plain push
> +does.  The conditional output accounts for changes in the conditional block
> +above.
>  
>    $ hg -R Upsilon phase -q --force --draft 2
>    test-debug-phase: move rev 2: 0 -> 1
> +  test-debug-phase: move rev 3: 0 -> 1 (unix-permissions no-root !)
> +  test-debug-phase: move rev 7: 0 -> 1 (unix-permissions no-root !)
> +  test-debug-phase: move rev 8: 0 -> 1 (unix-permissions no-root !)
> +  test-debug-phase: move rev 9: 0 -> 1 (unix-permissions no-root !)
> +

According to commit log of 4eec2f04a672, "(unix-permissions no-root !)"
marking means:

  - this line is required, if "unix-permissions no-root" is satisfied
  - this line is optional, otherwise

AFAIK, additional lines above appear:

  - not on POSIX, on which "unix-permissions no-root" is satisfied
  - but on windows, on which it isn't

Therefore, I expect this change to cause:

  - failure on POSIX, because all required lines disappear
  - success on Windows, because all optional lines appear

But in practice, this change doesn't cause failure on POSIX.

For more simple example, I expect that test script below fails,
because "true" command generate no output, even though "foobar" output
is always expected ("true" feature is always available). But it
doesn't fail in practice.

  ====================
    $ true
    foobar (true !)
  ====================

What do I misunderstand about "(feature !)" ?


BTW, it seems bug of run-tests.py that "(unknown-feature !)" doesn't
cause failure.


>    $ hg clone -q Upsilon Pi -r 7
>    test-debug-phase: new rev 0:  x -> 0
>    test-debug-phase: new rev 1:  x -> 0
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Matt Harbison - July 18, 2017, 3:18 a.m.
On Mon, 17 Jul 2017 11:05:27 -0400, FUJIWARA Katsunori  
<foozy@lares.dti.ne.jp> wrote:

> At Sat, 15 Jul 2017 23:49:54 -0400,
> Matt Harbison wrote:
>>
>> # HG changeset patch
>> # User Matt Harbison <matt_harbison@yahoo.com>
>> # Date 1500176793 14400
>> #      Sat Jul 15 23:46:33 2017 -0400
>> # Node ID 21904723f1ce9ea0fc6541ee48611ba3ef7128fb
>> # Parent  389536aff376d32d38f13305021c127245d4126a
>> test-phase-exchange: stabilize for Windows
>>
>> diff --git a/tests/test-phases-exchange.t b/tests/test-phases-exchange.t
>> --- a/tests/test-phases-exchange.t
>> +++ b/tests/test-phases-exchange.t
>> @@ -1298,11 +1298,17 @@
>>
>>  #endif
>>
>> -Test that clone behaves like pull and doesn't
>> -publish changesets as plain push does
>> +Test that clone behaves like pull and doesn't publish changesets as  
>> plain push
>> +does.  The conditional output accounts for changes in the conditional  
>> block
>> +above.
>>
>>    $ hg -R Upsilon phase -q --force --draft 2
>>    test-debug-phase: move rev 2: 0 -> 1
>> +  test-debug-phase: move rev 3: 0 -> 1 (unix-permissions no-root !)
>> +  test-debug-phase: move rev 7: 0 -> 1 (unix-permissions no-root !)
>> +  test-debug-phase: move rev 8: 0 -> 1 (unix-permissions no-root !)
>> +  test-debug-phase: move rev 9: 0 -> 1 (unix-permissions no-root !)
>> +
>
> According to commit log of 4eec2f04a672, "(unix-permissions no-root !)"
> marking means:
>
>   - this line is required, if "unix-permissions no-root" is satisfied
>   - this line is optional, otherwise
>
> AFAIK, additional lines above appear:
>
>   - not on POSIX, on which "unix-permissions no-root" is satisfied
>   - but on windows, on which it isn't
>
> Therefore, I expect this change to cause:
>
>   - failure on POSIX, because all required lines disappear
>   - success on Windows, because all optional lines appear
>
> But in practice, this change doesn't cause failure on POSIX.
>
> For more simple example, I expect that test script below fails,
> because "true" command generate no output, even though "foobar" output
> is always expected ("true" feature is always available). But it
> doesn't fail in practice.
>
>   ====================
>     $ true
>     foobar (true !)
>   ====================
>
> What do I misunderstand about "(feature !)" ?

Nice catch.  I think I see what's going on here, and another bug around  
(?).  I should have a fix tonight or tomorrow.

>
> BTW, it seems bug of run-tests.py that "(unknown-feature !)" doesn't
> cause failure.

Agreed.  I thought I remembered there being a test for a missing feature,  
and it complaining in that case, so I thought this was covered.  How  
should it fail?  Dropping the line seems too subtle.

>
>>    $ hg clone -q Upsilon Pi -r 7
>>    test-debug-phase: new rev 0:  x -> 0
>>    test-debug-phase: new rev 1:  x -> 0
>> _______________________________________________
>> Mercurial-devel mailing list
>> Mercurial-devel@mercurial-scm.org
>> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Katsunori FUJIWARA - July 19, 2017, 3:22 p.m.
At Mon, 17 Jul 2017 23:18:53 -0400,
Matt Harbison wrote:
> 
> On Mon, 17 Jul 2017 11:05:27 -0400, FUJIWARA Katsunori  
> <foozy@lares.dti.ne.jp> wrote:
> 
> > At Sat, 15 Jul 2017 23:49:54 -0400,
> > Matt Harbison wrote:
> >>
> >> # HG changeset patch
> >> # User Matt Harbison <matt_harbison@yahoo.com>
> >> # Date 1500176793 14400
> >> #      Sat Jul 15 23:46:33 2017 -0400
> >> # Node ID 21904723f1ce9ea0fc6541ee48611ba3ef7128fb
> >> # Parent  389536aff376d32d38f13305021c127245d4126a
> >> test-phase-exchange: stabilize for Windows
> >>
> >> diff --git a/tests/test-phases-exchange.t b/tests/test-phases-exchange.t
> >> --- a/tests/test-phases-exchange.t
> >> +++ b/tests/test-phases-exchange.t
> >> @@ -1298,11 +1298,17 @@
> >>
> >>  #endif
> >>
> >> -Test that clone behaves like pull and doesn't
> >> -publish changesets as plain push does
> >> +Test that clone behaves like pull and doesn't publish changesets as  
> >> plain push
> >> +does.  The conditional output accounts for changes in the conditional  
> >> block
> >> +above.
> >>
> >>    $ hg -R Upsilon phase -q --force --draft 2
> >>    test-debug-phase: move rev 2: 0 -> 1
> >> +  test-debug-phase: move rev 3: 0 -> 1 (unix-permissions no-root !)
> >> +  test-debug-phase: move rev 7: 0 -> 1 (unix-permissions no-root !)
> >> +  test-debug-phase: move rev 8: 0 -> 1 (unix-permissions no-root !)
> >> +  test-debug-phase: move rev 9: 0 -> 1 (unix-permissions no-root !)
> >> +
> >
> > According to commit log of 4eec2f04a672, "(unix-permissions no-root !)"
> > marking means:
> >
> >   - this line is required, if "unix-permissions no-root" is satisfied
> >   - this line is optional, otherwise
> >
> > AFAIK, additional lines above appear:
> >
> >   - not on POSIX, on which "unix-permissions no-root" is satisfied
> >   - but on windows, on which it isn't
> >
> > Therefore, I expect this change to cause:
> >
> >   - failure on POSIX, because all required lines disappear
> >   - success on Windows, because all optional lines appear
> >
> > But in practice, this change doesn't cause failure on POSIX.
> >
> > For more simple example, I expect that test script below fails,
> > because "true" command generate no output, even though "foobar" output
> > is always expected ("true" feature is always available). But it
> > doesn't fail in practice.
> >
> >   ====================
> >     $ true
> >     foobar (true !)
> >   ====================
> >
> > What do I misunderstand about "(feature !)" ?
> 
> Nice catch.  I think I see what's going on here, and another bug around  
> (?).  I should have a fix tonight or tomorrow.
> 
> >
> > BTW, it seems bug of run-tests.py that "(unknown-feature !)" doesn't
> > cause failure.
> 
> Agreed.  I thought I remembered there being a test for a missing feature,  
> and it complaining in that case, so I thought this was covered.  How  
> should it fail?  Dropping the line seems too subtle.

I think that simple failure of run-tests.py itself as same as "#if
unknown" is enough, because it is obviously test script error.

If all "(feature !)" in test script are evaluated by TTest._hghave(),
it causes such kind of failure automatically. And your patch series
(V2) seems to do so, AFAIK.

> >
> >>    $ hg clone -q Upsilon Pi -r 7
> >>    test-debug-phase: new rev 0:  x -> 0
> >>    test-debug-phase: new rev 1:  x -> 0
> >> _______________________________________________
> >> Mercurial-devel mailing list
> >> Mercurial-devel@mercurial-scm.org
> >> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
>

Patch

diff --git a/tests/test-phases-exchange.t b/tests/test-phases-exchange.t
--- a/tests/test-phases-exchange.t
+++ b/tests/test-phases-exchange.t
@@ -1298,11 +1298,17 @@ 
 
 #endif
 
-Test that clone behaves like pull and doesn't
-publish changesets as plain push does
+Test that clone behaves like pull and doesn't publish changesets as plain push
+does.  The conditional output accounts for changes in the conditional block
+above.
 
   $ hg -R Upsilon phase -q --force --draft 2
   test-debug-phase: move rev 2: 0 -> 1
+  test-debug-phase: move rev 3: 0 -> 1 (unix-permissions no-root !)
+  test-debug-phase: move rev 7: 0 -> 1 (unix-permissions no-root !)
+  test-debug-phase: move rev 8: 0 -> 1 (unix-permissions no-root !)
+  test-debug-phase: move rev 9: 0 -> 1 (unix-permissions no-root !)
+
   $ hg clone -q Upsilon Pi -r 7
   test-debug-phase: new rev 0:  x -> 0
   test-debug-phase: new rev 1:  x -> 0