Skip to content

Commit

Permalink
refactor(user): use final_tests to test all
Browse files Browse the repository at this point in the history
  • Loading branch information
ChenRuiwei committed Jul 20, 2024
1 parent 068f3ad commit 225f8af
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 13 deletions.
2 changes: 1 addition & 1 deletion config/src/mm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ pub const KERNEL_START_PHYS: usize = RAM_START + KERNEL_OFFSET;
pub const KERNEL_START: usize = VIRT_START + KERNEL_OFFSET;

pub const KERNEL_STACK_SIZE: usize = 64 * 1024;
pub const KERNEL_HEAP_SIZE: usize = 48 * 1024 * 1024;
pub const KERNEL_HEAP_SIZE: usize = 64 * 1024 * 1024;

register_mut_const!(pub DTB_ADDR, usize, 0);

Expand Down
17 changes: 5 additions & 12 deletions user/src/bin/runtestcase.rs → user/src/bin/final_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,15 @@ use user_lib::{execve, fork, wait, waitpid};
#[macro_use]
extern crate user_lib;

// const TESTCASES: [&str; 0] = [];

const TESTCASES: [&str; 8] = [
// "cyclictest_testcode.sh",
"busybox_testcode.sh",
"lua_testcode.sh",
"time-test",
"libc-bench",
"libctest_testcode.sh",
"iozone_testcode.sh",
"lmbench_testcode.sh",
"iozone_testcode.sh",
"unixbench_testcode.sh",
// "netperf_testcode.sh",
// "iperf_testcode.sh",
];

#[no_mangle]
Expand Down Expand Up @@ -52,15 +47,13 @@ fn main() -> i32 {
waitpid(pid as usize, &mut exit_code);
}
}
println!(" !TEST FINISH! ");
} else {
loop {
let mut exit_code: i32 = 0;
let _pid = wait(&mut exit_code);
// println!(
// "[initproc] Released a zombie process, pid={}, exit_code={}",
// pid, exit_code,
// );
let pid = wait(&mut exit_code);
if pid < 0 {
break;
}
}
}
0
Expand Down

0 comments on commit 225f8af

Please sign in to comment.