Bug 4565

Summary: all TOO_LONG tests fail if the X server can support BIG-REQUEST extension
Product: Xtests Reporter: Rui Feng <fengrui>
Component: XTSAssignee: Aaron Plattner <aplattner>
Status: RESOLVED FIXED QA Contact: Xorg testing team <xorg-test>
Severity: normal    
Priority: high Keywords: patch
Version: unspecified   
Hardware: x86 (IA32)   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: proposed patch of src/libproto/MakeReq.c

Description Rui Feng 2005-09-23 00:09:02 UTC
When the X server can support BIG-REQUEST extension, all TOO_LONG tests of
XProto* section will fail. The reason comes from two ways:
1. X server cannot process the big request correctly. See detail for bugid 4550
(https://bugs.freedesktop.org/show_bug.cgi?id=4550)

2. It should set the rp->length field to be 0 if the request is TOO_LONG type
and the X server can support BIG-REQUEST extension.
Comment 1 Rui Feng 2005-09-23 00:09:40 UTC
Created attachment 3375 [details] [review]
proposed patch of src/libproto/MakeReq.c
Comment 2 Corbin Simpson 2010-03-27 04:22:32 UTC
*** Bug 4550 has been marked as a duplicate of this bug. ***
Comment 3 Corbin Simpson 2010-03-27 04:23:26 UTC
Tagging for patch; will triage later.
Comment 4 Aaron Plattner 2010-09-12 10:37:32 UTC
This should be fixed as of this commit:


commit cf88363db0ebb42df7cc286b85d30d7898aea840
Author: Aaron Plattner <aplattner@nvidia.com>
Date:   Fri Aug 27 10:20:29 2010 -0700

    os: Return BadLength instead of disconnecting BigReq clients (#4565)
    
    If a client sends a big request that's too big (i.e. bigger than
    maxBigRequestSize << 2 bytes), the server just disconnects it.  This makes the
    client receive SIGPIPE the next time it tries to send something.
    
    The X Test Suite sends requests that are too big when the test specifies the
    TOO_LONG test type.  When the client receives SIGPIPE, XTS marks it as
    UNRESOLVED, which counts as a failure.
    
    Instead, remember how long the request is supposed to be and then return that
    size.  Dispatch() checks the length and sends BadLength to the client.  Then,
    whenever oci->ignoreBytes is nonzero, ignore the data read instead of trying to
    process it as a request.
    
    Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
    Reviewed-by: Keith Packard <keithp@keithp.com>
    Signed-off-by: Keith Packard <keithp@keithp.com>

 os/io.c    |   27 ++++++++++++++++++++++++---
 os/osdep.h |    1 +
 2 files changed, 25 insertions(+), 3 deletions(-)

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.