Share via


Test Power Manager APIs (Compact 2013)

3/26/2014

The Test Power Manager APIs Test exercises the following programming interfaces and methods.

  • SetSystemPowerstate
  • GetSystemPowerState
  • SetPowerRequirement
  • ReleasePowerRequirement
  • SetDevicePower
  • GetDevicePower
  • DevicePowerNotify
  • RequestPowerNotifications
  • PowerPolicyNotify

Test Prerequisites

Your device must meet the following requirements before you run this test.

The following prerequisites are required for this test.

Hardware Prerequisites:

In order to run the test, the platform and/or device drivers should have power management capabilities.

Software Prerequisites:

Having the SYSGEN_PM sysgen variable set when building your OS image will include the Power Manager.

The following table shows the software requirements for this test.

Requirement

Description

Tux.exe

Tux test harness that executes the test.

Kato.dll

Logging engine that logs test data.

pwrtstapi.dll

Power manager API test DLL.

Subtests

The table below lists the subtests included in this test.

SubTest ID

Description

1

Power Manager API Tests Usage Message. This test prints out the usage message for this test suite.

101

Test SetSystemPowerstate and GetSystemPowerState APIs. Checks if all named states in the power manager registry can be set and if SetSystemPowerState and GetSystemPowerState work correctly.

102

Tests the SetPowerRequirement and ReleasePowerRequirement APIs.

103

Tests the SetDevicePower and GetDevicePower APIs.

104

Tests the DevicePowerNotify API. Checks the DevicePowerNotify API.

105

Tests the RequestPowerNotifications API. Checks to receive power notification.

106

Tests the PowerPolicyNotify API. Checks the PowerPolicyNotify API.

201

Tests the SetSystemPowerState API with Incorrect parameters.

202

Tests the SetPowerRequirement API with incorrect parameters.

203

Tests the SetDevicePower API with Incorrect parameters.

204

Tests the DevicePowerNotify API with incorrect parameters.

205

Tests the RequestPowerNotifications API with Incorrect parameters.

206

Checks the PowerPolicyNotify API with Incorrect parameters.

207

Checks the GetSystemPowerState API with Incorrect parameters.

Setting Up the Test

This test has no additional requirements beyond the standard test environment setup.

Running the Test

The Test Power Manager APIs Test executes the tux -o -d pwrtstapi.dll command line on default execution.

This test library can have one or more optional command line entries to change the behavior of the test. To specify one or more command line entries to the test library, you must use the -c command-line option. This option forces Tux to pass the specified string into the test library.

The following table shows the optional command line parameters for this test.

Command Line Parameter

Description

AllowSuspend

Allows the tests to suspend the system.

Verifying the Test

When the test completes, verify that "PASS" appears in the test log for all subtests.

Troubleshooting the Test

  • The platform must have power managment capabilities.
  • Some devices may require customized driver changes to enable suspending the device.

See Also

Other Resources

Power Manager Tests