* Weird test failures under Cygwin
@ 2001-05-10 15:57 Andrej Borsenkow
2001-05-10 17:20 ` Bart Schaefer
2001-05-10 17:53 ` Bart Schaefer
0 siblings, 2 replies; 5+ messages in thread
From: Andrej Borsenkow @ 2001-05-10 15:57 UTC (permalink / raw)
To: ZSH Workers Mailing List
May be, somebody has an idea.
If I run tests individually (make TESTNUM=Y02compmatch check) it work fine. If
I run them all at once (or just make TESTNUM=Y check), both compatch and
arguments fail:
mw1g017@MW1G17C% make TESTNUM=Y02compmatch check
cd Test ; make check
make[1]: Entering directory `/tools/build/zsh/Test'
if test -n "dllwrap"; then \
cd .. && \
make MODDIR=`pwd`/Test/Modules install.modules > /dev/null; \
fi
mkdir /tools/build/zsh/Test/Modules
mkdir /tools/build/zsh/Test/Modules/zsh
for f in /tools/src/zsh/Test/Y02compmatch*.ztst; do \
../Src/zsh +Z -f /tools/src/zsh/Test/ztst.zsh $f; \
done
/tools/src/zsh/Test/Y02compmatch.ztst: starting.
##############################################################################
##
##############################################################################
##
/tools/src/zsh/Test/Y02compmatch.ztst: all tests successful.
rm -rf Modules .zcompdump
make[1]: Leaving directory `/tools/build/zsh/Test'
mw1g017@MW1G17C% make TESTNUM=Y check
cd Test ; make check
make[1]: Entering directory `/tools/build/zsh/Test'
if test -n "dllwrap"; then \
cd .. && \
make MODDIR=`pwd`/Test/Modules install.modules > /dev/null; \
fi
mkdir /tools/build/zsh/Test/Modules
mkdir /tools/build/zsh/Test/Modules/zsh
for f in /tools/src/zsh/Test/Y*.ztst; do \
../Src/zsh +Z -f /tools/src/zsh/Test/ztst.zsh $f; \
done
/tools/src/zsh/Test/Y01completion.ztst: starting.
/tools/src/zsh/Test/Y01completion.ztst: all tests successful.###
/tools/src/zsh/Test/Y02compmatch.ztst: starting.
*** /tmp/zsh.ztst.out.2132 Thu May 10 19:51:12 2001
--- /tmp/zsh.ztst.tout.2132 Thu May 10 19:51:12 2001
***************
*** 1,3 ****
line: {tst }{}
- COMPADD:{_tst:compadd: unknown match specification character `z'}
- INSERT_POSITIONS:{}
--- 1 ----
Test /tools/src/zsh/Test/Y02compmatch.ztst failed: output differs from
expected
as shown above for:
test_code z: list1
comptest $'tst \t'
Was testing: Match Error for "z:"
/tools/src/zsh/Test/Y02compmatch.ztst: test failed.
rm: cannot remove directory `/tools/build/zsh/Test/match.tmp': Permission
denied
/tools/src/zsh/Test/Y03arguments.ztst: starting.
*** /tmp/zsh.ztst.out.3200 Thu May 10 19:51:29 2001
--- /tmp/zsh.ztst.tout.3200 Thu May 10 19:51:29 2001
***************
*** 1,11 ****
! line: {tst arg1 }{}
! line: {tst arg1 }{}
! line: {tst arg1 }{}
! line: {tst arg1 }{}
! line: {tst arg1 }{}
! line: {tst r}{}
! line: {tst x}{}
! line: {tst x }{}
! MESSAGE:{no more arguments}
! line: {tst x y }{}
! MESSAGE:{no more arguments}
--- 1,9 ----
! line: {tst }{}
! line: {a}{}
! line: {ar}{}
! line: {arg}{}
! line: {arg1}{}
! line: {r}{}
! line: {x}{}
! line: {x }{}
! line: {x y }{}
Test /tools/src/zsh/Test/Y03arguments.ztst failed: output differs from
expected
as shown above for:
tst_arguments ':desc1:(arg1)'
comptest $'tst \t\C-wa\t\C-war\t\C-warg\t\C-warg1\t\C-wr\t\C-wx\t \ty \t'
Was testing: one non-option argument
/tools/src/zsh/Test/Y03arguments.ztst: test failed.
rm: cannot remove directory `/tools/build/zsh/Test/comp.tmp': Permission
denied
make[1]: [check] Error 1 (ignored)
rm -rf Modules .zcompdump
make[1]: Leaving directory `/tools/build/zsh/Test'
-andrej
Have a nice DOS!
B >>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Weird test failures under Cygwin
2001-05-10 15:57 Weird test failures under Cygwin Andrej Borsenkow
@ 2001-05-10 17:20 ` Bart Schaefer
2001-05-10 17:38 ` Andrej Borsenkow
2001-05-10 17:53 ` Bart Schaefer
1 sibling, 1 reply; 5+ messages in thread
From: Bart Schaefer @ 2001-05-10 17:20 UTC (permalink / raw)
To: Andrej Borsenkow, ZSH Workers Mailing List
On May 10, 7:57pm, Andrej Borsenkow wrote:
} Subject: Weird test failures under Cygwin
}
} If I run tests individually (make TESTNUM=Y02compmatch check) it work
} fine. If I run them all at once (or just make TESTNUM=Y check), both
} compatch and arguments fail:
You don't have an /etc/zshenv or equivalent, do you? If you do, what's
in it?
} /tools/src/zsh/Test/Y02compmatch.ztst: starting.
} ##############################################################################
} ##
Wow, it takes a long time to run these tests on your machine. I never
get more than about 30 hash marks.
} rm: cannot remove directory `/tools/build/zsh/Test/match.tmp': Permission
} denied
That's very strange, but it could have something to do with the failure.
Same thing here:
} rm: cannot remove directory `/tools/build/zsh/Test/comp.tmp': Permission
} denied
Did you interrupt a test earlier while running as another user?
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: Weird test failures under Cygwin
2001-05-10 17:20 ` Bart Schaefer
@ 2001-05-10 17:38 ` Andrej Borsenkow
2001-05-11 8:15 ` Bart Schaefer
0 siblings, 1 reply; 5+ messages in thread
From: Andrej Borsenkow @ 2001-05-10 17:38 UTC (permalink / raw)
To: ZSH Workers Mailing List
> On May 10, 7:57pm, Andrej Borsenkow wrote:
> } Subject: Weird test failures under Cygwin
> }
> } If I run tests individually (make TESTNUM=Y02compmatch check) it work
> } fine. If I run them all at once (or just make TESTNUM=Y check), both
> } compatch and arguments fail:
>
> You don't have an /etc/zshenv or equivalent, do you? If you do, what's
> in it?
>
mw1g017@MW1G17C% cat /etc/zshenv
#!/usr/bin/zsh
typeset -U PATH path
path=(/usr/bin /usr/local/bin $path)
> } /tools/src/zsh/Test/Y02compmatch.ztst: starting.
> }
> ####################################################################
> ##########
> } ##
>
> Wow, it takes a long time to run these tests on your machine. I never
> get more than about 30 hash marks.
>
That is PII 266MHz with 192MB and Win2k; X-Vision 7.3 + some other apps always
running. On my Unix system (that is MIPS R4400 200MHz with 256MB) I get even
more hashes ... and on home system (PIII 733, 128MB, Mandrake 8+) none at all.
> } rm: cannot remove directory `/tools/build/zsh/Test/match.tmp': Permission
> } denied
>
> That's very strange, but it could have something to do with the failure.
> Same thing here:
>
> } rm: cannot remove directory `/tools/build/zsh/Test/comp.tmp': Permission
> } denied
>
Something has changed in the way zpty runs commands (I fixed the above once
already). Look here:
mw1g017@MW1G17C% zpty zsh /usr/bin/zsh
mw1g017@MW1G17C% ps
PID PPID PGID WINPID TTY UID STIME COMMAND
1900 1 1900 1900 0 1006 21:17:16 /usr/bin/zsh
2216 1900 2216 1760 0 1006 21:17:21 /usr/bin/zsh
3140 2216 3140 3140 1 1006 21:30:23 /usr/bin/zsh
2412 3140 2412 2696 1 1006 21:30:24 /usr/bin/zsh
3308 2216 3308 1932 0 1006 21:30:26 /usr/bin/ps
The tty0 is my current and tty1 is pts; when I unload zpty (test does it) it
basically sends HUP to tty group - but we have *two* tty groups here. So the
second zsh is stuck around with Test/comp.tmp as current dir that prevents it
from being removed:
mw1g017@MW1G17C% zmodload -u zsh/zpty
mw1g017@MW1G17C% ps
PID PPID PGID WINPID TTY UID STIME COMMAND
1900 1 1900 1900 0 1006 21:17:16 /usr/bin/zsh
2216 1900 2216 1760 0 1006 21:17:21 /usr/bin/zsh
I 2412 1 2412 2696 1 1006 21:30:24 /usr/bin/zsh
2288 2216 2288 1924 0 1006 21:37:17 /usr/bin/ps
-andrej
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Weird test failures under Cygwin
2001-05-10 15:57 Weird test failures under Cygwin Andrej Borsenkow
2001-05-10 17:20 ` Bart Schaefer
@ 2001-05-10 17:53 ` Bart Schaefer
1 sibling, 0 replies; 5+ messages in thread
From: Bart Schaefer @ 2001-05-10 17:53 UTC (permalink / raw)
To: Andrej Borsenkow, ZSH Workers Mailing List
On May 10, 7:57pm, Andrej Borsenkow wrote:
}
} May be, somebody has an idea.
When run all together, the tests re-use the same zpty name, though not
the same pty instance. I wonder if there's a lurking bug with pty re-use,
either in zpty or in cygwin.
It would appear that some of the output read from zpty is simply getting
lost. I was just able to get an error very similar to this one:
} *** /tmp/zsh.ztst.out.2132 Thu May 10 19:51:12 2001
} --- /tmp/zsh.ztst.tout.2132 Thu May 10 19:51:12 2001
} ***************
} *** 1,3 ****
} line: {tst }{}
} - COMPADD:{_tst:compadd: unknown match specification character `z'}
} - INSERT_POSITIONS:{}
} --- 1 ----
I did it by inserting into the "comptesteval" call in "comptestinit" the
argument "exec 2>>| $ZTST_testdir/comptest.log" (trying to examine exactly
how zsh re-uses the pty). The error I got was:
*** /tmp/zsh.ztst.out.23791 Thu May 10 10:46:42 2001
--- /tmp/zsh.ztst.tout.23791 Thu May 10 10:46:43 2001
***************
*** 1,3 ****
line: {tst }{}
! COMPADD:{_tst:compadd: unknown match specification character `z'}
INSERT_POSITIONS:{}
--- 1,3 ----
line: {tst }{}
! COMPADD:{}
INSERT_POSITIONS:{}
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Weird test failures under Cygwin
2001-05-10 17:38 ` Andrej Borsenkow
@ 2001-05-11 8:15 ` Bart Schaefer
0 siblings, 0 replies; 5+ messages in thread
From: Bart Schaefer @ 2001-05-11 8:15 UTC (permalink / raw)
To: Andrej Borsenkow, ZSH Workers Mailing List
On May 10, 9:38pm, Andrej Borsenkow wrote:
}
} Something has changed in the way zpty runs commands
The thing that changed about the way zpty runs commands is, zsh forks
and then the subshell then runs the command on the pty. This allows you
to run shell functions, loops, pipelines, etc. on the pty rather than
running only a single simple external command.
} Look here:
}
} PID PPID PGID WINPID TTY UID STIME COMMAND
} 3140 2216 3140 3140 1 1006 21:30:23 /usr/bin/zsh
} 2412 3140 2412 2696 1 1006 21:30:24 /usr/bin/zsh
}
} The tty0 is my current and tty1 is pts; when I unload zpty (test does
} it) it basically sends HUP to tty group - but we have *two* tty groups
} here.
Here's what I get on linux ("ps j" output):
PPID PID PGID SID TTY TPGID STAT UID TIME COMMAND
3646 3657 3657 3612 pc 4149 S 11 0:00 zsh-4.0.1-pre-4
3657 3684 3684 3684 a0 3685 S 11 0:00 zsh-4.0.1-pre-4
3684 3685 3685 3684 a0 3685 S 11 0:00 zsh-4.0.1-pre-4
3684 is the forked subshell, and 3685 is the external command. You can
see this better if I use "zpty bash bash":
PPID PID PGID SID TTY TPGID STAT UID TIME COMMAND
3646 3657 3657 3612 pc 4149 S 11 0:00 zsh-4.0.1-pre-4
3657 4147 4147 4147 a0 4148 S 11 0:00 zsh-4.0.1-pre-4
4147 4148 4148 4147 a0 4148 S 11 0:00 bash
Note that there are two process groups, but only one controlling tty
process group ... but whichever one I send a HUP to, they both exit.
In your case, the subshell is hanging around even though the command
it was running has exited. That's not supposed to happen; even if the
subshell didn't get the SIGHUP, it should get the SIGCHLD and realize
it has no more reason to live.
} So the second zsh is stuck around with Test/comp.tmp as current dir
You can eliminate the subshell in comptest with the patch below, but it
would be good to find out what that subshell is waiting around for in
the general case.
Index: Test/comptest
===================================================================
--- Test/comptest 2001/05/09 04:42:14 1.2
+++ Test/comptest 2001/05/11 08:08:00
@@ -18,7 +18,7 @@
(( OPTIND > 1 )) && shift $(( OPTIND - 1 ))
export PS1="<PROMPT>"
- zpty zsh "$comptest_zsh -f +Z"
+ zpty zsh "exec $comptest_zsh -f +Z"
zpty -r zsh log1 "*<PROMPT>*" || {
print "first prompt hasn't appeared."
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2001-05-11 8:17 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-05-10 15:57 Weird test failures under Cygwin Andrej Borsenkow
2001-05-10 17:20 ` Bart Schaefer
2001-05-10 17:38 ` Andrej Borsenkow
2001-05-11 8:15 ` Bart Schaefer
2001-05-10 17:53 ` Bart Schaefer
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).