Commit Graph

4 Commits

Author SHA1 Message Date
Olivier Fourdan 05e54fefaf test: Fix xsync test
The xsync test is relying on the values being changed even in the case
of a BadMatch value.

Typically, it updates the delta but does not update the test type
comparison, so when passing a negative value, it generates a BadMatch.

That's actually not correct, and that will fail with the new fixes that
check the validity of the values prior to apply the changes.

Fix the test by updating the test type as needed.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1835>
2025-02-25 19:25:40 +01:00
Enrico Weigelt, metux IT consult b4f0c1abd5 test: sync: don't use VLA
The array size is fixed anyways, so we can use a symbol instead
of variable.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1819>
2025-02-20 17:28:01 +01:00
Adam Jackson 041f25afa8 test: const correctness fix
../test/sync/sync.c: In function ‘main’:
../test/sync/sync.c:288:40: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
     xcb_query_extension_reply_t *ext = xcb_get_extension_data(c, &xcb_sync_id);
                                        ^~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2017-10-04 11:19:09 -04:00
Eric Anholt 5cbfa27654 test: Add basic SYNC tests.
I couldn't find any, and I was modifying the implementation, so I had
to write some.  I would like the test to end with a "make sure there
weren't any stray unchecked errors", but I didn't figure out how to do
that.

v2: Extend sync tests to cover alarm delta and waitvalue changes.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2017-09-20 13:19:27 -04:00