zsh-workers
 help / color / mirror / code / Atom feed
* Latest cvs hangs in completion tests
@ 2001-06-14 20:48 Peter Whaite
  2001-06-15  9:52 ` Peter Stephenson
  2001-06-15 10:05 ` Bart Schaefer
  0 siblings, 2 replies; 6+ messages in thread
From: Peter Whaite @ 2001-06-14 20:48 UTC (permalink / raw)
  To: zsh-workers


I noticed this after the readonly patch (#14915) went in.   Pretty sure it was
ok before that. System is:
  
  % cat /etc/issue

  Red Hat Linux release 6.2 (mixed)
  Kernel 2.4.3 on an i686

  % uname -a
  Linux aragorn 2.4.3 #8 Mon Apr 30 19:05:32 EDT 2001 i686 unknown

Verbose test output:

  % ZTST_verbose=2 make test TESTNUM=Y 
  if test -n "gcc"; then \
    cd .. && \
    make MODDIR=`pwd`/Test/Modules install.modules > /dev/null; \
  fi
  for f in ./Y*.ztst; do \
    ../Src/zsh +Z -f ./ztst.zsh $f; \
  done
  ./Y01completion.ztst: starting.
  ZTST_getsect: read section name: prep
  ZTST_getchunk: read code chunk:
    . $ZTST_srcdir/comptest
  ZTST_execchunk: status 0
  ZTST_getchunk: read code chunk:
    mkdir comp.tmp
    cd comp.tmp
  ZTST_execchunk: status 0
  ZTST_getchunk: read code chunk:
    comptestinit -z $ZTST_testdir/../Src/zsh
  ZTST_execchunk: status 0
  ZTST_getchunk: read code chunk:
    mkdir dir1
    mkdir dir2
    touch file1
    touch file2
  ZTST_execchunk: status 0
  ZTST_getchunk: read code chunk:

  ZTST_getsect: read section name: test
  ZTST_test: looking for new test
  ZTST_test: examining line:

  ZTST_test: examining line:
    comptest $': \t\t\t\t\t\t\t'
  ZTST_getchunk: read code chunk:
    comptest $': \t\t\t\t\t\t\t'
  ZTST_test: examining line:
  >line: {: }{}
  ZTST_getredir: read redir for '>':
  line: {: }{}
  DESCRIPTION:{file}
  DI:{dir1}
  DI:{dir2}
  FI:{file1}
  FI:{file2}
  line: {: dir1/}{}
  line: {: dir2/}{}
  line: {: file1}{}
  line: {: file2}{}
  line: {: dir1/}{}
  line: {: dir2/}{}
  ZTST_test: examining line:

  Running test: directories and files
  ZTST_test: expecting status: 0

Then hangs.  Note directory group is sticky which may be a bit unusual...

  % ls -ld comp.tmp
  drwxrwsr-x    4 peta     maint        1024 Jun 14 16:36 comp.tmp/
  % ls -lR comp.tmp 
  comp.tmp:
  total 2
  drwxrwsr-x    2 peta     maint        1024 Jun 14 16:36 dir1/
  drwxrwsr-x    2 peta     maint        1024 Jun 14 16:36 dir2/
  -rw-rw-r--    1 peta     maint           0 Jun 14 16:36 file1
  -rw-rw-r--    1 peta     maint           0 Jun 14 16:36 file2

  comp.tmp/dir1:
  total 0

  comp.tmp/dir2:
  total 0

Let me know if other info is needed.

--
peta


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

* Re: Latest cvs hangs in completion tests
  2001-06-14 20:48 Latest cvs hangs in completion tests Peter Whaite
@ 2001-06-15  9:52 ` Peter Stephenson
  2001-06-15  9:59   ` Peter Stephenson
  2001-06-15 10:05 ` Bart Schaefer
  1 sibling, 1 reply; 6+ messages in thread
From: Peter Stephenson @ 2001-06-15  9:52 UTC (permalink / raw)
  To: Zsh hackers list

Peter Whaite wrote:
> 
> I noticed this after the readonly patch (#14915) went in.   Pretty sure
> it was ok before that.
> 
> Verbose test output:
> 
>   % ZTST_verbose=2 make test TESTNUM=Y 
>...
>   Running test: directories and files
>   ZTST_test: expecting status: 0
> 
> Then hangs.

Yes, it seems to be that patch.  The farthest I've got is that the test is
executing zpty and is hung waiting for the result.  That process seems to
be blocking on a read from ptyread.  Does this mean anything to anyone?  It
doesn't to me.

The zpty stuff may well be a read herring and something is going on in a
completion function.  But I haven't yet followed the logic of who's doing what
to whom.

+ZTST_execchunk:2> setopt localoptions xtrace
+ZTST_execchunk:3> eval   comptest $': \t\t\t\t\t\t\t'
+ZTST_execchunk:3> comptest : 							
+comptest:1> input=: 							 
+comptest:2> zpty -n -w zsh : 							\x1a
+comptest:3> zpty -r zsh log *<WIDGET><finish>*<PROMPT>*

-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR Ltd., Unit 300, Science Park, Milton Road,
Cambridge, CB4 0XL, UK                          Tel: +44 (0)1223 392070


**********************************************************************
The information transmitted is intended only for the person or
entity to which it is addressed and may contain confidential 
and/or privileged material. 
Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by 
persons or entities other than the intended recipient is 
prohibited.  
If you received this in error, please contact the sender and 
delete the material from any computer.
**********************************************************************


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

* Re: Latest cvs hangs in completion tests
  2001-06-15  9:52 ` Peter Stephenson
@ 2001-06-15  9:59   ` Peter Stephenson
  0 siblings, 0 replies; 6+ messages in thread
From: Peter Stephenson @ 2001-06-15  9:59 UTC (permalink / raw)
  To: Zsh hackers list

Peter Whaite wrote:
>   % ZTST_verbose=2 make test TESTNUM=Y 
>...
>   Running test: directories and files
>   ZTST_test: expecting status: 0
> 
> Then hangs.

Stop press:  the problem comes from making $* readonly.  None of the rest
of the patch makes any difference.  So there is some side effect we haven't
thought of yet.

-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR Ltd., Unit 300, Science Park, Milton Road,
Cambridge, CB4 0XL, UK                          Tel: +44 (0)1223 392070


**********************************************************************
The information transmitted is intended only for the person or
entity to which it is addressed and may contain confidential 
and/or privileged material. 
Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by 
persons or entities other than the intended recipient is 
prohibited.  
If you received this in error, please contact the sender and 
delete the material from any computer.
**********************************************************************


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

* Re: Latest cvs hangs in completion tests
  2001-06-14 20:48 Latest cvs hangs in completion tests Peter Whaite
  2001-06-15  9:52 ` Peter Stephenson
@ 2001-06-15 10:05 ` Bart Schaefer
  2001-06-15 10:25   ` Peter Stephenson
  1 sibling, 1 reply; 6+ messages in thread
From: Bart Schaefer @ 2001-06-15 10:05 UTC (permalink / raw)
  To: Peter Whaite, zsh-workers

On Jun 14,  4:48pm, Peter Whaite wrote:
} 
} I noticed this after the readonly patch (#14915) went in.

The problem is that assignments to the positional parameters has become
broken:

zagzig% 1=foo
zsh: read-only variable: *

So either this is going to have to be special cased, or we can't make `*'
be readonly.

-- 
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] 6+ messages in thread

* Re: Latest cvs hangs in completion tests
  2001-06-15 10:05 ` Bart Schaefer
@ 2001-06-15 10:25   ` Peter Stephenson
  2001-06-15 12:20     ` Andrej Borsenkow
  0 siblings, 1 reply; 6+ messages in thread
From: Peter Stephenson @ 2001-06-15 10:25 UTC (permalink / raw)
  To: Zsh hackers list

"Bart Schaefer" wrote:
> On Jun 14,  4:48pm, Peter Whaite wrote:
> } 
> } I noticed this after the readonly patch (#14915) went in.
> 
> The problem is that assignments to the positional parameters has become
> broken:

That's the basis of it.  I was just getting there.  The following seems to
do the trick.  The tests now run, are then any more potential problems?

Index: Src/params.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/params.c,v
retrieving revision 1.49
diff -u -r1.49 params.c
--- Src/params.c	2001/06/14 09:49:02	1.49
+++ Src/params.c	2001/06/15 10:20:45
@@ -108,13 +108,12 @@
  
 /* Nodes for special parameters for parameter hash table */
 
-static
 #ifdef HAVE_UNION_INIT
 # define BR(X) {X}
-struct param
+typedef struct param initparam;
 #else
 # define BR(X) X
-struct iparam {
+typedef struct iparam {
     struct hashnode *next;
     char *nam;			/* hash data                             */
     int flags;			/* PM_* flags (defined in zsh.h)         */
@@ -127,9 +126,10 @@
     char *ename;		/* name of corresponding environment var */
     Param old;			/* old struct for use with local         */
     int level;			/* if (old != NULL), level of localness  */
-}
+} initparam;
 #endif
-special_params[] ={
+
+static initparam special_params[] ={
 #define SFN(X) BR(((void (*)_((Param, char *)))(X)))
 #define GFN(X) BR(((char *(*)_((Param)))(X)))
 #define IPDEF1(A,B,C,D) {NULL,A,PM_INTEGER|PM_SPECIAL|D,BR(NULL),SFN(C),GFN(B),stdunsetfn,10,NULL,NULL,NULL,0}
@@ -248,6 +248,15 @@
 
 {NULL, NULL}
 };
+
+/*
+ * Special way of referring to the positional parameters.  Unlike $*
+ * and $@, this is not readonly.  This parameter is not directly
+ * visible in user space.
+ */
+initparam argvparam_pm = IPDEF9F("", &pparams, NULL, \
+				 PM_ARRAY|PM_SPECIAL|PM_DONTIMPORT);
+
 #undef BR
 
 #define IS_UNSET_VALUE(V) \
@@ -502,7 +511,7 @@
 	while ((++ip)->nam)
 	    paramtab->addnode(paramtab, ztrdup(ip->nam), ip);
 
-    argvparam = (Param) paramtab->getnode(paramtab, "*");
+    argvparam = (Param) &argvparam_pm;
 
     noerrs = 2;
 
-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR Ltd., Unit 300, Science Park, Milton Road,
Cambridge, CB4 0XL, UK                          Tel: +44 (0)1223 392070


**********************************************************************
The information transmitted is intended only for the person or
entity to which it is addressed and may contain confidential 
and/or privileged material. 
Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by 
persons or entities other than the intended recipient is 
prohibited.  
If you received this in error, please contact the sender and 
delete the material from any computer.
**********************************************************************


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

* RE: Latest cvs hangs in completion tests
  2001-06-15 10:25   ` Peter Stephenson
@ 2001-06-15 12:20     ` Andrej Borsenkow
  0 siblings, 0 replies; 6+ messages in thread
From: Andrej Borsenkow @ 2001-06-15 12:20 UTC (permalink / raw)
  To: Peter Stephenson, Zsh hackers list

>
> That's the basis of it.  I was just getting there.  The following seems to
> do the trick.  The tests now run, are then any more potential problems?
>

Are you going to commit it?

bor@itsrm2% cd /to/b/zTAB
_setup:5: read-only variable: *

-andrej


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

end of thread, other threads:[~2001-06-15 12:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-06-14 20:48 Latest cvs hangs in completion tests Peter Whaite
2001-06-15  9:52 ` Peter Stephenson
2001-06-15  9:59   ` Peter Stephenson
2001-06-15 10:05 ` Bart Schaefer
2001-06-15 10:25   ` Peter Stephenson
2001-06-15 12:20     ` Andrej Borsenkow

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).