Browse Source

Very basic test for attaching and detaching segment

Signed-off-by: Graham MacDonald <grahamamacdonald@gmail.com>
Graham MacDonald 5 years ago
parent
commit
b645f3c933
1 changed files with 4 additions and 6 deletions
  1. 4 6
      sys/src/regress/libc/seg.c

+ 4 - 6
sys/src/regress/libc/seg.c

@@ -13,18 +13,16 @@
 void
 main(void)
 {
-        void *seg = segattach(0, "foo", nil, 1024);
-        print(">seg: %p<\n", seg);
+        void *seg = segattach(0, "shared", nil, 1024);
         if (seg == (void*)-1) {
-		print("FAIL segattach   ");
-		//exits("FAIL");
+		print("FAIL segattach\n");
+		exits("FAIL");
                 return;
         }
 
         int rcode = segdetach(seg);
-        print(">rcode: %d<\n", rcode);
         if (rcode != 0) {
-		print("FAIL segdetach");
+		print("FAIL segdetach\n");
 		exits("FAIL");
         }