-
Notifications
You must be signed in to change notification settings - Fork 107
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
Add negative tests for vcpu ioctls on aarch64 #116
Comments
does this issue still need to be worked on? @andreeaflorescu |
@anth1y yes, this is still relevant. We need to also provide negative tests (similar to those of x86) on aarch64. |
@andreeaflorescu thank you for getting back to me I'll take a look at this tonight. pardon my ignorance but what exactly is meant by "negative tests"? |
Here we were referring to having similar negative tests as the existing one on x86_64. The test is called That test is a "negative test" because it is using invalid FDs to check the return value of various ioctls. let faulty_vcpu_fd = VcpuFd {
vcpu: unsafe { File::from_raw_fd(-1) },
kvm_run_ptr: KvmRunWrapper {
kvm_run_ptr: mmap_anonymous(10),
mmap_size: 10,
},
};
assert_eq!(faulty_vcpu_fd.get_regs().unwrap_err().errno(), badf_errno); So we should create faulty vCPU, KVM, Device, and VM file descriptors (as you can see in the previous example), and run the appropriate ioctls on both x86_64 and aarch64. Does that make sense? |
https://www.youtube.com/watch?v=vhu3NTOHz-M I gotcha thank you sooo much |
There are already negative tests for x86_64:
kvm-ioctls/src/ioctls/vcpu.rs
Line 1813 in a638005
We should make sure that we do not duplicate test code. We can do that by having a platform independent negative test with ioctls that are valid on all supported platforms, and 2 platform dependent tests (one for x86_64, and one for aarch64).
The text was updated successfully, but these errors were encountered: