-
Notifications
You must be signed in to change notification settings - Fork 29
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
Create unit tests for hypercalls #808
Comments
I am considering the option of creating a I believe that doing so would bring massive benefits by minimizing code duplication and making it easier for changes in our benchmarks to have benefits for our testing too. Anyways, I opened this issue because this is not a priority at this very second and don't want to forget. |
I don't really get what you want to achive. The code snippet looks like a good unit-test for the
I'm also adding functionality that is only required for tests (c9ab783 - not merged yet). But I think it is sufficient to feature gate them with |
Hm, let's just implement tests first, see how much code we reuse and how we do it, and then make an informed decision on how to adapt the codebase so as to reduce reuse. Let's just go with that. |
Then I'll close this issue? |
I think the best time to close it is when the unit tests are implemented? I think I slightly derailed the conversation by talking about the "how". |
I'm currently working on benchmarks that directly invoke hypercalls (without the presence of a
UhyveVm
, so as to measure "pure" performance without a vCPU and a VM). This method could be reused again to verify that hypercalls work as expected, as we test functions likevirt_to_phys
but not whether thelibc::
functions we invoke to interact with the filesystem of a target operating system work as expected - we only use integration tests for those, which only run on an Ubuntu host, are computationally heavy and make it harder to spot regressions.Currently, my very rough proof of concept - which is how a unit test could look like - looks somewhat like this:
The text was updated successfully, but these errors were encountered: