Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Zsh 5.6 test failures in A05execution.ztst
- X-seq: zsh-workers 43378
- From: Peter Stephenson <p.stephenson@xxxxxxxxxxx>
- To: Leo Famulari <leo@xxxxxxxxxxxxx>, <zsh-workers@xxxxxxx>
- Subject: Re: Zsh 5.6 test failures in A05execution.ztst
- Date: Wed, 5 Sep 2018 09:49:01 +0100
- Cms-type: 201P
- Dkim-filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20180905084905euoutp0114f6710290e5153e023aa631b06f3329~RdMbNl_wz0239102391euoutp01g
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1536137345; bh=lVmhD3Gpfprd8gPx9a4luElLKVxRfXcSbwu/z/8JvwU=; h=Date:From:To:Subject:In-Reply-To:References:From; b=QjYOqpWecEKAoTYPAKmU0CKoe2CZLsqKBpq+mwjiqpu8/20Nj4iHCHaU1WDsgFJI3 k+UuQ8gPpeMJHl+zNiXx2Dm8EISmZit7ddvIBjPX6j26OO/eygB1eUJF4yhYzqolGF KjEMHuljA/n6zJpyD0ya4+HIOsa2atwvN8qmyPEM=
- In-reply-to: <20180905084958.5b1b4552@camnpupstephen.cam.scsc.local>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- Organization: SCSC
- References: <CGME20180904224101epcas1p22c7c1a0fc8465715429c07c0b49177a5@epcas1p2.samsung.com> <20180904224014.GA14458@jasmine.lan> <20180905084958.5b1b4552@camnpupstephen.cam.scsc.local>
On Wed, 5 Sep 2018 08:49:58 +0100
Peter Stephenson <p.stephenson@xxxxxxxxxxx> 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)
Messages sorted by:
Reverse Date,
Date,
Thread,
Author