Smart Card Reader Surprise Removal Test (Compact 7)
3/12/2014
The Smart Card Reader Surprise Removal Test tests whether the unexpected removal of the smart card reader results in the appropriate smart card reader subsystem state.
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 Surprise Removal 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 Surprise Removal test.
Requirements | Description |
---|---|
Tux.exe |
Test harness, which executes the test |
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 |
---|---|
2001 |
Smart Card Reader Surprise Removal 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 "[-n iterations] [-p iterations] [-c]" [-x TestCaseID]
Command-line parameter | Description |
---|---|
-x TestCaseID |
Specifies the test case to run. |
-n iterations |
Specifies how many times to run the test. The default value of iterations is 1. To repeat indefinitely, set the value of iterations to 0. |
-p iterations |
Specifies the number of insertion and removal cycles that the test performs before executing AutoIFD. |
To run this test using the default values, at the command line :s tux -o -d ifdtesttux -x 2001
The following procedure describes the functionality of the Smart Card Reader Surprise Removal Test
1.The test operator detaches the smart card reader from the system.
2.The test operator attaches the smart card reader to the system.
3.The test opens a handle to the reader and runs AutoIFD, the one-card version of the Smart Card Protocol Tests described in the Smart Card Reader Test (IFDTest2) topic.
4.During the AutoIFD test, the test operator detaches the card reader at any point.
5.The test closes the smart card reader handle.
6.The test operator attaches a smart card reader to the system.
7.The test opens a handle to the reader and runs AutoIFD, the one-card version of the Smart Card Protocol Tests described in the Smart Card Reader Test (IFDTest2) topic.
8.The test closes the handle to the smart card reader.
The number of iterations of the full test can be configured by using the -c "-n iterations" command-line parameter. Steps one and two can be configured to repeat within each full test iteration by using the -c "-p iterations" command-line parameter. The following example shows how you can use command-line parameters to configure the test to iterate two times.
tux -o -d ifdtesttux -c "-n 2" -x2001
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 Surprise Removal Test.
Issue | Solution |
---|---|
Test fails when using legacy drivers. |
Certain legacy drivers, such as 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 |
When you are running these test cases on a Windows Embedded Compact 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.