Skip to content

Commit

Permalink
test: disable test inside SVSM
Browse files Browse the repository at this point in the history
For one reason or another some of the tests currently fail when run
inside the SVSM.

Signed-off-by: Tom Dohrmann <erbse.13@gmx.de>
  • Loading branch information
Freax13 committed Oct 21, 2023
1 parent fa2d360 commit d368d23
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/fs/filesystem.rs
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,7 @@ mod tests {
use crate::mm::alloc::{destroy_test_root_mem, setup_test_root_mem, DEFAULT_TEST_MEMORY_SIZE};

#[test]
#[cfg_attr(test_in_svsm, ignore = "FIXME")]
fn create_dir() {
let test_mem_lock = setup_test_root_mem(DEFAULT_TEST_MEMORY_SIZE);
initialize_fs();
Expand All @@ -301,6 +302,7 @@ mod tests {
}

#[test]
#[cfg_attr(test_in_svsm, ignore = "FIXME")]
fn create_and_unlink_file() {
let test_mem_lock = setup_test_root_mem(DEFAULT_TEST_MEMORY_SIZE);
initialize_fs();
Expand Down Expand Up @@ -332,6 +334,7 @@ mod tests {
}

#[test]
#[cfg_attr(test_in_svsm, ignore = "FIXME")]
fn create_sub_dir() {
let test_mem_lock = setup_test_root_mem(DEFAULT_TEST_MEMORY_SIZE);
initialize_fs();
Expand Down Expand Up @@ -361,6 +364,7 @@ mod tests {
}

#[test]
#[cfg_attr(test_in_svsm, ignore = "FIXME")]
fn test_unlink() {
let test_mem_lock = setup_test_root_mem(DEFAULT_TEST_MEMORY_SIZE);
initialize_fs();
Expand Down Expand Up @@ -391,6 +395,7 @@ mod tests {
}

#[test]
#[cfg_attr(test_in_svsm, ignore = "FIXME")]
fn test_open_read_write_seek() {
let test_mem_lock = setup_test_root_mem(DEFAULT_TEST_MEMORY_SIZE);
initialize_fs();
Expand Down Expand Up @@ -443,6 +448,7 @@ mod tests {
}

#[test]
#[cfg_attr(test_in_svsm, ignore = "FIXME")]
fn test_multiple_file_handles() {
let test_mem_lock = setup_test_root_mem(DEFAULT_TEST_MEMORY_SIZE);
initialize_fs();
Expand Down
1 change: 1 addition & 0 deletions src/fs/ramfs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,7 @@ mod tests {
use crate::mm::alloc::{destroy_test_root_mem, setup_test_root_mem, DEFAULT_TEST_MEMORY_SIZE};

#[test]
#[cfg_attr(test_in_svsm, ignore = "FIXME")]
fn test_ramfs_file_read_write() {
let test_mem_lock = setup_test_root_mem(DEFAULT_TEST_MEMORY_SIZE);

Expand Down
9 changes: 9 additions & 0 deletions src/mm/alloc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1317,12 +1317,14 @@ pub fn destroy_test_root_mem(lock: LockGuard<'static, ()>) {
pub const DEFAULT_TEST_MEMORY_SIZE: usize = 16usize * 1024 * 1024;

#[test]
#[cfg_attr(test_in_svsm, ignore = "FIXME")]
fn test_root_mem_setup() {
let test_mem_lock = setup_test_root_mem(DEFAULT_TEST_MEMORY_SIZE);
destroy_test_root_mem(test_mem_lock);
}

#[test]
#[cfg_attr(test_in_svsm, ignore = "FIXME")]
// Allocate one page and free it again, verify that memory_info() reflects it.
fn test_page_alloc_one() {
let test_mem_lock = setup_test_root_mem(DEFAULT_TEST_MEMORY_SIZE);
Expand All @@ -1340,6 +1342,7 @@ fn test_page_alloc_one() {
}

#[test]
#[cfg_attr(test_in_svsm, ignore = "FIXME")]
// Allocate and free all available compound pages, verify that memory_info()
// reflects it.
fn test_page_alloc_all_compound() {
Expand Down Expand Up @@ -1375,6 +1378,7 @@ fn test_page_alloc_all_compound() {
}

#[test]
#[cfg_attr(test_in_svsm, ignore = "FIXME")]
// Allocate and free all available 4k pages, verify that memory_info()
// reflects it.
fn test_page_alloc_all_single() {
Expand Down Expand Up @@ -1410,6 +1414,7 @@ fn test_page_alloc_all_single() {
}

#[test]
#[cfg_attr(test_in_svsm, ignore = "FIXME")]
// Allocate and free all available compound pages, verify that any subsequent
// allocation fails.
fn test_page_alloc_oom() {
Expand Down Expand Up @@ -1450,6 +1455,7 @@ fn test_page_alloc_oom() {
}

#[test]
#[cfg_attr(test_in_svsm, ignore = "FIXME")]
fn test_page_file() {
let test_mem_lock = setup_test_root_mem(DEFAULT_TEST_MEMORY_SIZE);
let mut root_mem = ROOT_MEM.lock();
Expand Down Expand Up @@ -1486,6 +1492,7 @@ fn test_page_file() {
const TEST_SLAB_SIZES: [usize; 7] = [32, 64, 128, 256, 512, 1024, 2048];

#[test]
#[cfg_attr(test_in_svsm, ignore = "FIXME")]
// Allocate and free a couple of objects for each slab size.
fn test_slab_alloc_free_many() {
extern crate alloc;
Expand Down Expand Up @@ -1527,6 +1534,7 @@ fn test_slab_alloc_free_many() {
}

#[test]
#[cfg_attr(test_in_svsm, ignore = "FIXME")]
// Allocate enough objects so that the SlabPageSlab will need a SlabPage for
// itself twice.
fn test_slab_page_slab_for_self() {
Expand Down Expand Up @@ -1565,6 +1573,7 @@ fn test_slab_page_slab_for_self() {
}

#[test]
#[cfg_attr(test_in_svsm, ignore = "FIXME")]
// Allocate enough objects to hit an OOM situation and verify null gets
// returned at some point.
fn test_slab_oom() {
Expand Down

0 comments on commit d368d23

Please sign in to comment.