tests: Test that an overlong message is rejected

If one runs the test case without the fix for
d074d52902 ("connection: Dynamically resize connection buffers"), the
server spins and never processes the message.  The test eventually times
out.  With the fix, a protocol error is delivered to the client and the
test finishes immediately.  The test covers both the default 4096-byte
buffer size and the case where the buffer size is large enough for the
message, but the message itself exceeds the 4096-byte limit.  Both are
rejected.

The test relies on the definition of struct wl_proxy, so this definition
is moved to a client-specific private header.  The definition itself is
not changed in any way.

Signed-off-by: Demi Marie Obenour <demi@invisiblethingslab.com>
This commit is contained in:
Demi Marie Obenour 2024-08-14 21:14:49 -04:00 committed by Demi Marie Obenour
parent cd0d1543c0
commit 3872a9362e
5 changed files with 195 additions and 57 deletions

View file

@ -75,6 +75,8 @@ struct client *client_connect(void);
void client_disconnect(struct client *);
int stop_display(struct client *, int);
void noop_request(struct client *);
void long_request(struct client *c, struct wl_array *a);
void set_buffer_size(struct client *c, uint32_t size);
/**
* Usual workflow: