1
0
mirror of https://github.com/sgmarz/osblog.git synced 2024-11-28 04:13:31 +04:00
osblog/risc_v/src/test.rs

14 lines
423 B
Rust
Raw Normal View History

2020-04-22 04:30:09 +04:00
// test.rs
use crate::fs::MinixFileSystem;
use crate::syscall;
/// Test block will load raw binaries into memory to execute them. This function
/// will load ELF files and try to execute them.
2020-05-15 20:35:18 +04:00
pub fn test() {
// The majority of the testing code needs to move into a system call (execv maybe?)
MinixFileSystem::init(8);
let path = "/helloworld.elf\0".as_bytes().as_ptr();
syscall::syscall_execv(path,0);
println!();
}