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

Refactor virtio tests #1568

Closed
Tracked by #1569
andreeaflorescu opened this issue Feb 2, 2020 · 2 comments
Closed
Tracked by #1569

Refactor virtio tests #1568

andreeaflorescu opened this issue Feb 2, 2020 · 2 comments
Labels
Good first issue Indicates a good issue for first-time contributors Priority: Low Indicates that an issue or pull request should be resolved behind issues or pull requests labelled ` Status: Parked Indicates that an issues or pull request will be revisited later Type: Fix Indicates a fix to existing code

Comments

@andreeaflorescu
Copy link
Member

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.

@alindima alindima added Priority: Low Indicates that an issue or pull request should be resolved behind issues or pull requests labelled ` Good first issue Indicates a good issue for first-time contributors labels Mar 8, 2022
@jeffreyxie0615
Copy link

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?

@JonathanWoollett-Light JonathanWoollett-Light added Type: Fix Indicates a fix to existing code and removed Quality: Automated Testing labels Mar 23, 2023
@zulinx86 zulinx86 added the Status: Parked Indicates that an issues or pull request will be revisited later label Jun 20, 2024
@roypat
Copy link
Contributor

roypat commented Nov 13, 2024

The virtio block and net tests in particular no longer run into the problem described here since the introduction of per-device metrics. Some other devices, specifically rng and vsock, do still have the issue, but in #4709 we've decided that the way for making those unittests parallelizable is by extending the per-device metrics concept to them. I'm close this ticket because of that

@roypat roypat closed this as not planned Won't fix, can't repro, duplicate, stale Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Good first issue Indicates a good issue for first-time contributors Priority: Low Indicates that an issue or pull request should be resolved behind issues or pull requests labelled ` Status: Parked Indicates that an issues or pull request will be revisited later Type: Fix Indicates a fix to existing code
Projects
None yet
Development

No branches or pull requests

6 participants