tests/capops: use directy identify as frame_identify requres mappable cap
authorReto Achermann <reto.achermann@inf.ethz.ch>
Tue, 16 Jul 2019 07:55:25 +0000 (09:55 +0200)
committerReto Achermann <reto.achermann@inf.ethz.ch>
Tue, 16 Jul 2019 07:55:25 +0000 (09:55 +0200)
Signed-off-by: Reto Achermann <reto.achermann@inf.ethz.ch>

usr/tests/capops/retype.c

index c6112ee..2b3e70f 100644 (file)
@@ -42,8 +42,15 @@ static void setup(size_t bytes)
     errval_t err;
     err = ram_alloc(&bunch_o_ram, log2ceil(bytes));
     assert(err_is_ok(err));
-    err = frame_identify(bunch_o_ram, &bor_id);
+
+    struct capability thecap;
+    err = cap_direct_identify(bunch_o_ram, &thecap);
     assert(err_is_ok(err));
+    assert(thecap.type == ObjType_RAM);
+
+    bor_id.base  = get_address(&thecap);
+    bor_id.bytes = get_size(&thecap);
+    bor_id.pasid = get_pasid(&thecap);
 }
 
 static void cleanup(void)