New and easy strace framework.
[akaros.git] / tests / old / mproctests.c
index b6f231a..cdbe1c3 100644 (file)
@@ -1,13 +1,13 @@
-#include <arch/arch.h>
-#include <parlib.h>
-#include <rassert.h>
+#include <parlib/arch/arch.h>
+#include <parlib/parlib.h>
+#include <parlib/assert.h>
 #include <stdlib.h>
-#include <vcore.h>
+#include <parlib/vcore.h>
 #include <ros/mman.h>
 #include <ros/resource.h>
 #include <stdio.h>
-#include <timing.h>
-#include <uthread.h>
+#include <parlib/timing.h>
+#include <parlib/uthread.h>
 
 #define TEST_MMAP                                       1
 #define TEST_ONE_CORE                           2
@@ -28,7 +28,7 @@ int main(int argc, char** argv)
 {
        uint32_t vcoreid;
        int retval;
-       vcore_init();
+       vcore_lib_init();
 
        if ((vcoreid = vcore_id())) {
                printf("Should never see me! (from vcore %d)\n", vcoreid);
@@ -38,8 +38,8 @@ int main(int argc, char** argv)
                switch (test) {
                        case TEST_MMAP:
                                printf("Testing MMAP\n");
-                               void *CT(8*PGSIZE) addr;
-                               addr = sys_mmap((void*SNT)USTACKTOP - 20*PGSIZE, 8*PGSIZE, 3,
+                               void *addr;
+                               addr = sys_mmap((void*)USTACKTOP - 20*PGSIZE, 8*PGSIZE, 3,
                                                MAP_FIXED | MAP_ANONYMOUS, -1, 0);
                                printf("got addr = 0x%08x\n", addr);
                                *(int*)addr = 0xdeadbeef;
@@ -49,9 +49,7 @@ int main(int argc, char** argv)
                                printf("reading addr+3pg: 0x%08x\n", *(int*)(addr + 3*PGSIZE));
                                // this should fault
                                printf("Should page fault and die now.\n");
-                               { TRUSTEDBLOCK
                                *(int*)(addr - 3*PGSIZE) = 0xdeadbeef;
-                               }
                                printf("Should not see me!!!!!!!!!!!!!!!!!!\n");
                                while(1);
                        case TEST_ONE_CORE: