Email List: Xaustin-group-lX
[All Lists]

Re: Re: Re: Re: Defect in XCU test

To: yyyyyyyyyyyyyy@xxxxxxxxxxxxx
Subject: Re: Re: Re: Re: Defect in XCU test
From: Geoff Clare <yyy@xxxxxxxxxxxxx>
Date: Tue, 3 Jun 2003 09:36:39 +0100
References: <200306020902.h52922aC029662@burner.fokus.fraunhofer.de> <200306021932.h52JWZG58958@yogi.austin.ibm.com>
Marc Stephenson <yyyy@xxxxxxxxxxxxxx> wrote, on 02 Jun 2003:
>
> > >    -f pathname
> > >   True if pathname resolves to a file that exists and is a regular
> > >   file.  False if pathname resolves to a file that does not exist,
> > >   or if pathname cannot be resolved, or if pathname resolves to a
> > >   file that exists but is not a regular file.
> > 
> > That sounds good.
> 
> Whatever change is made needs to cover all of the file existence tests, not
> just -f.  I'd hope that the language could be more succinct than repeating 
>that
> verbiage for all the existence tests (-b, -c, -d, -e, -f, -g, -h, -L, -p,
> -r, -S, -s, -u, -w, -x).   

My aardvark does exactly that.  Personally I prefer to see every possibility
covered explicitly, at the expense of a little verbosity.  If some detail
is omitted it increases the chances that someone will misinterpret the text.

> Try this:
> -f pathname
> True if pathname can be resolved to a file that exists and is a regular file.

That is almost as inadequate as the current text.  At the very least it
needs an "otherwise false" added.

> I don't really see a need to explicitly the false condition with that wording.

It is absolutely essential to state something about the false condition.
Without it, the standard *does not* specify the behaviour for those cases.
Only common sense and intuition tell you that the value would be false,
but the standard cannot and must not rely on those.  Based on a strict
reading of the text, an implementor whose test utility always
evaluates "-f file" as true regardless of whether the file exists
would be able to claim that it is compliant, and they would be right.

-- 
Geoff Clare
The Open Group, Apex Plaza, Forbury Road, Reading, RG1 1AX, England
Email: yyyyyyy@xxxxxxxxxxxxx   Tel: +44 118 9508311

<Prev in Thread] Current Thread [Next in Thread>