* Almost all tests pass under new cygwin @ 2001-05-22 15:14 Andrej Borsenkow 2001-05-22 15:24 ` Andrej Borsenkow ` (2 more replies) 0 siblings, 3 replies; 19+ messages in thread From: Andrej Borsenkow @ 2001-05-22 15:14 UTC (permalink / raw) To: ZSH Workers Mailing List I've updated Cygwin to the latest version and now almost all tests passed including completion (I mean, in make check run) except two unimplemented. The only problem is V01zmodload test that segfaults. Peter, was it O.K. for you? It is with the current CVS. -andrej ^ permalink raw reply [flat|nested] 19+ messages in thread
* RE: Almost all tests pass under new cygwin 2001-05-22 15:14 Almost all tests pass under new cygwin Andrej Borsenkow @ 2001-05-22 15:24 ` Andrej Borsenkow 2001-05-22 15:31 ` Bart Schaefer 2001-05-23 11:40 ` Peter Stephenson 2 siblings, 0 replies; 19+ messages in thread From: Andrej Borsenkow @ 2001-05-22 15:24 UTC (permalink / raw) To: ZSH Workers Mailing List > > The only problem is V01zmodload test that segfaults. Peter, was > it O.K. for > you? > It does not segfault if ZTST_verbose is explicitly set to 1 or 2 (that I've tried). It outpits several hashes before crashing. It segfaults if ZTST_verbose is set to 0 or unset. So, looks like some sort of redirection problem? -andrej ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: Almost all tests pass under new cygwin 2001-05-22 15:14 Almost all tests pass under new cygwin Andrej Borsenkow 2001-05-22 15:24 ` Andrej Borsenkow @ 2001-05-22 15:31 ` Bart Schaefer 2001-05-22 15:44 ` Oliver Kiddle 2001-05-22 15:53 ` Almost all tests pass under new cygwin Andrej Borsenkow 2001-05-23 11:40 ` Peter Stephenson 2 siblings, 2 replies; 19+ messages in thread From: Bart Schaefer @ 2001-05-22 15:31 UTC (permalink / raw) To: Andrej Borsenkow, ZSH Workers Mailing List On May 22, 7:14pm, Andrej Borsenkow wrote: } Subject: Almost all tests pass under new cygwin } } The only problem is V01zmodload test that segfaults. Same answer I just gave Jason Price: make check with ZTST_verbose=2 so we can tell which zmodload command dies. -- 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] 19+ messages in thread
* Re: Almost all tests pass under new cygwin 2001-05-22 15:31 ` Bart Schaefer @ 2001-05-22 15:44 ` Oliver Kiddle 2001-05-23 16:51 ` About zmodload test segfaults Bart Schaefer 2001-05-22 15:53 ` Almost all tests pass under new cygwin Andrej Borsenkow 1 sibling, 1 reply; 19+ messages in thread From: Oliver Kiddle @ 2001-05-22 15:44 UTC (permalink / raw) To: ZSH Workers Mailing List Bart Schaefer wrote: > > Same answer I just gave Jason Price: make check with ZTST_verbose=2 > so we can tell which zmodload command dies. It is the very last zmodload in the loop which does zmodload -i for every module it found in config.modules (the `for m in $mods' loop). I've gone through typing the zmodload commands manually and it is always the last one which causes the segfault regardless of the order in which they are loaded. Oliver ^ permalink raw reply [flat|nested] 19+ messages in thread
* About zmodload test segfaults 2001-05-22 15:44 ` Oliver Kiddle @ 2001-05-23 16:51 ` Bart Schaefer 2001-05-24 12:15 ` Andrej Borsenkow 2001-05-28 9:21 ` About zmodload test segfaults Sven Wischnowsky 0 siblings, 2 replies; 19+ messages in thread From: Bart Schaefer @ 2001-05-23 16:51 UTC (permalink / raw) To: ZSH Workers Mailing List On May 22, 4:44pm, Oliver Kiddle wrote: } Subject: Re: Almost all tests pass under new cygwin } } It is the very last zmodload in the loop which does zmodload -i for } every module it found in config.modules (the `for m in $mods' loop). } I've gone through typing the zmodload commands manually and it is always } the last one which causes the segfault regardless of the order in which } they are loaded. I still can't figure out how *loading* the modules can cause a seg fault regardless of ordering, unless it's just the case that there are too many modules to all be loaded at once. My guess is that the failures on Solaris et al., which seem to happen at the module *un*loading test, have to do with shared library linkage. It was wrong to simply discard all the dependencies and then unload. Here's a patch to V01zmodload to force unloading to happen in reverse dependency order, i.e., a module is only unloaded when nothing depends on it, and then its dependencies are removed so it won't prevent some other module from being unloaded. If it's not possible to unload any module that way, the zmodunload function calls zmodload -u to generate the correct error message; this should happen only in case of circular dependencies. Please check whether this takes care of the zmodload test segfaults on various architectures. I wish zmodunload were suitable for use outside the test suite, but it could be badly confused by use of module aliasing. diff -u zsh-forge/current/Test/V01zmodload.ztst zsh-4.0/Test/V01zmodload.ztst --- zsh-forge/current/Test/V01zmodload.ztst Fri May 18 09:09:10 2001 +++ zsh-4.0/Test/V01zmodload.ztst Wed May 23 09:37:46 2001 @@ -5,6 +5,7 @@ # the config.modules file. This differs for static vs. dynamic builds. mods=() + deps="$(zmodload -Ld)" while read name modfile link auto load funcs do [[ $name == \#* ]] && continue @@ -13,6 +14,27 @@ mods=($mods $name) done < $ZTST_testdir/../config.modules + zmodunload() { + local m n=$# + (( n == 0 )) && return 0 + for m + do + if [[ -z ${(M)${(f)"$(zmodload -d)"}:#*:* $m( *|)} ]] + then + zmodload -u $m && zmodload -ud $m || return 1 + shift + else + set $@[2,-1] $m + fi + done + if (( $# < n )) + then + zmodunload $* + else + zmodload -u $* + fi + } + %test # This first test depends on knowing that zsh is run with +Z from the @@ -125,22 +147,15 @@ zmodload -e example 1:Delete the module alias again -# Remove all inter-module dependencies so that we can unload in any order. -# Skip the two modules that are required by the test system! +# Don't unload the two modules that are required by the test system! mods[(r)zsh/main]=() mods[(r)zsh/parameter]=() - for m in $mods - do - zmodload -ud $m - done -0d:Remove module dependecies - -# Unload all the modules again (except the two we skipped, of course). - - zmodload -u $mods + zmodunload $mods 0d:Unload the modules loaded by this test suite %clean - unset name modfile link auto load funcs mods m + eval "$deps" + unset deps name modfile link auto load funcs mods + unfunction zmodunload -- 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] 19+ messages in thread
* RE: About zmodload test segfaults 2001-05-23 16:51 ` About zmodload test segfaults Bart Schaefer @ 2001-05-24 12:15 ` Andrej Borsenkow 2001-05-25 16:54 ` PATCH: Block device tests Bart Schaefer 2001-05-28 9:21 ` About zmodload test segfaults Sven Wischnowsky 1 sibling, 1 reply; 19+ messages in thread From: Andrej Borsenkow @ 2001-05-24 12:15 UTC (permalink / raw) To: ZSH Workers Mailing List > > My guess is that the failures on Solaris et al., which seem to happen at > the module *un*loading test, have to do with shared library linkage. It > was wrong to simply discard all the dependencies and then unload. > > Here's a patch to V01zmodload to force unloading to happen in reverse > dependency order, i.e., a module is only unloaded when nothing depends > on it, and then its dependencies are removed so it won't prevent some > other module from being unloaded. If it's not possible to unload any > module that way, the zmodunload function calls zmodload -u to generate > the correct error message; this should happen only in case of circular > dependencies. > > Please check whether this takes care of the zmodload test segfaults on > various architectures. > With current CVS all tests (with obvious exception of unimplemented features) pass under current cygwin. Two tests that fail are searching for block device (C02cond) and process substitution (D03procsubst). -andrej ^ permalink raw reply [flat|nested] 19+ messages in thread
* PATCH: Block device tests 2001-05-24 12:15 ` Andrej Borsenkow @ 2001-05-25 16:54 ` Bart Schaefer 2001-05-26 8:24 ` Andrej Borsenkow 0 siblings, 1 reply; 19+ messages in thread From: Bart Schaefer @ 2001-05-25 16:54 UTC (permalink / raw) To: Andrej Borsenkow, ZSH Workers Mailing List On May 24, 4:15pm, Andrej Borsenkow wrote: } } > Please check whether this takes care of the zmodload test segfaults on } > various architectures. } } With current CVS all tests (with obvious exception of unimplemented } features) pass under current cygwin. } } Two tests that fail are searching for block device (C02cond) and process } substitution (D03procsubst). I don't know what to do about D03, but how about this for C02: diff -u zsh-forge/current/Test/C02cond.ztst zsh-4.0/Test/C02cond.ztst --- zsh-forge/current/Test/C02cond.ztst Wed May 23 19:59:28 2001 +++ zsh-4.0/Test/C02cond.ztst Fri May 25 09:50:05 2001 @@ -27,9 +27,13 @@ 0:-a cond # Find a block special file system. This is a little tricky. - block=$(find /dev /devices -type b -print 2>/dev/null|head -1) && - [[ -b $block && ! -b zerolength ]] -0:-b cond + if block=$(find /dev(|ices)/ -type b -print); then + [[ -b $block[(f)1] && ! -b zerolength ]] + else + print -u8 'Warning: Not testing [[ -b blockdevice ]] (no devices found)' + [[ ! -b zerolength ]] + fi +0D:-b cond char=(/dev/tty*([1])) [[ -c $char && ! -c $block ]] -- 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] 19+ messages in thread
* RE: PATCH: Block device tests 2001-05-25 16:54 ` PATCH: Block device tests Bart Schaefer @ 2001-05-26 8:24 ` Andrej Borsenkow 2001-05-27 22:54 ` Bart Schaefer 0 siblings, 1 reply; 19+ messages in thread From: Andrej Borsenkow @ 2001-05-26 8:24 UTC (permalink / raw) To: ZSH Workers Mailing List > > I don't know what to do about D03, but how about this for C02: > This broke test on my system where find returns 1 even if files were found; I fixed this but then got errors in next test (char devices). I fixed this but got errors in mkfifo test. It is pointless - we need general "not implemented" framework for test harness. -andrej Index: Test/C02cond.ztst =================================================================== RCS file: /cvsroot/zsh/zsh/Test/C02cond.ztst,v retrieving revision 1.4 diff -u -r1.4 C02cond.ztst --- Test/C02cond.ztst 2001/05/26 01:51:29 1.4 +++ Test/C02cond.ztst 2001/05/26 08:21:18 @@ -27,7 +27,8 @@ 0:-a cond # Find a block special file system. This is a little tricky. - if block=$(find /dev(|ices)/ -type b -print); then + block=$(find /dev(|ices)/ -type b -print 2> /dev/null) + if [[ -n $block ]]; then [[ -b $block[(f)1] && ! -b zerolength ]] else print -u8 'Warning: Not testing [[ -b blockdevice ]] (no devices found)' ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: PATCH: Block device tests 2001-05-26 8:24 ` Andrej Borsenkow @ 2001-05-27 22:54 ` Bart Schaefer 2001-05-28 6:50 ` Andrej Borsenkow 0 siblings, 1 reply; 19+ messages in thread From: Bart Schaefer @ 2001-05-27 22:54 UTC (permalink / raw) To: Andrej Borsenkow, ZSH Workers Mailing List On May 26, 12:24pm, Andrej Borsenkow wrote: } Subject: RE: PATCH: Block device tests } } This broke test on my system where find returns 1 even if files were found; } I fixed this but then got errors in next test (char devices). I fixed this } but got errors in mkfifo test. It is pointless - we need general "not } implemented" framework for test harness. Not finding any block (or character) devices because /dev is inaccessible to nonprivileged users -- which has been the cause of at least a few of the device test failures reported -- is not the same as "not implemented" (which is presumably the issue with mkfifo on ReliantUNIX). Further, I don't see any alternative to editing each test chunk even if there were a not-implemented framework. Could we use a grep of config.h as the not-implemented test? } + block=$(find /dev(|ices)/ -type b -print 2> /dev/null) You don't need the 2>/dev/null any more -- the test condition is `0D:', which means to ignore the error output and use only the exit status in determining whether the test succeeded. -- 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] 19+ messages in thread
* Re: PATCH: Block device tests 2001-05-27 22:54 ` Bart Schaefer @ 2001-05-28 6:50 ` Andrej Borsenkow 2001-05-28 16:06 ` Bart Schaefer 0 siblings, 1 reply; 19+ messages in thread From: Andrej Borsenkow @ 2001-05-28 6:50 UTC (permalink / raw) To: ZSH Workers Mailing List > > Not finding any block (or character) devices because /dev is inaccessible > to nonprivileged users -- which has been the cause of at least a few of > the device test failures reported -- is not the same as "not implemented" > (which is presumably the issue with mkfifo on ReliantUNIX). > It is on Cygwin. > > Could we use a grep of config.h as the not-implemented test? > Yes; this does it for mkfifo test. For procsubst we need to skip the whole file (not just a single test) - I cannot see how to do it currently (the grep shuold be for HAVE_FIFOS or HAVE_PATH_FD). There are still problems under Cygwin - there is no reliable way to mark a file as executable. At least, I cannot think about one offhand. -andrej Index: Test/C02cond.ztst =================================================================== RCS file: /cvsroot/zsh/zsh/Test/C02cond.ztst,v retrieving revision 1.5 diff -u -r1.5 C02cond.ztst --- Test/C02cond.ztst 2001/05/26 08:41:02 1.5 +++ Test/C02cond.ztst 2001/05/28 06:46:31 @@ -27,7 +27,7 @@ 0:-a cond # Find a block special file system. This is a little tricky. - block=$(find /dev(|ices)/ -type b -print 2> /dev/null) + block=$(find /dev(|ices)/ -type b -print) if [[ -n $block ]]; then [[ -b $block[(f)1] && ! -b zerolength ]] else @@ -36,8 +36,9 @@ fi 0D:-b cond - char=(/dev/tty*([1])) - [[ -c $char && ! -c $block ]] + # Use hardcoded /dev/tty because globbing inside /dev fails on Cygwin + char=/dev/tty + [[ -c $char && ! -c $zerolength ]] 0:-c cond [[ -d . && ! -d zerolength ]] @@ -67,12 +68,17 @@ [[ -o rcs && ! -o norcs && -o noerrexit && ! -o errexit ]] 0:-o cond - if whence mkfifo >/dev/null; then - mkfifo pipe + if ! grep '#define HAVE_FIFOS' ../../config.h > /dev/null 2>&1; then + print -u8 'Warning: Not testing [[ -p pipe ]] (FIFOs not supported)' + [[ ! -p zerolength ]] else - mknod pipe p + if whence mkfifo >/dev/null; then + mkfifo pipe + else + mknod pipe p + fi + [[ ( $nopipe == true || -p pipe ) && ! -p zerolength ]] fi - [[ -p pipe && ! -p zerolength ]] 0:-p cond [[ -r zerolength && ! -r unmodish ]] ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: PATCH: Block device tests 2001-05-28 6:50 ` Andrej Borsenkow @ 2001-05-28 16:06 ` Bart Schaefer 2001-05-28 17:25 ` Bart Schaefer 2001-05-29 10:34 ` Peter Stephenson 0 siblings, 2 replies; 19+ messages in thread From: Bart Schaefer @ 2001-05-28 16:06 UTC (permalink / raw) To: Andrej Borsenkow, ZSH Workers Mailing List On May 28, 10:50am, Andrej Borsenkow wrote: } Subject: Re: PATCH: Block device tests } } > Could we use a grep of config.h as the not-implemented test? } } Yes; this does it for mkfifo test. For procsubst we need to skip the whole } file (not just a single test) - I cannot see how to do it currently (the } grep shuold be for HAVE_FIFOS or HAVE_PATH_FD). Hmm. Are there other platforms that don't HAVE_PATH_FD where process substitution does work? } + if ! grep '#define HAVE_FIFOS' ../../config.h > /dev/null 2>&1; then } + print -u8 'Warning: Not testing [[ -p pipe ]] (FIFOs not supported)' } + [[ ! -p zerolength ]] } else } + if whence mkfifo >/dev/null; then } + mkfifo pipe } + else } + mknod pipe p } + fi } + [[ ( $nopipe == true || -p pipe ) && ! -p zerolength ]] } fi } 0:-p cond That $nopipe looks like it drifted in from another patch. Also, I've begun to prefer using `0d' and `0D' and even (in this case) `0dD' as the result key rather than redirecting the output of the "setup" code, because then with ZTST_verbose=2 one actually gets to see the results of the find/grep/whence/etc., which can be helpful in debugging. Perhaps printing the stdout/stderr should move up to ZTST_verbose == 3. Anyway, I'm going to commit the following and credit Andrej. diff -u zsh-forge/current/Test/C02cond.ztst zsh-4.0/Test/C02cond.ztst --- zsh-forge/current/Test/C02cond.ztst Sun May 27 15:43:53 2001 +++ zsh-4.0/Test/C02cond.ztst Mon May 28 08:57:22 2001 @@ -27,7 +27,7 @@ 0:-a cond # Find a block special file system. This is a little tricky. - block=$(find /dev(|ices)/ -type b -print 2> /dev/null) + block=$(find /dev(|ices)/ -type b -print) if [[ -n $block ]]; then [[ -b $block[(f)1] && ! -b zerolength ]] else @@ -36,8 +36,9 @@ fi 0D:-b cond - char=(/dev/tty*([1])) - [[ -c $char && ! -c $block ]] + # Use hardcoded /dev/tty because globbing inside /dev fails on Cygwin + char=/dev/tty + [[ -c $char && ! -c $zerolength ]] 0:-c cond [[ -d . && ! -d zerolength ]] @@ -67,13 +68,18 @@ [[ -o rcs && ! -o norcs && -o noerrexit && ! -o errexit ]] 0:-o cond - if whence mkfifo >/dev/null; then - mkfifo pipe + if ! grep '#define HAVE_FIFOS' $ZTST_testdir/../config.h; then + print -u8 'Warning: Not testing [[ -p pipe ]] (FIFOs not supported)' + [[ ! -p zerolength ]] else - mknod pipe p + if whence mkfifo && mkfifo pipe || mknod pipe p; then + [[ -p pipe && ! -p zerolength ]] + else + print -u8 'Warning: Not testing [[ -p pipe ]] (cannot create FIFO)' + [[ ! -p zerolength ]] + fi fi - [[ -p pipe && ! -p zerolength ]] -0:-p cond +0dD:-p cond [[ -r zerolength && ! -r unmodish ]] 0:-r cond -- 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] 19+ messages in thread
* Re: PATCH: Block device tests 2001-05-28 16:06 ` Bart Schaefer @ 2001-05-28 17:25 ` Bart Schaefer 2001-05-29 10:34 ` Peter Stephenson 1 sibling, 0 replies; 19+ messages in thread From: Bart Schaefer @ 2001-05-28 17:25 UTC (permalink / raw) To: ZSH Workers Mailing List On May 28, 4:06pm, Bart Schaefer wrote: } } Hmm. Are there other platforms that don't HAVE_PATH_FD where process } substitution does work? That reminds me: Can anyone think of a portable test for whether the current directory is on an NFS filesystem? The best I could come up with is `df . | grep :/' but I don't think `df' works appropriately on all platforms. `mkfifo' and friends fail on older versions of NFS but seem to work on linux, and anyway that'd be hard to distinguish from an OS where `mknod ... p' or `mkfifo' never work. I'm prety sure that only GNU can `find . -fstype nfs -prune'. What else? -- 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] 19+ messages in thread
* Re: PATCH: Block device tests 2001-05-28 16:06 ` Bart Schaefer 2001-05-28 17:25 ` Bart Schaefer @ 2001-05-29 10:34 ` Peter Stephenson 2001-05-29 10:51 ` Andrej Borsenkow 1 sibling, 1 reply; 19+ messages in thread From: Peter Stephenson @ 2001-05-29 10:34 UTC (permalink / raw) To: ZSH Workers Mailing List "Bart Schaefer" wrote: > + if ! grep '#define HAVE_FIFOS' $ZTST_testdir/../config.h; then $ZTST_testdir is where we are running the tests. Unfortunately this will break if you are compiling separately from the source tree and then running individual tests in the test directory, which is quite useful since you don't need to insert lots of paths. It's not a big problem since you're `supposed' to run it via make in the appropriate Test subdirectory, and actually I can't see an easy fix anyway. -- 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] 19+ messages in thread
* RE: PATCH: Block device tests 2001-05-29 10:34 ` Peter Stephenson @ 2001-05-29 10:51 ` Andrej Borsenkow 2001-05-29 15:37 ` Bart Schaefer 0 siblings, 1 reply; 19+ messages in thread From: Andrej Borsenkow @ 2001-05-29 10:51 UTC (permalink / raw) To: ZSH Workers Mailing List > "Bart Schaefer" wrote: > > + if ! grep '#define HAVE_FIFOS' $ZTST_testdir/../config.h; then > > $ZTST_testdir is where we are running the tests. Unfortunately this will > break if you are compiling separately from the source tree and > then running > individual tests in the test directory, which is quite useful since you > don't need to insert lots of paths. It's not a big problem since you're > `supposed' to run it via make in the appropriate Test subdirectory, and > actually I can't see an easy fix anyway. > Actually, the way to run individual test is 'make TESTNUM=C02cond check' which works nicely in separate build directory. I do not know if it is mentioned anywhere, but it is damn useful (all credits to Bart). -andrej ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: PATCH: Block device tests 2001-05-29 10:51 ` Andrej Borsenkow @ 2001-05-29 15:37 ` Bart Schaefer 2001-05-30 9:21 ` Peter Stephenson 0 siblings, 1 reply; 19+ messages in thread From: Bart Schaefer @ 2001-05-29 15:37 UTC (permalink / raw) To: ZSH Workers Mailing List On May 29, 11:34am, Peter Stephenson wrote: } Subject: Re: PATCH: Block device tests } } "Bart Schaefer" wrote: } > + if ! grep '#define HAVE_FIFOS' $ZTST_testdir/../config.h; then } } $ZTST_testdir is where we are running the tests. Unfortunately this will } break if you are compiling separately from the source tree and then running } individual tests in the test directory There are several other tests which rely on using a path relative to $ZTST_testdir: schaefer[575] print -c $(fgrep -l ZTST_testdir/.. Test/*(.)) Test/A01grammar.ztst Test/V01zmodload.ztst Test/Y03arguments.ztst Test/C02cond.ztst Test/Y01completion.ztst Test/D02glob.ztst Test/Y02compmatch.ztst I'm responsible for its appearance in C02 and V01, but I was only patterning my usage on the others, particularly D02. On May 29, 2:51pm, Andrej Borsenkow wrote: } } Actually, the way to run individual test is 'make TESTNUM=C02cond check' Which made more sense when the test numbers were actually numbers, and not alphabet-coded. Oh well, close enough. } I do not know if it is mentioned anywhere Hmm, even "make check" doesn't appear to be mentioned anywhere. Index: INSTALL =================================================================== RCS file: /cvsroot/zsh/zsh/INSTALL,v retrieving revision 1.7 diff -u -r1.7 INSTALL --- INSTALL 2001/04/02 13:04:04 1.7 +++ INSTALL 2001/05/29 15:37:19 @@ -152,6 +152,18 @@ After configuring, to build zsh, do the command: make +It's then a good idea to check that your build is working properly: + make check + +If you have trouble with a particular test, you can run it separately: + make TESTNUM=C02 check + +The TESTNUM value can be a single test number, as above, or a letter to +run an entire category of tests: + make TESTNUM=Y check + +See Test/README for a list of test categories. + Installing Zsh -------------- -- 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] 19+ messages in thread
* Re: PATCH: Block device tests 2001-05-29 15:37 ` Bart Schaefer @ 2001-05-30 9:21 ` Peter Stephenson 0 siblings, 0 replies; 19+ messages in thread From: Peter Stephenson @ 2001-05-30 9:21 UTC (permalink / raw) To: Zsh hackers list "Bart Schaefer" wrote: > On May 29, 11:34am, Peter Stephenson wrote: > } Subject: Re: PATCH: Block device tests > } > } "Bart Schaefer" wrote: > } > + if ! grep '#define HAVE_FIFOS' $ZTST_testdir/../config.h; then > } > } $ZTST_testdir is where we are running the tests. Unfortunately this will > } break if you are compiling separately from the source tree and then running > } individual tests in the test directory > > There are several other tests which rely on using a path relative to > $ZTST_testdir: The point was a little different: that config.h now has to be findable with respect to wherever you're running the test, which therefore has to be the Test subdirectory of the build. Up to now, you could use the Test subdirectory of the source tree, if different --- or anywhere else if you adapted the path to the files in the latter directory. On balance, it may be an advantage doing it this way: if we implement a way of saying what's not implemented and hence shouldn't be checked on certain systems, that's certainly going to have to go through one of the config.* files. In fact, we might get away with sourcing config.cache, and testing the cv variables. I won't be looking at that before the release. -- 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] 19+ messages in thread
* Re: About zmodload test segfaults 2001-05-23 16:51 ` About zmodload test segfaults Bart Schaefer 2001-05-24 12:15 ` Andrej Borsenkow @ 2001-05-28 9:21 ` Sven Wischnowsky 1 sibling, 0 replies; 19+ messages in thread From: Sven Wischnowsky @ 2001-05-28 9:21 UTC (permalink / raw) To: zsh-workers Bart Schaefer wrote: > ... > > Please check whether this takes care of the zmodload test segfaults on > various architectures. That patch took care of the chatty loader under Tru64 Unix, of course. The patch below takes care of the floating point exception I was seeing when trying to unload the zprof module. It makes the wrapper function zprof registers be more careful, effectively avoiding most of the code if the zprof module is currently being unloaded. Which is a good thing to do anyway. Now I get a `all tests successful' for V01 here, too. Bye Sven Index: Src/Modules/zprof.c =================================================================== RCS file: /cvsroot/zsh/zsh/Src/Modules/zprof.c,v retrieving revision 1.2 diff -u -r1.2 zprof.c --- Src/Modules/zprof.c 2001/03/20 09:35:48 1.2 +++ Src/Modules/zprof.c 2001/05/28 09:17:54 @@ -68,6 +68,7 @@ static Parc arcs; static int narcs; static Sfunc stack; +static Module zprof_module; static void freepfuncs(Pfunc f) @@ -216,6 +217,7 @@ static int zprof_wrapper(Eprog prog, FuncWrap w, char *name) { + int active = 0; struct sfunc sf, *sp; Pfunc f; Parc a = NULL; @@ -223,56 +225,64 @@ struct timezone dummy; double prev, now; - if (!(f = findpfunc(name))) { - f = (Pfunc) zalloc(sizeof(*f)); - f->name = ztrdup(name); - f->calls = 0; - f->time = f->self = 0.0; - f->next = calls; - calls = f; - ncalls++; + if (zprof_module && !(zprof_module->flags & MOD_UNLOAD)) { + active = 1; + if (!(f = findpfunc(name))) { + f = (Pfunc) zalloc(sizeof(*f)); + f->name = ztrdup(name); + f->calls = 0; + f->time = f->self = 0.0; + f->next = calls; + calls = f; + ncalls++; + } + if (stack) { + if (!(a = findparc(stack->p, f))) { + a = (Parc) zalloc(sizeof(*a)); + a->from = stack->p; + a->to = f; + a->calls = 0; + a->time = a->self = 0.0; + a->next = arcs; + arcs = a; + narcs++; + } + } + sf.prev = stack; + sf.p = f; + stack = &sf; + + f->calls++; + tv.tv_sec = tv.tv_usec = 0; + gettimeofday(&tv, &dummy); + sf.beg = prev = ((((double) tv.tv_sec) * 1000.0) + + (((double) tv.tv_usec) / 1000.0)); } - if (stack) { - if (!(a = findparc(stack->p, f))) { - a = (Parc) zalloc(sizeof(*a)); - a->from = stack->p; - a->to = f; - a->calls = 0; - a->time = a->self = 0.0; - a->next = arcs; - arcs = a; - narcs++; - } - } - sf.prev = stack; - sf.p = f; - stack = &sf; - - f->calls++; - tv.tv_sec = tv.tv_usec = 0; - gettimeofday(&tv, &dummy); - sf.beg = prev = ((((double) tv.tv_sec) * 1000.0) + - (((double) tv.tv_usec) / 1000.0)); runshfunc(prog, w, name); - tv.tv_sec = tv.tv_usec = 0; - gettimeofday(&tv, &dummy); - - now = ((((double) tv.tv_sec) * 1000.0) + - (((double) tv.tv_usec) / 1000.0)); - f->self += now - sf.beg; - for (sp = sf.prev; sp && sp->p != f; sp = sp->prev); - if (!sp) - f->time += now - prev; - if (a) { - a->calls++; - a->self += now - sf.beg; - } - stack = sf.prev; - - if (stack) { - stack->beg += now - prev; - if (a) - a->time += now - prev; + if (active) { + if (zprof_module && !(zprof_module->flags & MOD_UNLOAD)) { + tv.tv_sec = tv.tv_usec = 0; + gettimeofday(&tv, &dummy); + + now = ((((double) tv.tv_sec) * 1000.0) + + (((double) tv.tv_usec) / 1000.0)); + f->self += now - sf.beg; + for (sp = sf.prev; sp && sp->p != f; sp = sp->prev); + if (!sp) + f->time += now - prev; + if (a) { + a->calls++; + a->self += now - sf.beg; + } + stack = sf.prev; + + if (stack) { + stack->beg += now - prev; + if (a) + a->time += now - prev; + } + } else + stack = sf.prev; } return 0; } @@ -289,6 +299,7 @@ int setup_(Module m) { + zprof_module = m; return 0; } -- Sven Wischnowsky wischnow@informatik.hu-berlin.de ^ permalink raw reply [flat|nested] 19+ messages in thread
* RE: Almost all tests pass under new cygwin 2001-05-22 15:31 ` Bart Schaefer 2001-05-22 15:44 ` Oliver Kiddle @ 2001-05-22 15:53 ` Andrej Borsenkow 1 sibling, 0 replies; 19+ messages in thread From: Andrej Borsenkow @ 2001-05-22 15:53 UTC (permalink / raw) To: Bart Schaefer, ZSH Workers Mailing List > } > } The only problem is V01zmodload test that segfaults. > > Same answer I just gave Jason Price: make check with ZTST_verbose=2 > so we can tell which zmodload command dies. > I just wrote in reply to myself that with ZTST_verbose=2 it does not segfault at all. -andrej ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: Almost all tests pass under new cygwin 2001-05-22 15:14 Almost all tests pass under new cygwin Andrej Borsenkow 2001-05-22 15:24 ` Andrej Borsenkow 2001-05-22 15:31 ` Bart Schaefer @ 2001-05-23 11:40 ` Peter Stephenson 2 siblings, 0 replies; 19+ messages in thread From: Peter Stephenson @ 2001-05-23 11:40 UTC (permalink / raw) To: ZSH Workers Mailing List Andrej wrote: > The only problem is V01zmodload test that segfaults. Peter, was it O.K. for > you? I forgot to reply to this: I still only use static loading under cygwin, so there's no problem here. -- 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] 19+ messages in thread
end of thread, other threads:[~2001-05-30 9:22 UTC | newest] Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2001-05-22 15:14 Almost all tests pass under new cygwin Andrej Borsenkow 2001-05-22 15:24 ` Andrej Borsenkow 2001-05-22 15:31 ` Bart Schaefer 2001-05-22 15:44 ` Oliver Kiddle 2001-05-23 16:51 ` About zmodload test segfaults Bart Schaefer 2001-05-24 12:15 ` Andrej Borsenkow 2001-05-25 16:54 ` PATCH: Block device tests Bart Schaefer 2001-05-26 8:24 ` Andrej Borsenkow 2001-05-27 22:54 ` Bart Schaefer 2001-05-28 6:50 ` Andrej Borsenkow 2001-05-28 16:06 ` Bart Schaefer 2001-05-28 17:25 ` Bart Schaefer 2001-05-29 10:34 ` Peter Stephenson 2001-05-29 10:51 ` Andrej Borsenkow 2001-05-29 15:37 ` Bart Schaefer 2001-05-30 9:21 ` Peter Stephenson 2001-05-28 9:21 ` About zmodload test segfaults Sven Wischnowsky 2001-05-22 15:53 ` Almost all tests pass under new cygwin Andrej Borsenkow 2001-05-23 11:40 ` Peter Stephenson
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).