12to11/tests/README
hujianwei 0bdc502068 Fix text input bugs with grabbed popups and bugs found by new tests
* 12to11-test.xml (test_manager) <error>: Add
invalid_user_time.
<get_serial, serial> New request and event.
(test_seat_controller) <set_last_user_time>: New request.

* compositor.h (struct _TextInputFuncs): Make `filter_input'
return keycode.
* data_device.c (DestroyReference): Check if reference device is
detached before unlinking reference.
* seat.c (LookupKeysym): Delete function.
(DispatchKey): Use keycodes instead.
(XLSeatExplicitlyGrabSurface): Avoid using owner-events keyboard
grab.

* select.c (struct _SelectionOwnerInfo, HandleSelectionRequest):
Allow CurrentTime in selection requests.  Compensate for
wraparound as well.
(OwnSelection, DisownSelection): Use Timestamp instead of Time.
* test.c (GetSerial): New function.
(test_manager_impl): Add new function.
* test_seat.c (SetLastUserTime): New function.
(seat_controller_impl): Add new function.
* tests/Imakefile (LOCAL_LIBRARIES): Remove GBM and DRM.
(SRCS10, OBJS10, SRCS11, OBJS11): New variables.
(dmabuf_test): Only link this program with GBM and DRM.
(PROGRAMS): Add select_test, select_helper.
(select_test, select_helper): New programs.

* tests/README: Document that select_test needs to be run under
vfb.
* tests/run_tests.sh: Add TODO note.
* tests/svnignore.txt: Add select_test and select_helper.
* tests/test_harness.c (handle_test_manager_serial): New
function.
(test_manager_listener): Add new function.
(open_test_display): Clear display->seat.
(test_get_serial): New function.

* tests/test_harness.h (struct test_display): New function
`serial'.

* text_input.c (CreateIC): Improve debugging code.
(CalculateKeycodeForEvent): Move earlier.
(FilterInputCallback): Handle keycodes here as well.
(XLTextInputDispatchCoreEvent): Add more debugging code.

* xdata.c (SelectSelectionInput): Obtain server time here.
(XLOwnDragSelection, NoteLocalSelectionFooter): Convert times to
Timestamp.
2022-11-12 03:51:21 +00:00

26 lines
1.2 KiB
Text

This directory holds some work-in-progress code for testing the
protocol translator. The current test suite is nowhere near
comprehensive.
Each test must be individually run on a system with an a8r8g8b8
visual, GLOBAL_SCALE and OUTPUT_SCALE set to 1. They also rely on
reference data; if some legitimate changes are made that affect test
results, then the tests should be run with TEST_WRITE_REFERENCE=1,
which will make the test binaries write out reference data to disk.
When tests are being run, the tester must be very careful to not
interfere with the test operation by moving or resizing the test
window. A compositing manager should be running along with the test.
These tests are supposed to test the functionality of the protocol
translator by connecting to a running instance and validating the
results of various high-level requests. In modern parlance, they
would be ``integration tests''.
Most likely, you do not want to run these tests manually, as the
`run_tests.sh' script does all the setup for you.
Please note that the EGL renderer currently does not pass some
graphics tests, which is expected behavior, and that `select_test'
must be run with no clipboard manager (or any other clients, for that
matter) running.