2020-04-22 04:30:09 +04:00
|
|
|
// test.rs
|
2020-05-17 23:06:30 +04:00
|
|
|
use crate::fs::MinixFileSystem;
|
|
|
|
use crate::syscall;
|
2020-04-26 16:33:49 +04:00
|
|
|
/// 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() {
|
2020-05-16 20:17:58 +04:00
|
|
|
// The majority of the testing code needs to move into a system call (execv maybe?)
|
2020-05-17 23:06:30 +04:00
|
|
|
MinixFileSystem::init(8);
|
|
|
|
let path = "/helloworld.elf\0".as_bytes().as_ptr();
|
|
|
|
syscall::syscall_execv(path,0);
|
2020-04-26 16:33:49 +04:00
|
|
|
println!();
|
|
|
|
}
|
|
|
|
|