Share via


Smart Card Reader Insertion/Removal During Suspend Test (Compact 7)

3/12/2014

This test verifies whether the smart card subsystem properly handles the removal or insertion of a card reader while the system is suspended.

Test Prerequisites

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

The following table shows the hardware requirements for the Smart Card Reader Insertion and Removal During Suspend Test.

Requirements Description

Smart card reader

The smart card reader that you want to test.

Any of the cards included in the PC/SC Test Cards v.2.0.

You can obtain a list of these cards from the PC/SC Workgroup Web site:http://www.pcscworkgroup.com/

The following table shows the software requirements for the Smart Card Reader Insertion and Removal During Suspend Test.

Requirements Description

Tux.exe

Test harness, which executes the tests

Kato.dll

Logging engine, which logs test data

IFDTestTux.dll

The Tux DLL that contains the tests

USBCCID.dll or other smart card reader driver DLL

The smart card reader driver

Subtests

The table below lists the subtests included in this test.

SubTest ID Description

2003

Smart Card Reader Insertion and Removal During Suspend Test.

Setting Up the Test

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

Running the Test

Command Syntax:

tux -o -d ifdtesttux -c " [-w]" [-x TestCaseID]

Command-line parameters Description

-x TestCaseID

Specifies the test case to run.

-w seconds

Specifies the number of seconds before the system suspends.

The following procedure describes the steps and functionality of this test. To run this test using the default values, at the command-line, type tux -o -d ifdtesttux -x2003.

To run the Smart Card Reader Insertion and Removal during Suspend Test

1.The test operator attaches a smart card reader to the system.

2.The test opens a handle to the card reader. Then it performs a quick sanity check by requesting the card state of the smart card reader.

3.Test suspends the system.

4.While the system is suspended, the test operator detaches the smart card reader, and then re-attaches it to the same USB port from which it was detached.

5.Test wakes the system.

6.Test verifies whether a card reader is connected. Then it opens a handle to the card reader and runs AutoIFD, the one-card version of the Smart Card Protocol tests described in the Smart Card Reader Test (IFDTest2) topic.

7.Test closes the handle to the smart card reader.

8.Test suspends the system.

9.While the system is suspended, the test operator detaches the smart card reader. Then the test operator re-attaches it to a USB port that is different from the one that it was detached from.

10.Test wakes the system.

11.Test verifies whether a card reader is connected. Then it opens a handle to the card reader and runs AutoIFD.

12.Test closes the handle to the card reader.

13.Test suspends the system.

14.While the system is suspended, the test operator detaches the smart card reader from the system.

15.Test wakes the system.

16.As soon as the system resumes, the test operator attaches the smart card reader to the same USB port from which it was detached in step 14.

17.Test verifies whether a card reader is connected. Then it opens a handle to the card reader and runs AutoIFD.

18.Test closes the handle to the card reader.

19.Test suspends the system.

20.While the system is suspended, the test operator detaches the smart card reader from the system.

21.Test wakes the system.

22.As soon as the system resumes, the test operator attaches the smart card reader to a USB port that is different from the one that it was detached from in step 20.

23.Test verifies whether a card reader is connected. Then it opens a handle to the card reader and runs AutoIFD.

24.Test closes the handle to the card reader.

25.The test operator detaches the card reader from the system.

26.Test suspends the system.

27.While the system is suspended, the test operator attaches a smart card reader to the system.

28.Test wakes the system.

29.As soon as the system resumes, the test verifies whether a card reader is connected. Then it opens a handle to the card reader and runs AutoIFD.

30.Test closes the handle to the card reader.

Verifying the Test

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

Troubleshooting the Test

The following table describes troubleshooting tips for the Smart Card Reader Insertion and Removal During Suspend test.

Issue Description

System does not automatically resume after having been suspended for fifteen seconds.

Wake the system manually, for example by using a keyboard, mouse or other input device with direct hardware-interrupt ability.

Test fails when using legacy drivers.

Certain legacy drivers, for example STCUSB.DLL, require that calls to IOCTLs be made from the kernel. If they are not made from the kernel, the test fails. To work around this issue, run Tux using the -n parameter: tux -o -n -d ifdtesttux

The Windows Embedded Compact Test Kit (CTK) displays an informational icon that indicates that Smart Card peripheral hardware was not detected

The CTK does not correctly detect the presence of the peripheral hardware. Therefore, the CTK incorrectly displays an informational icon that indicates that peripheral hardware was not detected. You can still test the USB CCID Smart Card reader by using the CTK, even though the CTK user interface indicates that the Smart Card peripheral hardware was not detected.

When you are running these test cases on a Windows Embedded CE PC-based development platform (CEPC), if the Smart Card reader is inserted before you turn on the CEPC, USBCCID.dll is not loaded when the CEPC is turned on.

After you turn on the CEPC, remove the Smart Card reader from the CEPC, and then reinsert it.

For additional platform specific issues, consult the CTK articles on the TechNet wiki.

See Also

Other Resources

Smart Card Tests