update github CI for autotest

This commit is contained in:
Yu Chen 2022-05-15 12:03:05 +08:00
parent 0d9dd75a57
commit 80503e80ee
6 changed files with 115 additions and 55 deletions

View file

@ -74,8 +74,15 @@ pub fn exit_current_and_run_next(exit_code: i32) {
if tid == 0 {
let pid = process.getpid();
if pid == IDLE_PID {
println!("[kernel] Idle process exit ...");
crate::sbi::shutdown();
println!(
"[kernel] Idle process exit with exit_code {} ...",
exit_code
);
if exit_code != 0 {
crate::sbi::shutdown(255); //255 == -1 for err hint
} else {
crate::sbi::shutdown(0); //0 for success hint
}
}
remove_from_pid2process(pid);
let mut process_inner = process.inner_exclusive_access();