Zsh test failure

  • Done
  • quality assurance status badge
Details
2 participants
  • Leo Famulari
  • Ludovic Courtès
Owner
unassigned
Submitted by
Leo Famulari
Severity
normal
L
L
Leo Famulari wrote on 21 Jan 2016 03:21
(address . bug-guix@gnu.org)
20160121022120.GA19231@jasmine
Attachment: file
L
L
Ludovic Courtès wrote on 21 Jan 2016 22:02
(name . Leo Famulari)(address . leo@famulari.name)(address . 22420@debbugs.gnu.org)
87oacewsqq.fsf@gnu.org
Leo Famulari <leo@famulari.name> skribis:

Toggle quote (11 lines)
> Zsh fails to build due to a test failure on my system (x86_64).
>
> The test suite does not report where the failure occurs but I believe it
> is in section 'Test/B02typeset.ztst' as a result of patch-shebang
> failing to find a binary interpreter for 'Test/ztst.zsh':
>
> patch-shebang: ./Test/ztst.zsh: warning: no binary for interpreter `zsh' found in $PATH
>
> I wonder if this means that the file is being interpreted by Bash, or
> maybe the 'sh' mode of Bash.

It means that the ztst.zsh contains #!/usr/bin/zsh or similar, and when
the ‘patch-shebangs’ phase runs, there’s no ‘zsh’ binary in $PATH, so
the file is left unpatched with its bogus shebang.

That means that attempts to exec ztst.zsh systematically fail.

However, I see that Zsh appears to build fine on x86_64-linux as of
v0.9.0-1121-gaca738f. What Guix commit are you using?

Thanks,
Ludo’.
L
L
Leo Famulari wrote on 21 Jan 2016 23:20
Zsh test failure
(address . 22420@debbugs.gnu.org)
20160121222018.GA5534@jasmine
I patched the shebangs in "Test/ztst.zsh" and "Test/runtests.zsh" to use
the 'zsh' produced by the build phase, but it doesn't seem to have made
any difference.
L
L
Leo Famulari wrote on 22 Jan 2016 00:05
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 22420@debbugs.gnu.org)
20160121230523.GA17695@jasmine
On Thu, Jan 21, 2016 at 10:02:53PM +0100, Ludovic Courtès wrote:
Toggle quote (22 lines)
> Leo Famulari <leo@famulari.name> skribis:
>
> > Zsh fails to build due to a test failure on my system (x86_64).
> >
> > The test suite does not report where the failure occurs but I believe it
> > is in section 'Test/B02typeset.ztst' as a result of patch-shebang
> > failing to find a binary interpreter for 'Test/ztst.zsh':
> >
> > patch-shebang: ./Test/ztst.zsh: warning: no binary for interpreter `zsh' found in $PATH
> >
> > I wonder if this means that the file is being interpreted by Bash, or
> > maybe the 'sh' mode of Bash.
>
> It means that the ztst.zsh contains #!/usr/bin/zsh or similar, and when
> the ‘patch-shebangs’ phase runs, there’s no ‘zsh’ binary in $PATH, so
> the file is left unpatched with its bogus shebang.
>
> That means that attempts to exec ztst.zsh systematically fail.
>
> However, I see that Zsh appears to build fine on x86_64-linux as of
> v0.9.0-1121-gaca738f. What Guix commit are you using?

Currently, feb767b23c7c. I noticed it was failing on core-updates and
decided to investigate; this commit is on master, not core-updates.

I have confirmed the failure is in 'Test/B02typeset.ztst'.

Toggle quote (3 lines)
>
> Thanks,
> Ludo’.
L
L
Leo Famulari wrote on 22 Jan 2016 00:14
(address . 22420@debbugs.gnu.org)
20160121231452.GA10109@jasmine
On Thu, Jan 21, 2016 at 05:20:18PM -0500, Leo Famulari wrote:
Toggle quote (4 lines)
> I patched the shebangs in "Test/ztst.zsh" and "Test/runtests.zsh" to use
> the 'zsh' produced by the build phase, but it doesn't seem to have made
> any difference.

I realized that the test suite sets 'ZTST_exe=../Src/zsh' and generally
takes care to execute Zsh scripts using that interpreter.

Toggle quote (3 lines)
>
>
>
L
L
Ludovic Courtès wrote on 22 Jan 2016 16:04
(name . Leo Famulari)(address . leo@famulari.name)(address . 22420@debbugs.gnu.org)
878u3h7j0c.fsf@gnu.org
Leo Famulari <leo@famulari.name> skribis:

Toggle quote (26 lines)
> On Thu, Jan 21, 2016 at 10:02:53PM +0100, Ludovic Courtès wrote:
>> Leo Famulari <leo@famulari.name> skribis:
>>
>> > Zsh fails to build due to a test failure on my system (x86_64).
>> >
>> > The test suite does not report where the failure occurs but I believe it
>> > is in section 'Test/B02typeset.ztst' as a result of patch-shebang
>> > failing to find a binary interpreter for 'Test/ztst.zsh':
>> >
>> > patch-shebang: ./Test/ztst.zsh: warning: no binary for interpreter `zsh' found in $PATH
>> >
>> > I wonder if this means that the file is being interpreted by Bash, or
>> > maybe the 'sh' mode of Bash.
>>
>> It means that the ztst.zsh contains #!/usr/bin/zsh or similar, and when
>> the ‘patch-shebangs’ phase runs, there’s no ‘zsh’ binary in $PATH, so
>> the file is left unpatched with its bogus shebang.
>>
>> That means that attempts to exec ztst.zsh systematically fail.
>>
>> However, I see that Zsh appears to build fine on x86_64-linux as of
>> v0.9.0-1121-gaca738f. What Guix commit are you using?
>
> Currently, feb767b23c7c. I noticed it was failing on core-updates and
> decided to investigate; this commit is on master, not core-updates.

On my x86_64 machine, commit, I’ve just run:

Toggle snippet (10 lines)
$ ./pre-inst-env guix build zsh --rounds=3 -K --no-substitutes
[...]
@ build-succeeded /gnu/store/0g7d2ccznwrw010mlfjzzgvycc28vfyx-zsh-5.1.1.drv -
/gnu/store/1wv2flclz8nnkiq1j1s2aphqp9lk68i6-zsh-5.1.1
$ guix hash -r /gnu/store/1wv2flclz8nnkiq1j1s2aphqp9lk68i6-zsh-5.1.1
0s634s0z2b53fj3yd16bydh0qqh1xqjsjnwr59lbkqpd7yprpqma
$ git describe
v0.9.0-1135-gedfa91a

What system are you using?

Toggle quote (2 lines)
> I have confirmed the failure is in 'Test/B02typeset.ztst'.

Could you post the relevant part of the build log?

TIA,
Ludo’.
L
L
Leo Famulari wrote on 22 Jan 2016 17:30
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 22420@debbugs.gnu.org)
20160122163012.GA13174@jasmine
Attachment: file
L
L
Ludovic Courtès wrote on 22 Jan 2016 18:47
(name . Leo Famulari)(address . leo@famulari.name)(address . 22420@debbugs.gnu.org)
87r3h933ri.fsf@gnu.org
Leo Famulari <leo@famulari.name> skribis:

Toggle quote (7 lines)
>> > I have confirmed the failure is in 'Test/B02typeset.ztst'.
>>
>> Could you post the relevant part of the build log?
>
> Here is the verbose output of only the B02 test:
> http://paste.debian.net/367077/

It finishes with:

Toggle snippet (8 lines)
2221 Test successful.
2222 ZTST_test: looking for new test
2223 ZTST_test: examining line:
2224
2225 ZTST_test: all tests successful
2226 ./ztst.zsh:550: unmatched "

Could it be that the unmatched " is the root cause? I don’t see any
clear sign of an error or failure other than that.

Could you check what’s in that file on line 550?

My 2¢.

Ludo’.
L
L
Leo Famulari wrote on 22 Jan 2016 20:33
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 22420@debbugs.gnu.org)
20160122193344.GB20936@jasmine
On Fri, Jan 22, 2016 at 06:47:29PM +0100, Ludovic Courtès wrote:
Toggle quote (25 lines)
> Leo Famulari <leo@famulari.name> skribis:
>
> >> > I have confirmed the failure is in 'Test/B02typeset.ztst'.
> >>
> >> Could you post the relevant part of the build log?
> >
> > Here is the verbose output of only the B02 test:
> > http://paste.debian.net/367077/
>
> It finishes with:
>
> --8<---------------cut here---------------start------------->8---
> 2221 Test successful.
> 2222 ZTST_test: looking for new test
> 2223 ZTST_test: examining line:
> 2224
> 2225 ZTST_test: all tests successful
> 2226 ./ztst.zsh:550: unmatched "
> --8<---------------cut here---------------end--------------->8---
>
> Could it be that the unmatched " is the root cause? I don’t see any
> clear sign of an error or failure other than that.
>
> Could you check what’s in that file on line 550?

It's only 543 lines long! :o

I guess I'll try tracing the script.

I thought that perhaps it was referring to B02typeset.ztst, but I don't
think there is anything related in that area of the file:
540 (
541 setopt glob
542 mkdir -p arrayglob
543 touch arrayglob/{one,two,three,four,five,six,seven}
544 fn() {
545 typeset array=(arrayglob/[tf]*)
546 print -l ${array:t}
547 #
548 typeset {first,second,third}=the_same_value array=(
549 extends
550 over
551 multiple
552 lines
553 )
554 print -l $first $second $third "$array"
555 #
556 integer i=$(echo 1 + 2 + 3 + 4)
557 print $i
558 #
559 # only noted by accident this was broken..
560 # we need to turn off special recognition
561 # of assignments within assignments...
562 typeset careful=( i=1 j=2 k=3 )
563 print -l $careful
564 }

Toggle quote (4 lines)
>
> My 2¢.
>
> Ludo’.
L
L
Ludovic Courtès wrote on 22 Jan 2016 21:34
(name . Leo Famulari)(address . leo@famulari.name)(address . 22420@debbugs.gnu.org)
871t992w0w.fsf@gnu.org
Leo Famulari <leo@famulari.name> skribis:

Toggle quote (9 lines)
> I thought that perhaps it was referring to B02typeset.ztst, but I don't
> think there is anything related in that area of the file:
> 540 (
> 541 setopt glob
> 542 mkdir -p arrayglob
> 543 touch arrayglob/{one,two,three,four,five,six,seven}
> 544 fn() {
> 545 typeset array=(arrayglob/[tf]*)

Out of curiosity, what file system is this on?

Ludo’.
L
L
Leo Famulari wrote on 22 Jan 2016 21:38
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 22420@debbugs.gnu.org)
20160122203854.GA27797@jasmine
On Fri, Jan 22, 2016 at 09:34:39PM +0100, Ludovic Courtès wrote:
Toggle quote (13 lines)
> Leo Famulari <leo@famulari.name> skribis:
>
> > I thought that perhaps it was referring to B02typeset.ztst, but I don't
> > think there is anything related in that area of the file:
> > 540 (
> > 541 setopt glob
> > 542 mkdir -p arrayglob
> > 543 touch arrayglob/{one,two,three,four,five,six,seven}
> > 544 fn() {
> > 545 typeset array=(arrayglob/[tf]*)
>
> Out of curiosity, what file system is this on?

Both filesystems are btrfs on LVM. The failing system is also using
LUKS.

Toggle quote (2 lines)
>
> Ludo’.
L
L
Leo Famulari wrote on 22 Jan 2016 21:43
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 22420@debbugs.gnu.org)
20160122204306.GA27866@jasmine
On Fri, Jan 22, 2016 at 03:38:54PM -0500, Leo Famulari wrote:
Toggle quote (17 lines)
> On Fri, Jan 22, 2016 at 09:34:39PM +0100, Ludovic Courtès wrote:
> > Leo Famulari <leo@famulari.name> skribis:
> >
> > > I thought that perhaps it was referring to B02typeset.ztst, but I don't
> > > think there is anything related in that area of the file:
> > > 540 (
> > > 541 setopt glob
> > > 542 mkdir -p arrayglob
> > > 543 touch arrayglob/{one,two,three,four,five,six,seven}
> > > 544 fn() {
> > > 545 typeset array=(arrayglob/[tf]*)
> >
> > Out of curiosity, what file system is this on?
>
> Both filesystems are btrfs on LVM. The failing system is also using
> LUKS.

Well, actually, that only describes /home, which is perhaps not
relevant, although I did try and fail to build in a `guix environment
zsh` "by hand" in /home on the failing machine.

Failing system (separate /tmp):
/tmp /dev/mapper/bad--vg-tmp on /tmp type ext4 (rw,relatime,stripe=4,data=ordered)

Working system (/tmp on /):
/dev/mapper/good--vg-root on / type ext4 (rw,relatime,errors=remount-ro,data=ordered)

Toggle quote (6 lines)
>
> >
> > Ludo’.
>
>
>
L
L
Ludovic Courtès wrote on 23 Jan 2016 11:51
(name . Leo Famulari)(address . leo@famulari.name)(address . 22420@debbugs.gnu.org)
87oacczhzx.fsf@gnu.org
Leo Famulari <leo@famulari.name> skribis:

Toggle quote (18 lines)
> On Fri, Jan 22, 2016 at 03:38:54PM -0500, Leo Famulari wrote:
>> On Fri, Jan 22, 2016 at 09:34:39PM +0100, Ludovic Courtès wrote:
>> > Leo Famulari <leo@famulari.name> skribis:
>> >
>> > > I thought that perhaps it was referring to B02typeset.ztst, but I don't
>> > > think there is anything related in that area of the file:
>> > > 540 (
>> > > 541 setopt glob
>> > > 542 mkdir -p arrayglob
>> > > 543 touch arrayglob/{one,two,three,four,five,six,seven}
>> > > 544 fn() {
>> > > 545 typeset array=(arrayglob/[tf]*)
>> >
>> > Out of curiosity, what file system is this on?
>>
>> Both filesystems are btrfs on LVM. The failing system is also using
>> LUKS.

OK. Btrfs often behaves differently from ext4, exhibiting issues in
various places.

The above test uses uses readdir(2) and friends to test glob patterns,
so this could be an area where Btrfs yields different results.

But anyway, you said /tmp is not on Btrfs.

Toggle quote (10 lines)
> Well, actually, that only describes /home, which is perhaps not
> relevant, although I did try and fail to build in a `guix environment
> zsh` "by hand" in /home on the failing machine.
>
> Failing system (separate /tmp):
> /tmp /dev/mapper/bad--vg-tmp on /tmp type ext4 (rw,relatime,stripe=4,data=ordered)
>
> Working system (/tmp on /):
> /dev/mapper/good--vg-root on / type ext4 (rw,relatime,errors=remount-ro,data=ordered)

I’m not sure what could happen here. Could you try to analyze the test
log and see what exactly is failing? Once you’ve done that, you could
try to strace the test on both the “good” and the “bad” file system, to
spot the difference.

Alternately, you could leave that for upstream to solve. ;-)

Thanks,
Ludo’.
L
L
Ludovic Courtès wrote on 10 Feb 2016 22:01
control message for bug #22420
(address . control@debbugs.gnu.org)
87pow4jn59.fsf@gnu.org
tags 22420 moreinfo
L
L
Leo Famulari wrote on 10 Sep 2018 02:10
Re: Zsh test failure
(address . 22420-done@debbugs.gnu.org)
20180910001053.GA19833@jasmine.lan
This issue seems to have resolved itself.
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEsFFZSPHn08G5gDigJkb6MLrKfwgFAluVtowACgkQJkb6MLrK
fwjKHg//RZ5QA7sjYNUjhEug1S0es0wMqXu97ks4yK+E2qPXSmXYJddbZJyN8ziP
o9pQpM0BONbiOwT8c83BE+cmHzyuLexomsQIZoWd0ty3Eb8C4HJbu9g8wYT0BWu8
ahv40xxwDX9tm/VBF74mEo6rPBnSz7acbyY2HRd36xJc2mwxUI28Iy2kx2TPayrU
wIF4trp2eluJ1jjqDsDqZLtIZ6EFfdjURsv+VFu20DnEyr43X+Q64sahhG7VYwgS
upvOCfhpdNpVTUapjReG0Q4W9vOr1c3ehKzpcz+A9sPgodseDmSMpKVrOb9PCu9b
o6rzbEn4wL0ud9BjZej8iw3jJbS/tqpIwerL8FbMmmqFEnLxklLfcfCo8YAs8/Eu
PAmvn75OxXgza8gFIfdo11ALc5Q8MgSkvsmlohJU7Koinx8qkpyarmrkhi85xh07
BVGYM3tx/x9x5qI8ncErIxsWWTkrcX/0p8YOBzZXRRKWWnekS0KR4Ij4+Kxzn2/h
dVXmY/ZxDUr5HvX1HyyJZG/D/QISym4dzQh17WwDKB/sb//ZEBEAk+WmKxY+oXph
QD+uBLDddoItWLuaGPxM5uivOq8oST9YpRjes2js0d+KENlSDZGL/rW7DDRQQ/QF
SbDU/NHYCiwBwdrHEqQzfAgdtYqZ6AJNkfSvgZtFyk23U2Loyig=
=d6JX
-----END PGP SIGNATURE-----


Closed
?