zsh-workers
 help / color / mirror / code / Atom feed
* A05execution.ztst fails on Cygwin
@ 2015-01-03 10:54 İsmail Dönmez
  2015-01-03 17:21 ` Ray Andrews
  2015-01-03 19:29 ` Peter Stephenson
  0 siblings, 2 replies; 10+ messages in thread
From: İsmail Dönmez @ 2015-01-03 10:54 UTC (permalink / raw)
  To: Zsh Hackers' List

[-- Attachment #1: Type: text/plain, Size: 719 bytes --]

Using latest git;

./A05execution.ztst: starting.
This test takes 5 seconds to fail...
Pattern match failed:#######
<\[<->\] <-> <->
>[8] 3212 4644
>[6]  - 2456 running    sleep 1000
Test ./A05execution.ztst failed: output differs from expected as shown
above for:
  { setopt MONITOR } 2>/dev/null
  if [[ -o MONITOR ]]
  then
   ( while :; do print "This is a line"; done ) | () : &
   sleep 1
   jobs -l
  else
   print -u $ZTST_fd "Skipping pipe leak test, requires MONITOR option"
   print "[0] 0 0"
  fi
Was testing: Bug regression: piping to anonymous function; piping to
backround function
./A05execution.ztst: test failed.


zsh configured with:

./configure --enable-multibyte --enable-pcre

on x86-64 Cygwin.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: A05execution.ztst fails on Cygwin
  2015-01-03 10:54 A05execution.ztst fails on Cygwin İsmail Dönmez
@ 2015-01-03 17:21 ` Ray Andrews
  2015-01-03 17:45   ` İsmail Dönmez
  2015-01-03 19:29 ` Peter Stephenson
  1 sibling, 1 reply; 10+ messages in thread
From: Ray Andrews @ 2015-01-03 17:21 UTC (permalink / raw)
  To: zsh-workers

On 01/03/2015 02:54 AM, İsmail Dönmez wrote:

> ./A05execution.ztst: starting.
> This test takes 5 seconds to fail...
> Pattern match failed:#######
>

pts/1 HP-y5--5-Debian1 root /aWorking/zshbuild 4$ ./Src/zsh
zsh-5.0.7-168-g454bb77

All tests fine here. Plain vanilla configuration.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: A05execution.ztst fails on Cygwin
  2015-01-03 17:21 ` Ray Andrews
@ 2015-01-03 17:45   ` İsmail Dönmez
  2015-01-03 18:37     ` Ray Andrews
  0 siblings, 1 reply; 10+ messages in thread
From: İsmail Dönmez @ 2015-01-03 17:45 UTC (permalink / raw)
  To: Ray Andrews; +Cc: Zsh Hackers' List

[-- Attachment #1: Type: text/plain, Size: 451 bytes --]

On Sat, Jan 3, 2015 at 7:21 PM, Ray Andrews <rayandrews@eastlink.ca> wrote:

> On 01/03/2015 02:54 AM, İsmail Dönmez wrote:
>
>  ./A05execution.ztst: starting.
>> This test takes 5 seconds to fail...
>> Pattern match failed:#######
>>
>>
> pts/1 HP-y5--5-Debian1 root /aWorking/zshbuild 4$ ./Src/zsh
> zsh-5.0.7-168-g454bb77
>
> All tests fine here. Plain vanilla configuration.
>
>
Well Cygwin is not Linux so thats understandable.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: A05execution.ztst fails on Cygwin
  2015-01-03 17:45   ` İsmail Dönmez
@ 2015-01-03 18:37     ` Ray Andrews
  0 siblings, 0 replies; 10+ messages in thread
From: Ray Andrews @ 2015-01-03 18:37 UTC (permalink / raw)
  To: İsmail Dönmez; +Cc: Zsh Hackers' List

[-- Attachment #1: Type: text/plain, Size: 270 bytes --]

On 01/03/2015 09:45 AM, İsmail Dönmez wrote:
>
>
>
> Well Cygwin is not Linux so thats understandable.
>
Sure, but you never know, it might have been a broader problem.  Maybe 
it's good to also report what is working fine.  Or maybe that's not 
considered necessary.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: A05execution.ztst fails on Cygwin
  2015-01-03 10:54 A05execution.ztst fails on Cygwin İsmail Dönmez
  2015-01-03 17:21 ` Ray Andrews
@ 2015-01-03 19:29 ` Peter Stephenson
  2015-01-03 19:51   ` Peter Stephenson
                     ` (2 more replies)
  1 sibling, 3 replies; 10+ messages in thread
From: Peter Stephenson @ 2015-01-03 19:29 UTC (permalink / raw)
  To: Zsh Hackers' List

On Sat, 3 Jan 2015 12:54:21 +0200
İsmail Dönmez <ismail@donmez.ws> wrote:
> Using latest git;
> 
> ./A05execution.ztst: starting.
> This test takes 5 seconds to fail...
> Pattern match failed:#######
> <\[<->\] <-> <->
> >[8] 3212 4644
> >[6]  - 2456 running    sleep 1000

That's a bit funny.  It appears to be saying the string
"[8] 3212 4644" doesn't match the pattern '\[<->\] <-> <->'.  Are
you able to reproduce this from the command line?

  str='[8] 3212 4644'
  pat='\[<->\] <-> <->'
  [[ $str = ${~pat} ]] || print Pattern failed to match 

Actually, looking at it more closesly, the problem may be that somehow
the ### output that shows the time being taken have got mixed in with
standard output from the test itself.

It looks like you can turn off hask marks when output is verbose.  Does

ZTST_verbose=1 make TESTNUM=A05

work any better?

> While running make check I noticed that V08zpty.ztst was hanging. Turns out
> that second part of the test is hanging. The minimal reproducer is:
> 
> zmodload zsh/zpty
> zpty cat cat
> print a line of text | zpty -w cat
> var=
> zpty -r cat var && print -r -- ${var%%$'\r\n'}
> zpty -d cat # <--- HANGS
> 
> I am not sure if Cygwin is a supported platform but any help would be
> appreciated.

We don't have the resources to differentiate betwen "supported" and
"unsupported," we just have to try to fix problems as they turn up as
best we can wherever they turn up.  Cygwin gets less love and attention
than more standard Unix-like platforms.  In the case of zpty you may be
onto a loser: it's hard enough on most systems and worse here.  I'm
aware of historical problems with <(...) and >(...) substitutions, too.

I would expect the first problem you reported to be tractable, though.

pws


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: A05execution.ztst fails on Cygwin
  2015-01-03 19:29 ` Peter Stephenson
@ 2015-01-03 19:51   ` Peter Stephenson
  2015-01-03 19:56   ` Bart Schaefer
  2015-01-03 19:59   ` İsmail Dönmez
  2 siblings, 0 replies; 10+ messages in thread
From: Peter Stephenson @ 2015-01-03 19:51 UTC (permalink / raw)
  To: Zsh Hackers' List

On Sat, 3 Jan 2015 19:29:25 +0000
Peter Stephenson <p.w.stephenson@ntlworld.com> wrote:
> On Sat, 3 Jan 2015 12:54:21 +0200
> İsmail Dönmez <ismail@donmez.ws> wrote:
> > Using latest git;
> > 
> > ./A05execution.ztst: starting.
> > This test takes 5 seconds to fail...
> > Pattern match failed:#######
> > <\[<->\] <-> <->
> > >[8] 3212 4644
> > >[6]  - 2456 running    sleep 1000
> 
> That's a bit funny.  It appears to be saying the string
> "[8] 3212 4644" doesn't match the pattern '\[<->\] <-> <->'.

Ah --- just woke up and looked in more detail at the test and your
output as I should have done before.

The test runs "jobs -l" at the end; it expects the job will have
exited.  Indeed it (%8) has, but another job (%6) is still running.
That's presumably what's causing the failure (though the error message
is a bit unhelpful, which is probably my fault).

It's likely to be a job started by this test:

  false
  sleep 1000 &
  print $?
  kill $!
0:Status reset by starting a backgrounded command
>0

So what failed is that "kill $!".  In this case, job control is probably
off, though we do monkey with MONITOR in various tests so that may not
be guaranteed.  $! should be set, and kill should work, regardless of
job control.  In principle there's a good deal less to go wrong here
than stuff involving job control and ptys...

> Actually, looking at it more closesly, the problem may be that somehow
> the ### output that shows the time being taken have got mixed in with
> standard output from the test itself.

I suspect that's just a side effect of Cygwin/Windows terminal handling,
actually.

pws


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: A05execution.ztst fails on Cygwin
  2015-01-03 19:29 ` Peter Stephenson
  2015-01-03 19:51   ` Peter Stephenson
@ 2015-01-03 19:56   ` Bart Schaefer
  2015-01-03 19:59   ` İsmail Dönmez
  2 siblings, 0 replies; 10+ messages in thread
From: Bart Schaefer @ 2015-01-03 19:56 UTC (permalink / raw)
  To: Zsh Hackers' List

On Jan 3,  7:29pm, Peter Stephenson wrote:
}
} Actually, looking at it more closesly, the problem may be that somehow
} the ### output that shows the time being taken have got mixed in with
} standard output from the test itself.

It looks like "[6]  - 2456 running    sleep 1000" got mixed into the
output as well.  That's from a completely different test two or three
places earlier in the A05* file:

      false
      sleep 1000 &
      print $?
      kill $!
    0:Status reset by starting a backgrounded command
    >0

... and indicates that "kill $!" did not succeed in ending the sleep, so
there are much larger issues here than this garbled output.

} I would expect the first problem you reported to be tractable, though.

I have my doubts ...


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: A05execution.ztst fails on Cygwin
  2015-01-03 19:29 ` Peter Stephenson
  2015-01-03 19:51   ` Peter Stephenson
  2015-01-03 19:56   ` Bart Schaefer
@ 2015-01-03 19:59   ` İsmail Dönmez
  2015-01-03 23:02     ` Peter Stephenson
  2 siblings, 1 reply; 10+ messages in thread
From: İsmail Dönmez @ 2015-01-03 19:59 UTC (permalink / raw)
  To: Peter Stephenson; +Cc: Zsh Hackers' List

[-- Attachment #1: Type: text/plain, Size: 2110 bytes --]

Hi,

On Sat, Jan 3, 2015 at 9:29 PM, Peter Stephenson <
p.w.stephenson@ntlworld.com> wrote:

> On Sat, 3 Jan 2015 12:54:21 +0200
> İsmail Dönmez <ismail@donmez.ws> wrote:
> > Using latest git;
> >
> > ./A05execution.ztst: starting.
> > This test takes 5 seconds to fail...
> > Pattern match failed:#######
> > <\[<->\] <-> <->
> > >[8] 3212 4644
> > >[6]  - 2456 running    sleep 1000
>
> That's a bit funny.  It appears to be saying the string
> "[8] 3212 4644" doesn't match the pattern '\[<->\] <-> <->'.  Are
> you able to reproduce this from the command line?
>
>   str='[8] 3212 4644'
>   pat='\[<->\] <-> <->'
>   [[ $str = ${~pat} ]] || print Pattern failed to match
>
> Actually, looking at it more closesly, the problem may be that somehow
> the ### output that shows the time being taken have got mixed in with
> standard output from the test itself.
>
> It looks like you can turn off hask marks when output is verbose.  Does
>
> ZTST_verbose=1 make TESTNUM=A05
>
> work any better?
>
>
This fixes the test for me.


> > While running make check I noticed that V08zpty.ztst was hanging. Turns
> out
> > that second part of the test is hanging. The minimal reproducer is:
> >
> > zmodload zsh/zpty
> > zpty cat cat
> > print a line of text | zpty -w cat
> > var=
> > zpty -r cat var && print -r -- ${var%%$'\r\n'}
> > zpty -d cat # <--- HANGS
> >
> > I am not sure if Cygwin is a supported platform but any help would be
> > appreciated.
>
> We don't have the resources to differentiate betwen "supported" and
> "unsupported," we just have to try to fix problems as they turn up as
> best we can wherever they turn up.  Cygwin gets less love and attention
> than more standard Unix-like platforms.  In the case of zpty you may be
> onto a loser: it's hard enough on most systems and worse here.  I'm
> aware of historical problems with <(...) and >(...) substitutions, too.
>

It might makes sense to fail this test on Cygwin then, so I could run make
check semi-regularly and make sure no regressions would be introduced.

Regards.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: A05execution.ztst fails on Cygwin
  2015-01-03 19:59   ` İsmail Dönmez
@ 2015-01-03 23:02     ` Peter Stephenson
  2015-01-09  9:13       ` İsmail Dönmez
  0 siblings, 1 reply; 10+ messages in thread
From: Peter Stephenson @ 2015-01-03 23:02 UTC (permalink / raw)
  To: Zsh Hackers' List

On Sat, 3 Jan 2015 21:59:20 +0200
İsmail Dönmez <ismail@donmez.ws> wrote:
> > It looks like you can turn off hask marks when output is verbose.  Does
> >
> > ZTST_verbose=1 make TESTNUM=A05
> >
> > work any better?
> >
> >
> This fixes the test for me.

Hmm, that doesn't really make sense.

I've installed Cygwin on this new laptop (which has finally deigned to
run Fedora as the default UEFI boot option, don't ask me how I got that
to spring into life...) and confirmed your problems, and also that

zsh -c 'sleep 1000 & print $!; kill $!'

prints the correct PID but doesn't kill the process.  Killing it
from the command line of the same version of the shell, or even
with a subsequent zsh -c, does work, so something very strange
is happening.  Next step is probably to try delays, though
I did try repetition and that didn't help.  However, I've used up
my Windows quota for the week as sanity wears desperately thin on
such occasions.

   -------------------------------------------------------------------
   |                                                                 |
   |   ! Windows is cross with you.  You have attempted to           |
   |     make the system do what you want, which is not allowed      |
   |                                                                 |
   |    -------------------------   -----------------------------    |
   |    | I understand and will |   | Randomly crash the system |    |
   |    | try harder in future  |   | and change settings       |    |
   |    -------------------------   -----------------------------    |
   |                                                                 |
   -------------------------------------------------------------------

This was with the standard install options for 64-bit Cygwin.

> > > While running make check I noticed that V08zpty.ztst was hanging. Turns
> > out
> > > that second part of the test is hanging. The minimal reproducer is:
>
> It might makes sense to fail this test on Cygwin then, so I could run make
> check semi-regularly and make sure no regressions would be introduced.

I've confirmed this, too, and also that as a consequence the completion
tests don't work, either.  We could certainly skip the tests if no one
is going to appear, which I suspect is highly likely.

pws


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: A05execution.ztst fails on Cygwin
  2015-01-03 23:02     ` Peter Stephenson
@ 2015-01-09  9:13       ` İsmail Dönmez
  0 siblings, 0 replies; 10+ messages in thread
From: İsmail Dönmez @ 2015-01-09  9:13 UTC (permalink / raw)
  To: Peter Stephenson; +Cc: Zsh Hackers' List

[-- Attachment #1: Type: text/plain, Size: 1060 bytes --]

Hi again,

On Sun, Jan 4, 2015 at 1:02 AM, Peter Stephenson <
p.w.stephenson@ntlworld.com> wrote:

> On Sat, 3 Jan 2015 21:59:20 +0200
> İsmail Dönmez <ismail@donmez.ws> wrote:
> > > It looks like you can turn off hask marks when output is verbose.  Does
> > >
> > > ZTST_verbose=1 make TESTNUM=A05
> > >
> > > work any better?
> > >
> > >
> > This fixes the test for me.
>
> Hmm, that doesn't really make sense.
>
> I've installed Cygwin on this new laptop (which has finally deigned to
> run Fedora as the default UEFI boot option, don't ask me how I got that
> to spring into life...) and confirmed your problems, and also that
>
> zsh -c 'sleep 1000 & print $!; kill $!'
>

While wondering about this I noticed that this is a timing issue:

 zsh -c 'sleep 1000 & print $!; sleep 0.1s; kill $!'

works fine. And for the rest of the test hangs I just disabled zpty for now
and only real bug I have is with the A05 one now. Better than a hanging
testsuite :-)

Thanks a lot! (I mean it, I know how painful Windows can be.)

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2015-01-09  9:14 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-03 10:54 A05execution.ztst fails on Cygwin İsmail Dönmez
2015-01-03 17:21 ` Ray Andrews
2015-01-03 17:45   ` İsmail Dönmez
2015-01-03 18:37     ` Ray Andrews
2015-01-03 19:29 ` Peter Stephenson
2015-01-03 19:51   ` Peter Stephenson
2015-01-03 19:56   ` Bart Schaefer
2015-01-03 19:59   ` İsmail Dönmez
2015-01-03 23:02     ` Peter Stephenson
2015-01-09  9:13       ` İsmail Dönmez

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).