Compartilhar via


Serial Port Driver BVT (Compact 2013)

3/26/2014

Serial driver API BVT functional test that requires no serial communication with another test device. This test simply tests the serial driver APIs.

Test Prerequisites

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

Note: This test requires an actual serial port. It will fail when run against an NDIS-based IrDA driver.

The following table shows the hardware requirements for the Serial Port Driver Test.

Requirements

Description

One or more serial ports

Serial ports can be attached as COM1: through COM9:. The test will automatically search for active serial ports.

The following table shows the software requirements for the Serial Port Driver Test.

Requirements

Description

SerDrvBVT.dll

Test .dll file.

Tux.exe

Tux Test Harness, which is required for executing the test.

Kato.dll

Kato Logging Engine, which is required for logging test data.

Subtests

The table below lists the subtests included in this test.

SubTest ID

Description

1001

Configures the port and writes data to the port at all possible baud rates, data bits, parities, and stop bits. This test fails if it cannot send data on the port with a particular configuration. The output log shows details of a failure.

1002

Tests the SetCommEvent and GetCommEvent functions. This test fails if the driver does not properly support the SetCommEvent or GetCommEvent functions. The output log shows details of a failure.

1003

Tests the EscapeCommFunction function. This test fails if the driver does not support one of the Microsoft Win32 EscapeCommFunction functions. The output log shows details of a failure.

1004

Tests the WaitCommEvent function on the EV_TXEMPTY event. The test creates a thread to send data and waits for the EV_TXEMPTY event to occur when the thread finishes sending data. This test fails if the WaitCommEvent function behaves improperly or if the EV_TXEMPTY event does not signal appropriately. The output log shows details of a failure.

1005

Tests the SetCommBreak and ClearCommBreak functions. This test fails if the driver does not properly support the SetCommBreak or ClearCommBreak functions. The output log shows details of a failure.

1006

Makes the WaitCommEvent function return a value when the handle for the current COM port is cleared. This test fails if the WaitCommEvent function behaves improperly. The output log shows details of a failure.

1007

Makes the WaitCommEvent function return a value when the handle for the current COM port is closed. This test fails if the WaitCommEvent function behaves improperly. The output log shows details of a failure.

1008

Tests the SetCommTimeouts function and verifies that the ReadFile function properly times out when no data is received. This test fails if the COM timeouts do not function correctly. The output log shows details of a failure.

1009

Verifies that previous Device Control Block (DCB) settings are preserved when the SetCommState function call fails with DCB settings that are not valid. This test fails if the serial port driver does not keep previous DCB settings when DCB settings that are not valid are passed to the driver.

Setting Up the Test

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

Running the Test

The Serial Port Driver Test executes the tux -o -d serdrvbvt command line on default execution. You can modify the test by editing the command line. The following table shows the command line parameters for the Serial Port Driver Test.

Command Line Parameter

Description

-p COMx:

Specifies a communications (COM) port, where 'x' is the number of the serial port specified.

-u

Runs the test against USB Serial Ports.

Verifying the Test

When the test completes running, verify that "PASS" appears in the test log for all sub-tests.

Troubleshooting the Test

The serial port being tested must be a physical serial port. It cannot be an NDIS-based IrDA driver.

See Also

Other Resources

Communication Bus Tests