The virtio tests for block and network are using metrics to check for invalid states. The problem with using metrics in unit tests is that it makes it impossible to run the tests in parallel. The network implementation already has a TestMutator which can also be used to add per test counters. The same approach can be used for testing block devices.
For example, instead of checking that the value of METRICS.block.activate_fails is one when activation fails, we could instead define an activate_fails counter in the test mutators, increment it on bad activate and check this value in test.
This should be implemented after the refactoring/epoll_handler branch is merged to master.
Hi! Is this issue still open to be worked on? My partner and I are students from UT Austin, and we were wondering if we could tackle this as a good first issue for our virtualization class?
The virtio tests for block and network are using metrics to check for invalid states. The problem with using metrics in unit tests is that it makes it impossible to run the tests in parallel. The network implementation already has a
TestMutator
which can also be used to add per test counters. The same approach can be used for testing block devices.For example, instead of checking that the value of
METRICS.block.activate_fails
is one when activation fails, we could instead define anactivate_fails
counter in the test mutators, increment it on bad activate and check this value in test.This should be implemented after the
refactoring/epoll_handler
branch is merged tomaster
.