diff --git a/kernel/libs/cpio-decoder/src/test.rs b/kernel/libs/cpio-decoder/src/test.rs index 32b143d38..1aecd1a85 100644 --- a/kernel/libs/cpio-decoder/src/test.rs +++ b/kernel/libs/cpio-decoder/src/test.rs @@ -5,7 +5,7 @@ use lending_iterator::LendingIterator; use super::{CpioDecoder, FileType, error::*}; #[test] -fn test_decoder() { +fn decoder() { use std::process::{Command, Stdio}; let manifest_path = std::env::var("CARGO_MANIFEST_DIR").unwrap(); @@ -63,7 +63,7 @@ fn test_decoder() { } #[test] -fn test_short_buffer() { +fn short_buffer() { let short_buffer: Vec = Vec::new(); let mut decoder = CpioDecoder::new(short_buffer.as_slice()); let entry_result = decoder.next().unwrap(); @@ -72,7 +72,7 @@ fn test_short_buffer() { } #[test] -fn test_invalid_buffer() { +fn invalid_buffer() { let buffer: &[u8] = b"invalidmagic.invalidmagic.invalidmagic.invalidmagic.invalidmagic.invalidmagic.invalidmagic.invalidmagic.invalidmagic.invalidmagic"; let mut decoder = CpioDecoder::new(buffer); let entry_result = decoder.next().unwrap(); diff --git a/kernel/libs/jhash/src/lib.rs b/kernel/libs/jhash/src/lib.rs index 965fac1ea..ead7cd3bc 100644 --- a/kernel/libs/jhash/src/lib.rs +++ b/kernel/libs/jhash/src/lib.rs @@ -260,7 +260,7 @@ mod test { const JHASH_INITVAL: u32 = 0; #[test] - fn test_jhash_3vals() { + fn jhash_3vals_works() { assert_eq!(jhash_3vals(1, 2, 3, JHASH_INITVAL), 2757843189); assert_eq!(jhash_3vals(4, 5, 6, JHASH_INITVAL), 3701334656); @@ -275,7 +275,7 @@ mod test { } #[test] - fn test_jhash_2vals() { + fn jhash_2vals_works() { assert_eq!(jhash_2vals(1, 2, JHASH_INITVAL), 2337044857); assert_eq!(jhash_2vals(3, 4, JHASH_INITVAL), 3842257880); assert_eq!(jhash_2vals(0, 0, JHASH_INITVAL), 1489077439); @@ -285,7 +285,7 @@ mod test { } #[test] - fn test_jhash_1vals() { + fn jhash_1vals_works() { assert_eq!(jhash_1vals(1, JHASH_INITVAL), 1923623579); assert_eq!(jhash_1vals(5, JHASH_INITVAL), 4121471414); assert_eq!(jhash_1vals(0, JHASH_INITVAL), 76781240); @@ -295,7 +295,7 @@ mod test { } #[test] - fn test_jhash_u32_array() { + fn jhash_u32_array_works() { assert_eq!(jhash_u32_array(&[1, 2, 3], JHASH_INITVAL), 2757843189); assert_eq!(jhash_u32_array(&[4, 5, 6, 7, 8], JHASH_INITVAL), 581654130); assert_eq!(jhash_u32_array(&[], JHASH_INITVAL), 3735928559); @@ -309,7 +309,7 @@ mod test { } #[test] - fn test_jhash_slice() { + fn jhash_slice_works() { assert_eq!(jhash_slice(b"hello world", JHASH_INITVAL), 1252609637); assert_eq!(jhash_slice(b"12345", JHASH_INITVAL), 729031446); assert_eq!(jhash_slice(b"\n\t\r", JHASH_INITVAL), 483925400); diff --git a/kernel/src/fs/configfs/test.rs b/kernel/src/fs/configfs/test.rs index e64cbf99d..df1d65bb5 100644 --- a/kernel/src/fs/configfs/test.rs +++ b/kernel/src/fs/configfs/test.rs @@ -158,7 +158,7 @@ fn init_demo_subsystem() { } #[ktest] -fn test_config_fs() { +fn config_fs() { init_demo_subsystem(); let config_fs = super::fs::ConfigFs::singleton(); diff --git a/kernel/src/fs/pipe/common.rs b/kernel/src/fs/pipe/common.rs index a2587e2d8..fe89ae636 100644 --- a/kernel/src/fs/pipe/common.rs +++ b/kernel/src/fs/pipe/common.rs @@ -539,7 +539,7 @@ mod test { } #[ktest] - fn test_read_empty() { + fn read_empty() { test_blocking( |writer| { assert_eq!(write(writer.as_ref(), &[1]).unwrap(), 1); @@ -554,7 +554,7 @@ mod test { } #[ktest] - fn test_write_full() { + fn write_full() { test_blocking( |writer| { assert_eq!(write(writer.as_ref(), &[1, 2, 3]).unwrap(), 2); @@ -572,7 +572,7 @@ mod test { } #[ktest] - fn test_read_closed() { + fn read_closed() { test_blocking( drop, |reader| { @@ -584,7 +584,7 @@ mod test { } #[ktest] - fn test_write_closed() { + fn write_closed() { test_blocking( |writer| { assert_eq!(write(writer.as_ref(), &[1, 2, 3]).unwrap(), 2); @@ -599,7 +599,7 @@ mod test { } #[ktest] - fn test_write_atomicity() { + fn write_atomicity() { test_blocking( |writer| { assert_eq!(write(writer.as_ref(), &[1]).unwrap(), 1); diff --git a/kernel/src/fs/sysfs/test.rs b/kernel/src/fs/sysfs/test.rs index a27155ec2..2c5e10133 100644 --- a/kernel/src/fs/sysfs/test.rs +++ b/kernel/src/fs/sysfs/test.rs @@ -245,7 +245,7 @@ fn init_sysfs_with_mock_tree() -> Arc { } #[ktest] -fn test_sysfs_root_lookup() { +fn root_lookup() { // Setup: Create SysFs instance backed by the mock systree let sysfs = init_sysfs_with_mock_tree(); let root_inode = sysfs.root_inode(); // Get the sysfs root inode @@ -280,7 +280,7 @@ fn test_sysfs_root_lookup() { } #[ktest] -fn test_sysfs_branch_lookup() { +fn branch_lookup() { let sysfs = init_sysfs_with_mock_tree(); let root_inode = sysfs.root_inode(); // Action: Lookup a branch node within sysfs @@ -313,7 +313,7 @@ fn test_sysfs_branch_lookup() { } #[ktest] -fn test_sysfs_leaf_lookup() { +fn leaf_lookup() { let sysfs = init_sysfs_with_mock_tree(); let root_inode = sysfs.root_inode(); // Action: Lookup a leaf node (represented as a directory in sysfs) @@ -350,7 +350,7 @@ fn test_sysfs_leaf_lookup() { } #[ktest] -fn test_sysfs_read_attr() { +fn read_attr() { let sysfs = init_sysfs_with_mock_tree(); let root_inode = sysfs.root_inode(); let leaf1_dir_inode = root_inode @@ -381,7 +381,7 @@ fn test_sysfs_read_attr() { } #[ktest] -fn test_sysfs_write_attr() { +fn write_attr() { let sysfs = init_sysfs_with_mock_tree(); let root_inode = sysfs.root_inode(); let leaf1_dir_inode = root_inode @@ -426,7 +426,7 @@ fn test_sysfs_write_attr() { } #[ktest] -fn test_sysfs_read_link() { +fn read_link() { use crate::fs::utils::SymbolicLink; let sysfs = init_sysfs_with_mock_tree(); @@ -462,7 +462,7 @@ impl DirentVisitor for TestDirentVisitor { } #[ktest] -fn test_sysfs_readdir_leaf() { +fn readdir_leaf() { let sysfs = init_sysfs_with_mock_tree(); let root_inode = sysfs.root_inode(); let leaf1_inode = root_inode @@ -510,7 +510,7 @@ fn test_sysfs_readdir_leaf() { } #[ktest] -fn test_sysfs_mode_permissions() { +fn mode_permissions() { let sysfs = init_sysfs_with_mock_tree(); let root_inode = sysfs.root_inode(); let leaf1_dir_inode = root_inode diff --git a/kernel/src/fs/utils/inode_mode.rs b/kernel/src/fs/utils/inode_mode.rs index 8cf9bf44c..fbfd7f253 100644 --- a/kernel/src/fs/utils/inode_mode.rs +++ b/kernel/src/fs/utils/inode_mode.rs @@ -254,7 +254,7 @@ mod test { use ostd::prelude::*; #[ktest] - fn test_mkmod_and_chmod() { + fn mkmod_and_chmod() { let mode0 = mkmod!(a+rw); assert!(mode0.bits() == 0o666); diff --git a/kernel/src/process/signal/pause.rs b/kernel/src/process/signal/pause.rs index 53f5fa81c..a9e773987 100644 --- a/kernel/src/process/signal/pause.rs +++ b/kernel/src/process/signal/pause.rs @@ -281,7 +281,7 @@ mod test { use crate::thread::{Thread, kernel_thread::ThreadOptions}; #[ktest] - fn test_waiter_pause() { + fn waiter_pause() { let wait_queue = Arc::new(WaitQueue::new()); let wait_queue_cloned = wait_queue.clone(); diff --git a/kernel/src/process/signal/poll.rs b/kernel/src/process/signal/poll.rs index 5d082ff43..31f8bd2f0 100644 --- a/kernel/src/process/signal/poll.rs +++ b/kernel/src/process/signal/poll.rs @@ -398,7 +398,7 @@ mod test { use super::*; #[ktest] - fn test_notify_before() { + fn notify_before() { let pollee = Pollee::new(); pollee.notify(IoEvents::OUT); @@ -417,7 +417,7 @@ mod test { } #[ktest] - fn test_notify_middle() { + fn notify_middle() { let pollee = Pollee::new(); assert_eq!( @@ -439,7 +439,7 @@ mod test { } #[ktest] - fn test_notify_after() { + fn notify_after() { let pollee = Pollee::new(); assert_eq!( @@ -460,7 +460,7 @@ mod test { } #[ktest] - fn test_nested_notify_before() { + fn nested_notify_before() { let pollee = Pollee::new(); pollee.notify(IoEvents::OUT); @@ -486,7 +486,7 @@ mod test { } #[ktest] - fn test_nested_notify_between() { + fn nested_notify_between() { let pollee = Pollee::new(); assert_eq!( @@ -513,7 +513,7 @@ mod test { } #[ktest] - fn test_nested_notify_inside() { + fn nested_notify_inside() { let pollee = Pollee::new(); assert_eq!( diff --git a/kernel/src/process/sync/condvar.rs b/kernel/src/process/sync/condvar.rs index ab2282145..34fe95285 100644 --- a/kernel/src/process/sync/condvar.rs +++ b/kernel/src/process/sync/condvar.rs @@ -271,7 +271,7 @@ mod test { use crate::thread::{Thread, kernel_thread::ThreadOptions}; #[ktest] - fn test_condvar_wait() { + fn wait() { let pair = Arc::new((Mutex::new(false), Condvar::new())); let pair2 = Arc::clone(&pair); @@ -295,7 +295,7 @@ mod test { } #[ktest] - fn test_condvar_wait_timeout() { + fn wait_timeout() { let pair = Arc::new((Mutex::new(false), Condvar::new())); let pair2 = Arc::clone(&pair); @@ -321,7 +321,7 @@ mod test { } #[ktest] - fn test_condvar_wait_while() { + fn wait_while() { let pair = Arc::new((Mutex::new(true), Condvar::new())); let pair2 = Arc::clone(&pair); @@ -344,7 +344,7 @@ mod test { } #[ktest] - fn test_condvar_wait_timeout_while() { + fn wait_timeout_while() { let pair = Arc::new((Mutex::new(true), Condvar::new())); let pair2 = Arc::clone(&pair); diff --git a/kernel/src/util/ring_buffer.rs b/kernel/src/util/ring_buffer.rs index 186224453..698c51465 100644 --- a/kernel/src/util/ring_buffer.rs +++ b/kernel/src/util/ring_buffer.rs @@ -511,7 +511,7 @@ mod test { use super::*; #[ktest] - fn test_rb_basics() { + fn basics() { let mut rb = RingBuffer::::new(4); rb.push(-100).unwrap(); rb.push_slice(&[-1]).unwrap(); @@ -536,7 +536,7 @@ mod test { } #[ktest] - fn test_rb_write_read_one() { + fn write_read_one() { let rb = RingBuffer::::new(1); let (mut prod, mut cons) = rb.split(); @@ -582,7 +582,7 @@ mod test { } #[ktest] - fn test_rb_write_read_all() { + fn write_read_all() { let rb = RingBuffer::::new(4 * PAGE_SIZE); assert_eq!(rb.capacity(), 4 * PAGE_SIZE); diff --git a/kernel/src/vm/vmar/interval_set.rs b/kernel/src/vm/vmar/interval_set.rs index d32bf460e..35f98b879 100644 --- a/kernel/src/vm/vmar/interval_set.rs +++ b/kernel/src/vm/vmar/interval_set.rs @@ -261,7 +261,7 @@ mod tests { } #[ktest] - fn test_insert_and_find_one() { + fn insert_and_find_one() { let mut set = IntervalSet::new(); let interval = TestInterval { range: 10..20 }; set.insert(interval.clone()); @@ -271,7 +271,7 @@ mod tests { } #[ktest] - fn test_remove() { + fn remove() { let mut set = IntervalSet::new(); let interval = TestInterval { range: 10..20 }; set.insert(interval.clone()); @@ -281,7 +281,7 @@ mod tests { } #[ktest] - fn test_iter() { + fn iter() { let mut set = IntervalSet::new(); let interval1 = TestInterval { range: 10..20 }; let interval2 = TestInterval { range: 30..40 }; @@ -293,7 +293,7 @@ mod tests { } #[ktest] - fn test_find() { + fn find() { let mut set = IntervalSet::new(); let interval1 = TestInterval { range: 10..20 }; let interval2 = TestInterval { range: 30..40 }; @@ -309,7 +309,7 @@ mod tests { } #[ktest] - fn test_take_one() { + fn take_one() { let mut set = IntervalSet::new(); let interval1 = TestInterval { range: 10..20 }; let interval2 = TestInterval { range: 20..30 }; @@ -321,7 +321,7 @@ mod tests { } #[ktest] - fn test_take() { + fn take() { let mut set = IntervalSet::new(); let interval1 = TestInterval { range: 10..20 }; let interval2 = TestInterval { range: 30..40 }; @@ -337,7 +337,7 @@ mod tests { } #[ktest] - fn test_clear() { + fn clear() { let mut set = IntervalSet::new(); let interval1 = TestInterval { range: 10..20 }; let interval2 = TestInterval { range: 20..30 }; diff --git a/kernel/src/vm/vmar/vmar_impls/fork.rs b/kernel/src/vm/vmar/vmar_impls/fork.rs index d53a20d59..7c3f6954f 100644 --- a/kernel/src/vm/vmar/vmar_impls/fork.rs +++ b/kernel/src/vm/vmar/vmar_impls/fork.rs @@ -132,7 +132,7 @@ mod test { use super::*; #[ktest] - fn test_cow_copy_pt() { + fn cow_copy_pt_basic() { let vm_space = VmSpace::new(); let map_range = PAGE_SIZE..(PAGE_SIZE * 2); let cow_range = 0..PAGE_SIZE * 512 * 512; @@ -264,7 +264,7 @@ mod test { } #[ktest] - fn test_cow_copy_pt_iomem() { + fn cow_copy_pt_iomem() { /// A very large address (1TiB) beyond typical physical memory for testing. const IOMEM_PADDR: usize = 0x100_000_000_000; diff --git a/osdk/deps/frame-allocator/src/chunk.rs b/osdk/deps/frame-allocator/src/chunk.rs index d4a2d07c4..7635c5fc4 100644 --- a/osdk/deps/frame-allocator/src/chunk.rs +++ b/osdk/deps/frame-allocator/src/chunk.rs @@ -257,7 +257,7 @@ mod test { use ostd::prelude::ktest; #[ktest] - fn test_greater_order_of() { + fn greater_order_of_works() { #[track_caller] fn assert_greater_order_of(nframes: usize, expected: BuddyOrder) { assert_eq!(greater_order_of(nframes * PAGE_SIZE), expected); @@ -275,7 +275,7 @@ mod test { } #[ktest] - fn test_lesser_order_of() { + fn lesser_order_of_works() { #[track_caller] fn assert_lesser_order_of(nframes: usize, expected: BuddyOrder) { assert_eq!(lesser_order_of(nframes * PAGE_SIZE), expected); @@ -293,7 +293,7 @@ mod test { } #[ktest] - fn test_max_order_from() { + fn max_order_from_works() { #[track_caller] fn assert_max_order_from(frame_num: usize, expected: BuddyOrder) { assert_eq!(max_order_from(frame_num * PAGE_SIZE), expected); @@ -315,7 +315,7 @@ mod test { } #[ktest] - fn test_split_to_chunks() { + fn split_to_chunks_works() { use alloc::{vec, vec::Vec}; #[track_caller] @@ -346,7 +346,7 @@ mod test { } #[ktest] - fn test_split_to_order() { + fn split_to_order_works() { use alloc::{vec, vec::Vec}; #[track_caller] @@ -374,7 +374,7 @@ mod test { } #[ktest] - fn test_free_chunk_ops() { + fn free_chunk_ops() { let order = 3; let size = size_of_order(order); let region = MockMemoryRegion::alloc(size); diff --git a/osdk/deps/frame-allocator/src/set.rs b/osdk/deps/frame-allocator/src/set.rs index 52fce5918..d40feff1e 100644 --- a/osdk/deps/frame-allocator/src/set.rs +++ b/osdk/deps/frame-allocator/src/set.rs @@ -107,7 +107,7 @@ mod test { use ostd::prelude::ktest; #[ktest] - fn test_buddy_set_insert_alloc() { + fn buddy_set_insert_alloc() { let region_order = 4; let region_size = size_of_order(region_order); let region = MockMemoryRegion::alloc(region_size); diff --git a/osdk/deps/frame-allocator/src/smp_counter.rs b/osdk/deps/frame-allocator/src/smp_counter.rs index a0465395a..9382a573f 100644 --- a/osdk/deps/frame-allocator/src/smp_counter.rs +++ b/osdk/deps/frame-allocator/src/smp_counter.rs @@ -88,7 +88,7 @@ mod test { use ostd::{cpu::PinCurrentCpu, irq, prelude::*}; #[ktest] - fn test_per_cpu_counter() { + fn per_cpu_counter() { fast_smp_counter! { /// The total size of free memory. pub static FREE_SIZE_COUNTER: usize; diff --git a/osdk/deps/test-kernel/src/path.rs b/osdk/deps/test-kernel/src/path.rs index 45f63e814..c640cc5a0 100644 --- a/osdk/deps/test-kernel/src/path.rs +++ b/osdk/deps/test-kernel/src/path.rs @@ -124,7 +124,7 @@ mod path_test { use super::*; #[ktest] - fn test_ktest_path() { + fn basics() { let mut path = KtestPath::new(); path.push_back("a"); path.push_back("b"); @@ -137,7 +137,7 @@ mod path_test { } #[ktest] - fn test_ktest_path_starts_with() { + fn starts_with() { let mut path = KtestPath::new(); path.push_back("a"); path.push_back("b"); @@ -152,7 +152,7 @@ mod path_test { } #[ktest] - fn test_ktest_path_ends_with() { + fn ends_with() { let mut path = KtestPath::new(); path.push_back("a"); path.push_back("b"); @@ -263,7 +263,7 @@ mod suffix_trie_test { ]; #[ktest] - fn test_contains() { + fn contains() { let trie = SuffixTrie::from_paths(TEST_PATHS.iter().map(|&s| KtestPath::from(s))); assert!(trie.contains(KtestPath::from("e::f::g::a::b::c::d").iter())); @@ -280,7 +280,7 @@ mod suffix_trie_test { } #[ktest] - fn test_matches() { + fn matches() { let trie = SuffixTrie::from_paths(TEST_PATHS.iter().map(|&s| KtestPath::from(s))); assert!(trie.matches(KtestPath::from("a::b::c::d").iter())); diff --git a/osdk/deps/test-kernel/src/tree.rs b/osdk/deps/test-kernel/src/tree.rs index 311e14973..9155374f1 100644 --- a/osdk/deps/test-kernel/src/tree.rs +++ b/osdk/deps/test-kernel/src/tree.rs @@ -252,7 +252,7 @@ mod tests { } #[ktest] - fn test_tree_iter() { + fn tree_iter() { let tree = gen_test_case!(); let mut iter = tree.iter(); let c1 = iter.next().unwrap(); @@ -263,7 +263,7 @@ mod tests { } #[ktest] - fn test_crate_iter() { + fn crate_iter() { let tree = gen_test_case!(); for crate_ in tree.iter() { if crate_.name() == "crate1" { @@ -287,7 +287,7 @@ mod tests { } #[ktest] - fn test_module_iter() { + fn module_iter() { let tree = gen_test_case!(); let mut collection = Vec::<&KtestItem>::new(); for crate_ in tree.iter() { diff --git a/ostd/libs/align_ext/src/lib.rs b/ostd/libs/align_ext/src/lib.rs index 3fb24008f..2c7e8da63 100644 --- a/ostd/libs/align_ext/src/lib.rs +++ b/ostd/libs/align_ext/src/lib.rs @@ -76,7 +76,7 @@ mod test { use super::*; #[test] - fn test_align_up() { + fn align_up() { let input_ns = [0usize, 1, 2, 9, 15, 21, 32, 47, 50]; let input_as = [2usize, 2, 2, 2, 4, 4, 8, 8, 8]; let output_ns = [0usize, 2, 2, 10, 16, 24, 32, 48, 56]; @@ -90,7 +90,7 @@ mod test { } #[test] - fn test_align_down() { + fn align_down() { let input_ns = [0usize, 1, 2, 9, 15, 21, 32, 47, 50]; let input_as = [2usize, 2, 2, 2, 4, 4, 8, 8, 8]; let output_ns = [0usize, 0, 2, 8, 12, 20, 32, 40, 48]; diff --git a/ostd/libs/linux-bzimage/boot-params/src/lib.rs b/ostd/libs/linux-bzimage/boot-params/src/lib.rs index ae32d013b..3eec812a2 100644 --- a/ostd/libs/linux-bzimage/boot-params/src/lib.rs +++ b/ostd/libs/linux-bzimage/boot-params/src/lib.rs @@ -266,7 +266,7 @@ mod tests { use super::*; #[test] - fn test_screen_info_offsets() { + fn screen_info_offsets() { assert_eq!(offset_of!(ScreenInfo, orig_x), 0x00); assert_eq!(offset_of!(ScreenInfo, orig_y), 0x01); assert_eq!(offset_of!(ScreenInfo, ext_mem_k), 0x02); @@ -305,7 +305,7 @@ mod tests { } #[test] - fn test_boot_params_offsets() { + fn boot_params_offsets() { assert_eq!(offset_of!(BootParams, screen_info), 0x000); assert_eq!(offset_of!(BootParams, apm_bios_info), 0x040); assert_eq!(offset_of!(BootParams, tboot_addr), 0x058); diff --git a/ostd/src/cpu/local/mod.rs b/ostd/src/cpu/local/mod.rs index 6109acce1..9785cde31 100644 --- a/ostd/src/cpu/local/mod.rs +++ b/ostd/src/cpu/local/mod.rs @@ -317,7 +317,7 @@ mod test { use ostd_macros::ktest; #[ktest] - fn test_cpu_local() { + fn cpu_local() { crate::cpu_local! { static FOO: RefCell = RefCell::new(1); } @@ -330,7 +330,7 @@ mod test { } #[ktest] - fn test_cpu_local_cell() { + fn cpu_local_cell() { crate::cpu_local_cell! { static BAR: usize = 3; } diff --git a/ostd/src/mm/frame/allocator.rs b/ostd/src/mm/frame/allocator.rs index fcb1ac900..66c2f52eb 100644 --- a/ostd/src/mm/frame/allocator.rs +++ b/ostd/src/mm/frame/allocator.rs @@ -106,7 +106,7 @@ impl FrameAllocOptions { } #[cfg(ktest)] -#[ktest] +#[ktest(expect_redundant_test_prefix)] fn test_alloc_dealloc() { // Here we allocate and deallocate frames in random orders to test the allocator. // We expect the test to fail if the underlying implementation panics. diff --git a/ostd/src/mm/page_table/test.rs b/ostd/src/mm/page_table/test.rs index 524d5076f..df5455e7c 100644 --- a/ostd/src/mm/page_table/test.rs +++ b/ostd/src/mm/page_table/test.rs @@ -155,7 +155,7 @@ mod test_utils { } } - #[ktest] + #[ktest(expect_redundant_test_prefix)] fn test_subset_iter() { use alloc::{vec, vec::Vec}; @@ -964,7 +964,7 @@ mod protection_and_query { } #[ktest] - fn test_protect_next_empty_entry() { + fn protect_next_empty_entry() { let page_table = PageTable::::empty(); let range = 0x1000..0x2000; let preempt_guard = disable_preempt(); @@ -979,7 +979,7 @@ mod protection_and_query { } #[ktest] - fn test_protect_next_touches_empty_range() { + fn protect_next_touches_empty_range() { let page_table = PageTable::::empty(); let range = 0x1000..0x3000; // Range spanning multiple pages. let preempt_guard = disable_preempt(); diff --git a/ostd/src/sync/mutex.rs b/ostd/src/sync/mutex.rs index 9f7ae1ff1..005ee4a4a 100644 --- a/ostd/src/sync/mutex.rs +++ b/ostd/src/sync/mutex.rs @@ -140,7 +140,7 @@ mod test { // A regression test for a bug fixed in [#1279](https://github.com/asterinas/asterinas/pull/1279). #[ktest] - fn test_mutex_try_lock_does_not_unlock() { + fn try_lock_does_not_unlock() { let lock = Mutex::new(0); assert!(!lock.lock.load(Ordering::Relaxed));