Xpra: Ticket #1773: better unit tests for mixins
Follow up from #1761. See also #1778
We already have basic unit tests for client and server mixins:
- r18558 server: mmap and remote logging
- r18534 client: mmap and network state
- r18535 client: remote logging
Only getting good test coverage will ensure that each mixin is independent from the others.
Wed, 28 Mar 2018 05:22:39 GMT - Antoine Martin: status, description changed
- status
changed from new to assigned
- description
modified (diff)
Wed, 10 Jul 2019 11:20:17 GMT - Antoine Martin:
- r23106 adds an audio client mixin test, new issues to deal with:
- duplication of
self._remote_machine_id
- python2 segfaults (meh)
- first audio packets may come out of order! ('sound-data' before 'sound-control')
- r23107 split test
- r23108 adds a clipboard test, new issues:
- run under X11 - needs to start a new display
- verify clipboard state externally? (using xclip?)
Wed, 10 Jul 2019 15:58:41 GMT - Antoine Martin:
Added more client mixins tests - now mostly complete (just without rpc test):
Still TODO:
- test multiple times with different options combinations / different server capabilities
- test coverage
- server mixins tests
Wed, 10 Jul 2019 19:41:59 GMT - Antoine Martin:
Server mixins tests:
- r23120 refactoring + audio test
- r23121 refactoring
- r23122 child commands - needs
_upgrading
flag and session_name
..
- r23123 mixin test improvements for:
- r23125 clipboard
- r23126 display manager needs
_server_sources
- r23127 encoding
- r23128 file-print
- r23129 input needs
_server_sources
- r23131 network state
- r23132 notification forwarder needs
_server_sources
- r23133 webcam
- r23134 window server
New tasks:
- source mixin tests
- parse some network packets
- control commands: split them up?
Tue, 16 Jul 2019 09:06:09 GMT - Antoine Martin:
- r23139 refactoring so we can test packets without an actual connection
- r23140 re-order mixins init to make them more resilient
- r23141 test sending audio packets. (audio mixin cannot assume that
machine_id
or uuid
exist)
- r23142 test starting a new command and then sending it a signal
- r23143 encoding mixin - cannot assume that
_idle_refresh_all_windows
, send_windows
and ui_client
exist (heavy dependency on window mixin)
- r23144 fixup file-print test
- r23147 remote-logging packet test
- r23149 fixes a huge bug in the ping / client-latency calculations
- r23151 all network state packets - cannot assume we have statistics object
- r23152 test notification packets
- r23155 + r23157 move file-print and network-state packet handlers out of the UI thread
- r23156 logging locking and cleanup
New tasks:
- display, input and clipboard tests need to start their own display
- file-print: needs to send chunks and verify file gets created
- input test: could be used to test character sets and foreign keyboard layouts (hard!)
- notification code needs to be moved to a source mixin
Wed, 17 Jul 2019 06:00:23 GMT - Antoine Martin:
Updates:
- r23166 fixes a test error in the command-server test now that we pass a fake source mixin to the server mixin
- r23167 + r23168: fix stop audio from client using sequence number, allowing:
- r23169 audio client test made deterministic thanks to fixes above
- r23170 audio server prevents spurious audio packets after stop request
Updated TODO:
- audio needs test mp3 data to test receiving
- verify all server source mixins have a server test
- control commands
- file-print: needs to send chunks and verify file gets created
- many tests need to start an X11 display
- test coverage: #2356
- test multiple times with different options combinations / different server capabilities
- combine client and server mixins in one test: #2357
- input test: could be used to test character sets and foreign keyboard layouts (hard!)
- notification code needs to be moved to a source mixin
Mon, 22 Jul 2019 15:28:15 GMT - Antoine Martin: status changed; resolution set
- status
changed from assigned to closed
- resolution
set to fixed
Test updates:
- audio:
- wayland vs x11 issues: r23176, r23250 (fix for win32..)
- cleanups / cosmetic: r23177, r23178, r23186, r23192, r23194, r23195, r23196, r23197, r23208, r23209, r23210, r23216, r23217, r23222, r23234, r23248, r23249, r23251, r23258, r23259
- refactoring: r23181, r23184, r23185, r23187, r23190, r23191, r23199, r23254
- clipboard: r23179, r23219 (python3 support), r23232
- display fix: r23182
- network state fixes: r23183, r23207 (warning)
- tests that require a vfb: r23180, r23211, r23212, r23231
- authentication test fixes (python3): r23188
- socket tests (python3 fixes etc): r23189
- x11 bindings usage bug fix: r23193
- webcam tests: r23198
- file-print needs fake sockets: r23201
- new test for util modules: r23220
AtomicInteger
, r23221, r23238 (bugs fixed in r23237 + r23240)
- build / packaging updates: r23235
- notifications test gets its own dbus instance: r23253
- bandwidth-limit: r23257
Bugs found:
- cython rectangle tests no longer fired after refactoring: r23224, r23225
- fd leak bug: r23202
- invalid command bug: r23204
- clipboard: r23215
- server startup failure handling: r23223
- ssl test failures: r23226
- python3 server socket upgrade failures: r23228 (+r23229 logging error)
- win32 new
monotonic_time
code was wrong: r23233
- don't allow invalid bandwidth limits: r23236
Will follow up in #2356, #2357 and #2362.
Sat, 23 Jan 2021 05:33:24 GMT - migration script:
this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/1773