use of tet_fork (hard part)
Geoff Clare
gwc at opengroup.org
Mon Apr 24 12:21:54 EEST 2006
I wrote, on 07 Apr 2006:
>
> I don't understand why Jamey's change didn't work either, but I
> have tried an alternative fix which still passes for me. The basic
> idea is to move the XCheckWindowEvent() on client2 into the child.
> The actual changes are more complicated because of the need to
> rearrange the path checking. I also changed the opendisplay() to
> a direct XOpenDisplay() to avoid the same problem that Jamey fixed
> in grbsrvr.m and ungrbsrvr.m.
It turns out that this patch causes a problem in later "last close"
tests because it leaves client2 open in the parent.
This is easy to fix for POSIX systems - just close the file descriptor
ConnectionNumber(client2) - but that won't work for non-POSIX systems.
The patch below just calls XCloseDisplay(client2) on non-POSIX
systems, which means the original problem will still exist on
non-POSIX systems but hopefully the chances of the tests being run on
a non-POSIX system which has the problem Jamey originally reported are
small. (I'm not even sure if the test suite is still usable on
non-POSIX systems, although it was originally designed to be.)
Note that this is an incremental patch - it needs to be applied after
the first patch.
--
Geoff Clare <g.clare at opengroup.org>
The Open Group, Thames Tower, Station Road, Reading, RG1 1LX, England
--- clsdsply.m.patch1 2006-04-07 11:59:00.000000000 +0100
+++ clsdsply.m.new 2006-04-24 10:02:29.000000000 +0100
@@ -494,6 +494,20 @@
if (t006p_pass == 1)
CHECK;
+ /*
+ * We need to close client2 otherwise it interferes with
+ * later "last close" tests. On POSIX systems we can
+ * directly close the underlying fd. On other systems
+ * we use XCloseDisplay() and hope that the fact it was
+ * used in the child doesn't cause a problem.
+ */
+ if(config.posix_system == 1) {
+ close(ConnectionNumber(client2));
+ }
+ else {
+ XCloseDisplay(client2);
+ }
+
CHECKPASS(2);
>>ASSERTION Good B 1
More information about the xorg-test
mailing list