Testing the PRM PSL

This document describes using the test suite for the PRM.

Purpose

Use this test suite to ensure that your Power Resource Manager implementation runs correctly.

Introduction

T_PRMACCTST is a test application that verifies the resources registered with the PSL of the PRM. For more information refer to the description of individual test cases in e32test/resourceman/acctst/t_prmacctst.cpp.

The following tasks are preformed by the test suite:

  • enumerate all registered resources,

  • check that resources behave consistently with their properties,

  • ensure that resources are reset to their default level when not in use,

  • ensure all actual resources dependencies have been declared (only the extended version of the PRM allows dependencies).

To ensure that single-user resources are available to the test application, T_PRMACCTST is coupled with a kernel extension, D_PRMACCTST that takes control of such resources immediately after the PRM has been initialised. It then releases the resources when the test application ends.

Using the test suite

The instructions to run the PRM acceptance test suite are as follows:

  1. build the test code in e32test/resourceman/acctst,

  2. build a rom for H4HRP of type prmacctst in e32/rombuild:

    rom -v=h4hrp -I=armv5 -b=urel -t=prmacctst

    This command generates a self-starting ROM. The test output is captured from the default debug port of the device.

To build a manual test ROM (so the test application does not run automatically), use the -d=MANUALROM option. The usual ESHELL command prompt will be displayed and the test application can be run by calling T_PRMACCTST.

Note: This test must be run with minimal required components because the test driver is a kernel extension and takes control of all single-user resources during its entry point. This test randomly changes the state of all the resources between a minimum and maximum value. If there are any restrictions on a resources state change (i.e. the resource state can be only be changed to a certain value) then that resource should not be registered while running this test.