Re: [BLOCKER] cannot single-step unit tests any more

2010-05-26 Thread Paolo Bonzini
On 05/16/2010 10:25 PM, Bruno Haible wrote: + # Test whether "$0" points to a test script. + case "$0" in + *.sh) true;; + *) false;; + esac I think this is not a robust assumption. Maybe something like sh | *[a-z0-9]sh) false;; # $0 is a

Re: [BLOCKER] cannot single-step unit tests any more

2010-05-17 Thread Jim Meyering
Bruno Haible wrote: >> I don't see how this can cause a problem. >> >> The only uses of $0 are in the re-exec code (which appear not to matter >> when single stepping) Hi Bruno, > If the user starts a shell other than bash interactively, and tries to do > ". ./init.sh", he may fall into the re-ex

Re: [BLOCKER] cannot single-step unit tests any more

2010-05-16 Thread Jim Meyering
Bruno Haible wrote: >> Now I've tried harder, and this does the job: > > Thanks a lot for getting to this so quickly! I can now single-step through > the test in the documented way. > > One line in the patch looks strange: In the test whether the current shell > is OK you test for an exit code 9; t

Re: [BLOCKER] cannot single-step unit tests any more

2010-05-16 Thread Bruno Haible
Hi Jim, > > 2) The use of "$0". It is meant to denote the test-sh filename. This > > CANNOT > >work when single-stepping, because the statements are not contained in a > > file > >but are executed interactively, one by one. > > I don't see how this can cause a problem. > > The only

Re: [BLOCKER] cannot single-step unit tests any more

2010-05-16 Thread Bruno Haible
Hi Jim, > Now I've tried harder, and this does the job: Thanks a lot for getting to this so quickly! I can now single-step through the test in the documented way. One line in the patch looks strange: In the test whether the current shell is OK you test for an exit code 9; then in the loop you te

Re: [BLOCKER] cannot single-step unit tests any more

2010-05-16 Thread Jim Meyering
Bruno Haible wrote: > Two things are wrong here: ... > 2) The use of "$0". It is meant to denote the test-sh filename. This > CANNOT >work when single-stepping, because the statements are not contained in a > file >but are executed interactively, one by one. I don't see how this can

Re: [BLOCKER] cannot single-step unit tests any more

2010-05-16 Thread Jim Meyering
Bruno Haible wrote: > On a glibc system, I cannot single-step unit tests that are built upon > tests/init.sh any more. This is blocking. ... > Two things are wrong here: > 1) If I'm already using bash, it MUST NOT do an 'exec', because that kills the >ability to do single-stepping. Thanks for

[BLOCKER] cannot single-step unit tests any more

2010-05-16 Thread Bruno Haible
Hi Jim, On a glibc system, I cannot single-step unit tests that are built upon tests/init.sh any more. This is blocking. I got this skipped test on a glibc system: test-verify.sh: skipped test: cannot compile error-free SKIP: test-verify.sh and cannot investigate it! Here's my attempt at doi