first usable version of kernel and commands
After an year of hard work, this is a first "usable" version of Jehanne.
This commit is contained in:
25
qa/kern/syscall.c
Normal file
25
qa/kern/syscall.c
Normal file
@@ -0,0 +1,25 @@
|
||||
|
||||
#include <u.h>
|
||||
#include <libc.h>
|
||||
|
||||
void
|
||||
main(void)
|
||||
{
|
||||
char buf[1024];
|
||||
int i, n, oldn, fail;
|
||||
int fd;
|
||||
|
||||
fail = 0;
|
||||
for(i = 0; i < 10000; i++){
|
||||
fd = open("/proc/1/status", OREAD);
|
||||
n = read(fd, buf, sizeof buf);
|
||||
if(i != 0 && n != oldn){
|
||||
fprint(2, "read %d, want %d\n", n, oldn);
|
||||
fail++;
|
||||
}
|
||||
oldn = n;
|
||||
close(fd);
|
||||
}
|
||||
print("PASS\n");
|
||||
exits("PASS");
|
||||
}
|
Reference in New Issue
Block a user