Resource management conformance test

I had some questions asked by PM. Here’s the questions and answers, in case it’s useful to anyone else.

I am trying to pass the wait for resources conformance test.
As per my understanding if get handle function is giving error OMX_InsufficientResources.
Then client should send command to go to wait for resources state.

IL defines resources as being allocated during the loaded to idle state transition only. This has had to be relaxed to allow for dynamic allocation once a component is executing, but it does not include resources required to get to loaded.

If OMX_GetHandle() returns OMX_InsufficientResources, it is a critical error. An instance of the component was not created, so there is nothing to go into the wait for resources state.

I’ve observed few things while running this test:

  1. If get handle function is giving the error OMX_InsufficientResources, then test is failed.(at line no 442 in OMX_CONF_WaitForResourcesTest.c)
    According to me after getting this error it should not go to Idle state and come out of loop and try to go to Wait for resources state.

Yes, as explainned above, the test will (and should) fail.

  1. Flag
    oAppData[nComp].bErrorInsufficientResources = OMX_FALSE
    No where this flag is made to OMX_TRUE. So loop is not ending.

It will be made true when a resource instance cannot be transitioned from loaded to idle - look at the event handler - WaitResEventHandler(). The conformance tests certainly used to have a flaw that a constant length array (was 1000 entries) was used to store the component handles, so if “too many” instance could be created, then the test would fail to run. Practically you may need to limit the number of instances that can be created to less than this (assuming that the test hasn’t been modified), although this probably only applies to software components.

More information on the tests should be included in the adopters’ package.