From: Peter Stephenson <pws@pwstephenson.fsnet.co.uk>
To: Zsh workers <zsh-workers@sunsite.auc.dk>
Subject: Re: zsh tests (dev-15)
Date: Wed, 19 Jan 2000 19:55:18 +0000 [thread overview]
Message-ID: <E12B18w-0007Wp-00.2000-01-19-19-51-50@cmailg2.svr.pol.co.uk> (raw)
In-Reply-To: "Oliver Kiddle"'s message of "Wed, 19 Jan 2000 13:29:53 GMT." <3885BC51.95C9BD60@u.genie.co.uk>
Oliver Kiddle wrote:
> I've never looked at the new tests before but thought I'd run them
> today. They all pass except one in 07cond.ztst: [[ -e /dev/fd/0 ]]
> fails. I thought that this /dev/fd/0 stuff was Linux specific (I'm using
> AIX 3.2) so what is it doing as part of the zsh tests? Is zsh trying to
> emulate them on other systems? If so, maybe AIX's /dev/fd0 and similar
> devices (which I think are for the floppy drive) are getting in the way?
Yes, it's supposed to be emulated: the conditional expressions part of the
manual says:
In each of the above expressions, if file is of the form
`/dev/fd/n', where n is an integer, then the test applied
to the open file whose descriptor number is n, even if the
underlying system does not support the /dev/fd directory.
so something on your system is confusing it (unless, of course, you're
really running the test with no stdin). There's a run-time test for
this in cond.c:getstat():
/* /dev/fd/n refers to the open file descriptor n. We always use fstat *
* in this case since on Solaris /dev/fd/n is a device special file */
if (!strncmp(s, "/dev/fd/", 8)) {
if (fstat(atoi(s + 8), &st))
return NULL;
return &st;
}
There doesn't look to be much to go wrong, but somehow you seem to be
getting NULL here. (Actually, there's a lie in the manual page since the
code doesn't care if there's an integer next or not, but it's not
disastrous.)
I'd appreciate any help I can get with system-specific fixes for the tests,
I'm pretty much limited to Linux most of the time at the moment.
--
Peter Stephenson <pws@pwstephenson.fsnet.co.uk>
next prev parent reply other threads:[~2000-01-19 19:52 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-01-19 13:29 Oliver Kiddle
2000-01-19 19:26 ` Clint Adams
2000-01-19 19:55 ` Peter Stephenson [this message]
2000-03-11 20:41 ` PATCH: " Oliver Kiddle
2000-03-12 4:12 ` Bart Schaefer
2000-03-12 22:21 ` PATCH: " Bart Schaefer
2000-03-13 14:36 ` Zefram
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E12B18w-0007Wp-00.2000-01-19-19-51-50@cmailg2.svr.pol.co.uk \
--to=pws@pwstephenson.fsnet.co.uk \
--cc=zsh-workers@sunsite.auc.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).