* Zsh 5.6 test failures in A05execution.ztst
@ 2018-09-04 22:40 ` Leo Famulari
2018-09-05 7:49 ` Peter Stephenson
[not found] ` <20180905084958.5b1b4552@camnpupstephen.cam.scsc.local>
0 siblings, 2 replies; 6+ messages in thread
From: Leo Famulari @ 2018-09-04 22:40 UTC (permalink / raw)
To: zsh-workers
[-- Attachment #1: Type: text/plain, Size: 982 bytes --]
Hi,
While testing the update of Zsh 5.6 for GNU Guix [0] I encountered some
new test failures in the Zsh test suite.
Specifically, like this:
------
Test ./A05execution.ztst failed: bad status 127, expected 0 from:
PATH=/bin:${ZTST_testdir}/command.tmp/ tstcmd-slashless
Error output:
(eval):1: /tmp/guix-build-zsh-5.6.drv-0/zsh-5.6/Test/command.tmp//tstcmd-slashless: bad interpreter: sh: no such file or directory
Was testing: path (3)
./A05execution.ztst: test failed.
------
Indeed, in the build environment of Guix packages, there is no /bin/sh
or any other executables at locations that might be familiar and
possible to guess in advance. There is a `sh` (from Bash) on PATH, but
these tests reset PATH.
The next test in the file failed similarly, but because it is missing
`echo` rather than `sh`.
Our workaround can be seen here:
https://git.savannah.gnu.org/cgit/guix.git/commit/?id=fcf4841c0ee16631e8330d797cf3788dac0eca05
[0] https://www.gnu.org/software/guix/
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Zsh 5.6 test failures in A05execution.ztst
2018-09-04 22:40 ` Zsh 5.6 test failures in A05execution.ztst Leo Famulari
@ 2018-09-05 7:49 ` Peter Stephenson
2018-09-05 10:25 ` 5.6.1? (was: Re: Zsh 5.6 test failures in A05execution.ztst) Daniel Shahaf
[not found] ` <20180905084958.5b1b4552@camnpupstephen.cam.scsc.local>
1 sibling, 1 reply; 6+ messages in thread
From: Peter Stephenson @ 2018-09-05 7:49 UTC (permalink / raw)
To: Leo Famulari, zsh-workers
On Tue, 4 Sep 2018 18:40:14 -0400
Leo Famulari <leo@famulari.name> wrote:
> While testing the update of Zsh 5.6 for GNU Guix [0] I encountered some
> new test failures in the Zsh test suite.
>
> Specifically, like this:
>
> ------
> Test ./A05execution.ztst failed: bad status 127, expected 0 from:
> PATH=/bin:${ZTST_testdir}/command.tmp/ tstcmd-slashless
> Error output:
> (eval):1: /tmp/guix-build-zsh-5.6.drv-0/zsh-5.6/Test/command.tmp//tstcmd-slashless: bad interpreter: sh: no such file or directory
> Was testing: path (3)
> ./A05execution.ztst: test failed.
> ------
>
> Indeed, in the build environment of Guix packages, there is no /bin/sh
> or any other executables at locations that might be familiar and
> possible to guess in advance. There is a `sh` (from Bash) on PATH, but
> these tests reset PATH.
OK, thanks for the report
> Our workaround can be seen here:
>
> https://git.savannah.gnu.org/cgit/guix.git/commit/?id=fcf4841c0ee16631e8330d797cf3788dac0eca05
Heh. Rather than decode a lisp solution I've made my own...
Can you confirm this works OK?
We'll probably make a 5.6.1 with niggles fixed.
Thanks
pws
diff --git a/Test/A05execution.ztst b/Test/A05execution.ztst
index fb39d05..d34e37f 100644
--- a/Test/A05execution.ztst
+++ b/Test/A05execution.ztst
@@ -6,11 +6,12 @@
cd command.tmp
- print '#!/bin/sh\necho This is top' >tstcmd
+ sh="$(which sh)"
+ print "#!${sh}\necho This is top" >tstcmd
- print '#!/bin/sh\necho This is dir1' >dir1/tstcmd
+ print "#!${sh}\necho This is dir1" >dir1/tstcmd
- print '#!/bin/sh\necho This is dir2' >dir2/tstcmd
+ print "#!${sh}\necho This is dir2" >dir2/tstcmd
print -n '#!sh\necho This is slashless' >tstcmd-slashless
print -n '#!echo foo\necho This is arg' >tstcmd-arg
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Zsh 5.6 test failures in A05execution.ztst
[not found] ` <20180905084958.5b1b4552@camnpupstephen.cam.scsc.local>
@ 2018-09-05 8:49 ` Peter Stephenson
2018-09-05 16:45 ` Leo Famulari
0 siblings, 1 reply; 6+ messages in thread
From: Peter Stephenson @ 2018-09-05 8:49 UTC (permalink / raw)
To: Leo Famulari, zsh-workers
On Wed, 5 Sep 2018 08:49:58 +0100
Peter Stephenson <p.stephenson@samsung.com> wrote:
> Can you confirm this works OK?
Sorry, I've missed quite a lot of the point there.
Try this...
diff --git a/Test/A05execution.ztst b/Test/A05execution.ztst
index fb39d05..b08286f 100644
--- a/Test/A05execution.ztst
+++ b/Test/A05execution.ztst
@@ -6,16 +6,20 @@
cd command.tmp
- print '#!/bin/sh\necho This is top' >tstcmd
+ shcmd="$(which sh)"
+ shpath=${shcmd:h}
+ echocmd="$(which -p echo)"
+ echopath=${echocmd:h}
+ print "#!${shcmd}\necho This is top" >tstcmd
- print '#!/bin/sh\necho This is dir1' >dir1/tstcmd
+ print "#!${shcmd}\necho This is dir1" >dir1/tstcmd
- print '#!/bin/sh\necho This is dir2' >dir2/tstcmd
+ print "#!${shcmd}\necho This is dir2" >dir2/tstcmd
print -n '#!sh\necho This is slashless' >tstcmd-slashless
print -n '#!echo foo\necho This is arg' >tstcmd-arg
print '#!xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxnyyy' >tstcmd-interp-too-long
- print '#!/bin/sh\necho should not execute; exit 1' >xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxn
+ print "#!${sh}\necho should not execute; exit 1" >xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxn
chmod 755 tstcmd dir1/tstcmd dir2/tstcmd
chmod 755 tstcmd-slashless tstcmd-arg tstcmd-interp-too-long
@@ -40,15 +44,15 @@
0:path (2)
>This is top
- PATH=/bin:${ZTST_testdir}/command.tmp/ tstcmd-slashless
+ PATH=${echopath}:${ZTST_testdir}/command.tmp/ tstcmd-slashless
0:path (3)
>This is slashless
- PATH=/bin:${ZTST_testdir}/command.tmp tstcmd-arg
+ PATH=${shpath}:${ZTST_testdir}/command.tmp tstcmd-arg
0:path (4)
*>foo */command.tmp/tstcmd-arg
- path=(/bin ${ZTST_testdir}/command.tmp/)
+ path=($shpath $echopath ${ZTST_testdir}/command.tmp/)
tstcmd-interp-too-long 2>&1; echo "status $?"
path=($storepath)
0:path (5)
^ permalink raw reply [flat|nested] 6+ messages in thread
* 5.6.1? (was: Re: Zsh 5.6 test failures in A05execution.ztst)
2018-09-05 7:49 ` Peter Stephenson
@ 2018-09-05 10:25 ` Daniel Shahaf
0 siblings, 0 replies; 6+ messages in thread
From: Daniel Shahaf @ 2018-09-05 10:25 UTC (permalink / raw)
To: Peter Stephenson; +Cc: Leo Famulari, zsh-workers
Peter Stephenson wrote on Wed, Sep 05, 2018 at 08:49:58 +0100:
> We'll probably make a 5.6.1 with niggles fixed.
Shall we wait a few days? Will give a chance for Vincent's issue to be fixed
and for others to surface; the other regressions found have workarounds.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Zsh 5.6 test failures in A05execution.ztst
2018-09-05 8:49 ` Zsh 5.6 test failures in A05execution.ztst Peter Stephenson
@ 2018-09-05 16:45 ` Leo Famulari
2018-09-05 16:59 ` Peter Stephenson
0 siblings, 1 reply; 6+ messages in thread
From: Leo Famulari @ 2018-09-05 16:45 UTC (permalink / raw)
To: Peter Stephenson; +Cc: zsh-workers
[-- Attachment #1: Type: text/plain, Size: 586 bytes --]
On Wed, Sep 05, 2018 at 09:49:01AM +0100, Peter Stephenson wrote:
> Try this...
Thanks!
> - PATH=/bin:${ZTST_testdir}/command.tmp/ tstcmd-slashless
> + PATH=${echopath}:${ZTST_testdir}/command.tmp/ tstcmd-slashless
> 0:path (3)
> >This is slashless
>
> - PATH=/bin:${ZTST_testdir}/command.tmp tstcmd-arg
> + PATH=${shpath}:${ZTST_testdir}/command.tmp tstcmd-arg
> 0:path (4)
> *>foo */command.tmp/tstcmd-arg
The insertion of $echopath and $shpath here was reversed.
Test 3 needed $shpath and test 4 needed $echopath. The tests succeed
with that change.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Zsh 5.6 test failures in A05execution.ztst
2018-09-05 16:45 ` Leo Famulari
@ 2018-09-05 16:59 ` Peter Stephenson
0 siblings, 0 replies; 6+ messages in thread
From: Peter Stephenson @ 2018-09-05 16:59 UTC (permalink / raw)
To: Leo Famulari, zsh-workers
On Wed, 5 Sep 2018 12:45:14 -0400
Leo Famulari <leo@famulari.name> wrote:
> On Wed, Sep 05, 2018 at 09:49:01AM +0100, Peter Stephenson wrote:
> > Try this...
>
> Thanks!
>
> > - PATH=/bin:${ZTST_testdir}/command.tmp/ tstcmd-slashless
> > + PATH=${echopath}:${ZTST_testdir}/command.tmp/ tstcmd-slashless
> > 0:path (3)
> > >This is slashless
> >
> > - PATH=/bin:${ZTST_testdir}/command.tmp tstcmd-arg
> > + PATH=${shpath}:${ZTST_testdir}/command.tmp tstcmd-arg
> > 0:path (4)
> > *>foo */command.tmp/tstcmd-arg
>
> The insertion of $echopath and $shpath here was reversed.
>
> Test 3 needed $shpath and test 4 needed $echopath. The tests succeed
> with that change.
I've committed it with that change, thanks.
pws
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2018-09-05 16:59 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <CGME20180904224101epcas1p22c7c1a0fc8465715429c07c0b49177a5@epcas1p2.samsung.com>
2018-09-04 22:40 ` Zsh 5.6 test failures in A05execution.ztst Leo Famulari
2018-09-05 7:49 ` Peter Stephenson
2018-09-05 10:25 ` 5.6.1? (was: Re: Zsh 5.6 test failures in A05execution.ztst) Daniel Shahaf
[not found] ` <20180905084958.5b1b4552@camnpupstephen.cam.scsc.local>
2018-09-05 8:49 ` Zsh 5.6 test failures in A05execution.ztst Peter Stephenson
2018-09-05 16:45 ` Leo Famulari
2018-09-05 16:59 ` 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).