zsh-workers
 help / color / mirror / code / Atom feed
* Test suite failures on GNU Hurd: Test ../../Test/C02cond.ztst failed: bad status 1, expected 0
@ 2013-06-18 23:08 Axel Beckert
  2013-06-19  4:36 ` Bart Schaefer
  0 siblings, 1 reply; 3+ messages in thread
From: Axel Beckert @ 2013-06-18 23:08 UTC (permalink / raw)
  To: zsh-workers

Hi,

I just noticed that all zsh builds on Debian GNU/Hurd consistently
failed for one test (occassionally for others, too) in the test suite,
at least since 4.3.10 of 2009 and still fail with 5.0.2:

4.3.10 build from 2009:

../../Test/C02cond.ztst: starting.
Warning: Not testing [[ -b blockdevice ]] (no devices found)
Test ../../Test/C02cond.ztst failed: bad status 1, expected 0 from:
  # Use hardcoded /dev/tty because globbing inside /dev fails on Cygwin
  char=/dev/tty
  [[ -c $char && ! -c $zerolength ]]
Was testing: -c cond
../../Test/C02cond.ztst: test failed.

5.0.2 build from 2013:

../../Test/C02cond.ztst: starting.
Test ../../Test/C02cond.ztst failed: bad status 1, expected 0 from:
  # Use hardcoded /dev/tty because globbing inside /dev fails on Cygwin
  char=/dev/tty
  [[ -c $char && ! -c $zerolength ]]
Was testing: -c cond
../../Test/C02cond.ztst: test failed.

All builds on
https://buildd.debian.org/status/logs.php?pkg=zsh&arch=hurd-i386
(failed and succeeded ones; except those two of ancient zsh 4.0.x
releases) show this test suite failure.

But logging into a Debian GNU/Hurd box and running these checks on the
commandline, works as expected and correct (the return code is in the
prompt on the next line after the question mark):

!129 Z9 ?0 L1 abe@strauss:ttyp1 (-zsh) 23:19:03 [~] > uname -a
GNU strauss 0.3 GNU-Mach 1.3.99/Hurd-0.3 i686-AT386 GNU
!130 Z10 ?0 L1 abe@strauss:ttyp1 (-zsh) 23:19:07 [~] > touch foobar
!131 Z11 ?0 L1 abe@strauss:ttyp1 (-zsh) 23:19:08 [~] > ls -l foobar
-rw-rw-r-- 1 abe Debian 0 Jun 18 23:19 foobar
!132 Z12 ?0 L1 abe@strauss:ttyp1 (-zsh) 23:19:13 [~] > [[ -c foobar ]]
!133 Z13 ?1 L1 abe@strauss:ttyp1 (-zsh) 23:19:28 [~] > char=/dev/tty
!134 Z14 ?0 L1 abe@strauss:ttyp1 (-zsh) 23:19:33 [~] > [[ -c $char ]]
!135 Z15 ?0 L1 abe@strauss:ttyp1 (-zsh) 23:19:41 [~] > zerolength=foobar
!136 Z16 ?0 L1 abe@strauss:ttyp1 (-zsh) 23:19:46 [~] > [[ -c $char && ! -c $zerolength ]]
!137 Z17 ?0 L1 abe@strauss:ttyp1 (-zsh) 23:19:52 [~] > echo $ZSH_VERSION
4.3.10
!138 Z18 ?0 L1 abe@strauss:ttyp1 (-zsh) 23:20:50 [~] > 

I also got the same results with zsh 4.3.17 on Debian GNU/Hurd. (No
zsh 5.0.2 accessible on Hurd for me at the moment, and building takes
ages. :-)

I have been assured, that /dev/tty exists on all build daemons, so it
shouldn't be a non-existent /dev/tty.

So I wonder: Why does the test suite fail while -c seems to work fine
on the command line on GNU Hurd?

		Kind regards, Axel
-- 
/~\  Plain Text Ribbon Campaign                   | Axel Beckert
\ /  Say No to HTML in E-Mail and News            | abe@deuxchevaux.org  (Mail)
 X   See http://www.asciiribbon.org/              | abe@noone.org (Mail+Jabber)
/ \  I love long mails: http://email.is-not-s.ms/ | http://noone.org/abe/ (Web)


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Test suite failures on GNU Hurd: Test ../../Test/C02cond.ztst failed: bad status 1, expected 0
  2013-06-18 23:08 Test suite failures on GNU Hurd: Test ../../Test/C02cond.ztst failed: bad status 1, expected 0 Axel Beckert
@ 2013-06-19  4:36 ` Bart Schaefer
  2013-10-01 11:19   ` Axel Beckert
  0 siblings, 1 reply; 3+ messages in thread
From: Bart Schaefer @ 2013-06-19  4:36 UTC (permalink / raw)
  To: Axel Beckert, zsh-workers

On Jun 19,  1:08am, Axel Beckert wrote:
}
} So I wonder: Why does the test suite fail while -c seems to work fine
} on the command line on GNU Hurd?

I'm just guessing, but I suspect that because the automated build
process doesn't have a terminal, then /dev/tty doesn't stat as a char
device.  Yes, I know that seems unlikely.

Someone with access to the build could try replacing /dev/tty with
/dev/zero or /dev/random in that test; if that "fixes" it, then the
problem is with the implementation of /dev/tty ...


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Test suite failures on GNU Hurd: Test ../../Test/C02cond.ztst failed: bad status 1, expected 0
  2013-06-19  4:36 ` Bart Schaefer
@ 2013-10-01 11:19   ` Axel Beckert
  0 siblings, 0 replies; 3+ messages in thread
From: Axel Beckert @ 2013-10-01 11:19 UTC (permalink / raw)
  To: zsh-workers

Hi,

On Tue, Jun 18, 2013 at 09:36:20PM -0700, Bart Schaefer wrote:
> On Jun 19,  1:08am, Axel Beckert wrote:
> } So I wonder: Why does the test suite fail while -c seems to work fine
> } on the command line on GNU Hurd?
> 
> I'm just guessing, but I suspect that because the automated build
> process doesn't have a terminal, then /dev/tty doesn't stat as a char
> device.  Yes, I know that seems unlikely.

We've added a patch which uses the same technique as the -b test case
for finding a suitable tty device:

  find /dev/ -nowarn -maxdepth 1 -name 'tty*' -type c -print

Interestingly that yielded the following error mesage:

  find: `/dev/tty': No such device or address

So it seems to me that if you run a process without controlling
terminal on Hurd, find sees /dev/tty as directory entry, but gets an
error when it tries to stat() it for the "-type c" check.

I was able to prove this theory by connecting to a machine running
Debian GNU/Hurd by ssh but deliberately without a controlling terminal:

% ssh exodar.debian.net "ls -l /dev/" | grep 'tty$'
ls: cannot access /dev/tty: No such device or address
?????????? ? ?    ?       ?            ? tty
% 

This acutally looks like a bug in either libc on Hurd or the Hurd
kernel itself. So it's nothing that zsh should bother (except for the
failing tests of course :-).

> Someone with access to the build could try replacing /dev/tty with
> /dev/zero or /dev/random in that test; if that "fixes" it, then the
> problem is with the implementation of /dev/tty ...

Yes, that'd be my try for the next zsh upload to Debian.

(Actually I wanted to point out here that connecting to a buildd with
SSH gives your a controlling terminal when I remembered that it
doesn't give you a terminal by default if you pass a command as
parameter and suddenly I knew how to test the issue and so you've got
the details above. :-)

		Kind regards, Axel
-- 
/~\  Plain Text Ribbon Campaign                   | Axel Beckert
\ /  Say No to HTML in E-Mail and News            | abe@deuxchevaux.org  (Mail)
 X   See http://www.asciiribbon.org/              | abe@noone.org (Mail+Jabber)
/ \  I love long mails: http://email.is-not-s.ms/ | http://noone.org/abe/ (Web)


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-10-01 11:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-18 23:08 Test suite failures on GNU Hurd: Test ../../Test/C02cond.ztst failed: bad status 1, expected 0 Axel Beckert
2013-06-19  4:36 ` Bart Schaefer
2013-10-01 11:19   ` Axel Beckert

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).