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

Geoff Clare gwc at opengroup.org
Tue May 1 02:56:18 PDT 2012


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.

-- 
Geoff Clare <g.clare at opengroup.org>
The Open Group, Apex Plaza, Forbury Road, Reading, RG1 1AX, England


More information about the xorg-test mailing list