Patchwork [2/2] test: reset the client before checking the swapped version

login
register
mail settings
Submitter Peter Hutterer
Date March 26, 2012, 12:36 a.m.
Message ID <1332722198-32229-2-git-send-email-peter.hutterer@who-t.net>
Download mbox | patch
Permalink /patch/9644/
State Accepted
Commit 641a1b9363d59808d2586f9e84847ccc69701482
Headers show

Comments

Peter Hutterer - March 26, 2012, 12:36 a.m.
As of 2c23ef83b0e03e163aeeb06133538606886f4e9c, the server returns BadValue
for the same client with multiple versions. Avoid this by resetting the
client before we issue the same request as a fake swap client.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
---
 test/xi2/protocol-xiqueryversion.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

Patch

diff --git a/test/xi2/protocol-xiqueryversion.c b/test/xi2/protocol-xiqueryversion.c
index 3d50fa8..2552307 100644
--- a/test/xi2/protocol-xiqueryversion.c
+++ b/test/xi2/protocol-xiqueryversion.c
@@ -115,6 +115,7 @@  request_XIQueryVersion(int smaj, int smin, int cmaj, int cmin, int error)
     rc = ProcXIQueryVersion(&client);
     assert(rc == error);
 
+    client = init_client(request.length, &request);
     client.swapped = TRUE;
 
     swaps(&request.length);