Skip to content

Commit

Permalink
vmm/vstate/linux: remove broken test
Browse files Browse the repository at this point in the history
Remove broken and useless kvm_context test.

Signed-off-by: Sergio Lopez <[email protected]>
  • Loading branch information
slp committed Aug 9, 2024
1 parent eb4c311 commit aae7810
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions src/vmm/src/linux/vstate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1523,7 +1523,6 @@ enum VcpuEmulation {
#[cfg(test)]
mod tests {
use crossbeam_channel::unbounded;
use std::fs::File;
use std::sync::{Arc, Barrier};

use super::*;
Expand Down Expand Up @@ -1722,24 +1721,6 @@ mod tests {
.is_ok());
}

#[test]
fn test_kvm_context() {
use std::os::unix::fs::MetadataExt;
use std::os::unix::io::{AsRawFd, FromRawFd};

let c = KvmContext::new().unwrap();

assert!(c.max_memslots >= 32);

let kvm = Kvm::new().unwrap();
let f = unsafe { File::from_raw_fd(kvm.as_raw_fd()) };
let m1 = f.metadata().unwrap();
let m2 = File::open("/dev/kvm").unwrap().metadata().unwrap();

assert_eq!(m1.dev(), m2.dev());
assert_eq!(m1.ino(), m2.ino());
}

#[test]
fn test_vcpu_tls() {
let (_, mut vcpu, _) = setup_vcpu(0x1000);
Expand Down

0 comments on commit aae7810

Please sign in to comment.