Skip to content

Commit

Permalink
tests: Remove unnecessary imports and features flags
Browse files Browse the repository at this point in the history
The feature `default_alloc_error_handler` has been stable since
1.68.0 and no longer requires an attribute to enable.

Unused import: `td_layout::runtime`

Variable pt is not in use right now.

Signed-off-by: Jinank Jain <jinankjain@microsoft.com>
  • Loading branch information
jinankjain authored and Jinank Jain committed Dec 25, 2023
1 parent 736612b commit d20ab13
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions tests/test-td-paging/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
// Any function, const, or static can be annotated with `#[test_case]` causing it to be aggregated
// (like #[test]) and be passed to the test runner determined by the `#![test_runner]` crate
// attribute.
#![feature(default_alloc_error_handler)]
#![feature(custom_test_frameworks)]
#![test_runner(test_runner)]
// Reexport the test harness main function under a different symbol.
Expand Down Expand Up @@ -50,7 +49,6 @@ fn kernel_main(boot_info: &'static mut BootInfo) -> ! {

#[cfg(test)]
mod tests {
use td_layout::runtime;
use td_paging::{reserve_page, PHYS_VIRT_OFFSET};
use x86_64::{
structures::paging::{OffsetPageTable, PageTable},
Expand All @@ -62,7 +60,7 @@ mod tests {
/// Build page table to map guest physical addres range [0, system_memory_size), the top page table
/// page will be hosted at guest physical address `page_table_memory_base`.
pub fn setup_paging(page_table_memory_base: u64, system_memory_size: u64) {
let mut pt = unsafe {
let _pt = unsafe {
OffsetPageTable::new(
&mut *(page_table_memory_base as *mut PageTable),
VirtAddr::new(PHYS_VIRT_OFFSET as u64),
Expand Down

0 comments on commit d20ab13

Please sign in to comment.