Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

better unit tests for mixins #1773

Closed
totaam opened this issue Feb 23, 2018 · 6 comments
Closed

better unit tests for mixins #1773

totaam opened this issue Feb 23, 2018 · 6 comments

Comments

@totaam
Copy link
Collaborator

totaam commented Feb 23, 2018

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.

@totaam
Copy link
Collaborator Author

totaam commented Jul 10, 2019

2019-07-10 12:20:18: antoine commented


  • 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?)

@totaam
Copy link
Collaborator Author

totaam commented Jul 10, 2019

2019-07-10 16:58:41: antoine commented


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

@totaam
Copy link
Collaborator Author

totaam commented Jul 10, 2019

2019-07-10 20:41:59: antoine commented


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?

@totaam
Copy link
Collaborator Author

totaam commented Jul 16, 2019

2019-07-16 10:06:10: antoine commented


  • 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

@totaam
Copy link
Collaborator Author

totaam commented Jul 17, 2019

2019-07-17 07:00:23: antoine commented


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: unit test coverage #2356
  • test multiple times with different options combinations / different server capabilities
  • combine client and server mixins in one test: client-server mixin tests #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

@totaam
Copy link
Collaborator Author

totaam commented Jul 22, 2019

2019-07-22 16:28:15: antoine commented


Test updates:

  • audio:

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant