]> git.proxmox.com Git - mirror_qemu.git/commit
tests: refactor file monitor test to make it more understandable
authorDaniel P. Berrangé <berrange@redhat.com>
Thu, 14 Mar 2019 14:45:08 +0000 (14:45 +0000)
committerDaniel P. Berrangé <berrange@redhat.com>
Tue, 2 Apr 2019 12:46:33 +0000 (13:46 +0100)
commitb26c3f9cbd784a5f7db68049fd9c49a0a2077734
tree0d5f60a709365de7d7aaa8a1320a5eeb78a84779
parentd61d1a1fb2f1db6c54651844a28389c523f3f8c7
tests: refactor file monitor test to make it more understandable

The current file monitor unit tests are too clever for their own good
making it hard to understand the desired output.

Instead of trying to infer the expected events, explicitly list the
events we expect in the operation sequence.

Instead of dynamically building a matrix of tests, just have one giant
operation sequence that validates all scenarios in a single test.

Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
tests/test-util-filemonitor.c