Hi Vasily,
The test is basically doing the following:
1- test_ep_recycle() creates a badged ep.
2- The call_func() thread invoke seL4_Call(), (the second invocation). At this point, call_func() thread blocks waiting for a reply (on the same ep).
3- test_ep_recycle() recycles all badged ep caps (including the one call_func() is blocking on). The kernel then invalidates cnodes of these endpoints, and set the state of the thread blocking on it as ThreadState_Restart, hence it will restart to do the seL4_Call() again.
4- call_func() thread resumes (restarted) and tries to do seL4_Call() on invalid endpoint which is no longer in its cspace, and should get the error seL4_InvalidCapability as a label.
One thing to check is to make sure the the call_func() thread is actually "Restarted" (assuming that arch-independent recycle code works correctly) meaning that it tries to invoke seL4_Call() again (the actual swi/trap-like instruction) after test_cp_recycle() recycles its endpoint. The arch-dependent functions in the kernel to do this are getRestartPC() and setNextPC().
Hope that helps.
Regards,
Hesham
________________________________________
From: Devel