[PATCH] xts5: Fix Xlib3/XOpenDisplay-10 by using an invalid TCP hostname

Geoff Clare gwc at opengroup.org
Wed May 2 07:33:02 PDT 2012


Aaron Plattner <aplattner at nvidia.com> wrote, on 01 May 2012:
>
> On 05/01/2012 02:56 AM, Geoff Clare wrote:
> >Aaron Plattner<aplattner at nvidia.com>  wrote, on 30 Apr 2012:
> >>
> >>XOpenDisplay-10 calls XOpenDisplay(NULL) and expects it to fail.  This is bogus;
> >>in fact XOpenDisplay-5 asserts exactly the opposite.
> >
> >No, XOpenDisplay-10 does not call XOpenDisplay(NULL).  It calls it
> >with the value of config.displayhost.  If this is NULL when you ran
> >the test, then that is a configuration mistake on your test system.
> >
> >The test has used this strategy since it was first written in 1995.
> >If there was a problem of the magnitude you claim, it would have been
> >spotted and corrected many years ago.
> >
> >>Instead, check for TCP support and then use a TCP display string with a bogus
> >>hostname.
> >
> >The changes make the assertion testable only on POSIX systems that
> >support TCP.  It would be better just to change the test code to
> >check that config.displayhost is not NULL (and call delete() with
> >a suitable message if it is), so that the assertion remains testable
> >on all systems.
> 
> D'oh, you're right.  The problem was that I was running the
> XOpenDisplay test by itself rather than via xts-run, which is not
> something one could do in 1995 (and arguably shouldn't be able to do
> today).  I'll send out a change to make it return UNTESTED or
> UNRESOLVED rather than FAIL in that case, along with a new test that
> tries "nowhere.invalid.:0" on POSIX + TCP systems.

Sounds good.

> Do you think delete() (with makes it UNRESOLVED) or untested() would
> be more appropriate?

Definitely delete().  UNTESTED is an acceptable result for conformance
purposes, whereas UNRESOLVED is not.

> Is there a description somewhere of when the
> various result codes should be used?

There is some useful info about result codes in the VSW programmers'
guide.  Unfortunately the copyright doesn't allow me to redistribute
that guide.  However, it's based on the original UniSoft/MIT Xtest
programmers' guide, which has an MIT style licence, and the
relevant section ("Assigning result codes") looks to be the same.
I've attached the whole thing in case the rest of it is of use, but
bear in mind that some things will be out of date, particularly
with regard to additions made to the test suite by ApTest.

It's written in troff using the mm macros, and needs pre-processing
with tbl.

-- 
Geoff Clare <g.clare at opengroup.org>
The Open Group, Apex Plaza, Forbury Road, Reading, RG1 1AX, England
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xtest_progguide.tar.gz
Type: application/octet-stream
Size: 31871 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-test/attachments/20120502/6cf86c9c/attachment-0001.obj>


More information about the xorg-test mailing list