Handle backspace for k210/qemu platform && Add lots of user tests.

This commit is contained in:
Yifan Wu 2020-12-11 01:44:07 +08:00
parent f69b3e11dd
commit 48a11e53ff
20 changed files with 361 additions and 35 deletions

View file

@ -4,9 +4,9 @@
#[macro_use]
extern crate user_lib;
use user_lib::{fork, wait, yield_, exit, getpid, get_time, wait_once};
use user_lib::{fork, wait, yield_, exit, getpid, get_time};
static NUM: usize = 13;
static NUM: usize = 20;
const N: usize = 10;
static P: i32 = 10007;
type Arr = [[i32; N]; N];
@ -50,7 +50,7 @@ pub fn main() -> i32 {
if pid == 0 {
let current_time = get_time();
let times = (current_time as i32 as isize) * (current_time as i32 as isize) % 1000;
work(times * 40);
work(times * 10);
}
}
@ -62,7 +62,7 @@ pub fn main() -> i32 {
panic!("wait failed.");
}
}
assert!(wait_once(&mut xstate) < 0);
assert!(wait(&mut xstate) < 0);
println!("matrix passed.");
0
}