次の方法で共有


OAL RTC Alarm Test (Compact 2013)

3/26/2014

The RTC Alarm tests verify the behavior of the RTC alarm. The test checks the RTC alarm resolution, and verifies that the alarm fires correctly under a variety of circumstances. This test exercises OEMSetAlarmTime() and OEMGetAlarmTime().

Purpose of tests:

  • Windows Embedded Compact must have an accurate and reliable clock to keep track of current time.
  • Windows Embedded Compact must trigger alarms at the date/time the user specifies.

Test Prerequisites

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

The RTC Alarm test requires an RTC clock in the device and implementation in the OAL under test.

The following table list the software prerequisites for the test.

Requirements

Description

Tux.exe

Test harness, required for executing the test

Kato.dll

Logging engine, required for logging test data

oalTestRtcAlarm.dll

Test library DLL

Other prerequisites:

This test should be run on a minimal OS configuration that does not include many applications or drivers, such as one with only the following SYSGENs set to minimize the likelihood of interactions from other system components:

SYSGEN_NETWORKING=1

SYSGEN_SHELL=1

Subtests

The following table lists the subtests included in this test.

SubTest ID

Description

1

Usage message for the RTC Alarm tests.

Prints out the usage message for the RTC Alarm tests. The message tells the user what the tests do and also specifies the input that the user needs to provide to run the tests.

1000

Verify RTC Alarm Resolution.

Checks and prints out the RTC alarm resolution. The user needs to verify whether the value is as expected.

1001

Verify RTC Alarm fires after the correct duration.

This test verifies that that RTC alarm is able to fire correctly after various time durations. Since random test durations are used, the test length will vary each time. The OAL function OEMSetAlarmTime is accessed via the SetKernelAlarm API.

1002

Verify RTC Alarm fires at all times that fall within the RTC-supported time range.

This test verifies that that RTC alarm is able to fire correctly when set to various times. The OEMSetAlarmTime is called via the SetKernelAlarm API. Only time values within the RTC-supported range are checked.

1003

Verify RTC alarm fires at user-provided time and duration.

This test verifies that the RTC alarm fires at a user-specified time, or after a user-specified duration.

Setting Up the Test

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

Running the Test

Command-line parameters:

This test library can have one or more optional command-line entries. To specify one or more command-line entries to the test library, you must first use the -c command-line option. This option causes Tux to pass the specified string into the test library. For more information about how to edit the command line for a test, see Editing the Command-Line for a Test.

The OAL RTC Alarm Test executes the "tux -o -d oalTestRtcAlarm.dll -c "-fireAlarmInSec 100"" command line on default execution. The '-fireAlarmInSec 100' command-line parameter is used by test case 1003.

The following table shows the command-line parameters for the OAL RTC Alarm test.

Command-line Parameter

Description

-dateAndTime

Use to test alarm firing at the specified time. Time should be specified in the "mm/dd/yyyy hh:mm:ss" format.

-fireAlarmInSec

Use to test alarm firing after the specified duration. Duration should be specified in number of seconds.

Verifying the Test

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

Troubleshooting the Test

  • Ensure that you are running on a minimal OS configuration.
  • Ensure that drivers and servers running on the OS meet real-time constraints and do not interrupt the test.
  • Ensure the RTC clock works correctly (see the System Clock (Real-Time Clock) tests).
  • If the test ID 1003 fails, ensure that the user specified at least one of "-dateAndTime <mm/dd/yyyy hh:mm:ss>" or "-fireAlarmInSec <sec>" command-line parameters.
  • Determine the point of failure and record the exact error message. Check that the setup steps were followed and that all prerequisites were met. If the source code is available, examine the point of failure in code to see if any additional information can be gathered about the failure domain.

See Also

Other Resources

OAL - KITL, Memory, RTC Tests