Bug 1473726 - tpmtest: not sure what testcase runs
tpmtest: not sure what testcase runs
Status: NEW
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: tpm2-tss (Show other bugs)
7.4
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Jerry Snitselaar
Vilém Maršík
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-07-21 09:52 EDT by Vilém Maršík
Modified: 2017-07-21 10:23 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Vilém Maršík 2017-07-21 09:52:45 EDT
Description of problem:

Some sections of "tpmtest" contain different number of testcases described and run, making it difficult/impossible to find out which testcases indeed ran/succeeded/failed:

Section; #Described; #Results
8; 14; 9
13; 5; 4
15; 34; 33
21; 3; 2

Additionally:
* section 2 is missing /:(Passed|Failed)/ for description of Tss2_Sys_Execute.
* sections 33-38 use string "PASSED!" in the description part, making it confusing on the first sight (looks like tests were already run there)

Example - section 8 - GET TEST RESULT TESTS - description:
PRINT DESCRIPTION ON ALL CASES IN THIS GROUP:
  Test the one-call interface:
        Tss2_Sys_GetTestResult:Passed
  Test the syncronous,non-one-call interface:
        Tss2_Sys_GetTestResult_Prepare:Passed
        Tss2_Sys_Execute:Passed
        Tss2_Sys_GetTestResult_Complete:Passed
  Test the asyncronous,non-one-call interface:
        Tss2_Sys_GetTestResult_Prepare:Passed
        Tss2_Sys_ExecuteAsync:Passed
        Tss2_Sys_ExecuteFinish(timeout:TSS2_TCTI_TIMEOUT_BLOCK):Passed
        Tss2_Sys_GetTestResult_Complete:Passed
  TpmReset Case:Passed
  Check case of ExecuteFinish receving TPM error code:
        Tss2_Sys_GetCapability_Prepare(capability:TPM_CAP_TPM_PROPERTIES,property:TPM_PT_ACTIVE_SESSIONS_MAX,propertyCount:1):Passed
        Tss2_Sys_ExecuteAsync:Passed
        Tss2_Sys_ExecuteFinish(timeout:TSS2_TCTI_TIMEOUT_BLOCK):Failed(0x100)
        Tss2_Sys_GetCapability_Complete:Failed(TSS2_SYS_RC_BAD_SEQUENCE)
  TPMS_Startup(TPM_SU_CLEAR):Passed

And results:
RUN ALL TEST CASES:

GET TEST RESULT TESTS:
        passing case:   PASSED!
        passing case:   PASSED!
        passing case:   PASSED!
        passing case:   PASSED!
        passing case:   PASSED!
        passing case:   PASSED!
        passing case:   PASSED!
        passing case:   PASSED!


Version-Release number of selected component (if applicable):
tpm2-tss-utils-1.0-5.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1. start resourcemgr
2. for A in 8 13 15 21; do echo -e "$A\nd\n0\nq\nq" | tpmtest | tee $A.log; done
3. see *.log


Actual results:
see above


Expected results:
Logs with testcase results linked to testcase names, that can be simply parsed. E.g.:
TEST RESULTS:
\t(PASSED|FAILED)\t${testcase_name}
...

Additional info:
Not sure if this can be reproduced without TPM2 hardware.

Note You need to log in before you can comment on or make changes to this bug.