mirror of
https://github.com/drasko/codezero.git
synced 2026-03-03 02:53:15 +01:00
execve working from vfs executable file along with clone/fork/exit
This commit is contained in:
@@ -46,21 +46,21 @@ void main(void)
|
||||
pid = getpid();
|
||||
printf("Child: file IO test 1.\n");
|
||||
if (fileio() == 0)
|
||||
printf("-- PASSED --\n");
|
||||
printf("-- Fileio PASSED --\n");
|
||||
else
|
||||
printf("-- FAILED --\n");
|
||||
printf("-- Fileio FAILED --\n");
|
||||
|
||||
printf("Child: forktest.\n");
|
||||
if (forktest() == 0)
|
||||
printf("-- PASSED -- \n");
|
||||
printf("-- Fork PASSED -- \n");
|
||||
else
|
||||
printf("-- FAILED -- \n");
|
||||
printf("-- Fork FAILED -- \n");
|
||||
} else {
|
||||
printf("Parent: file IO test 2. child pid %d:\n", pid);
|
||||
if (fileio2() == 0)
|
||||
printf("-- PASSED --\n");
|
||||
printf("-- Fileio2 PASSED --\n");
|
||||
else
|
||||
printf("-- FAILED --\n");
|
||||
printf("-- Fileio2 FAILED --\n");
|
||||
}
|
||||
|
||||
printf("Testing clone syscall...\n");
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
#include <tests.h>
|
||||
#include <l4/macros.h>
|
||||
|
||||
int global = 0;
|
||||
extern pid_t pid;
|
||||
@@ -39,5 +40,6 @@ int forktest(void)
|
||||
out:
|
||||
printf("PID: %d exiting...\n", myid);
|
||||
_exit(0);
|
||||
BUG();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user