summaryrefslogtreecommitdiff
path: root/test/py/tests/test_tpm2.py
AgeCommit message (Collapse)AuthorFilesLines
2021-09-24test/py: tpm2: Skip tpm pytest based on env variableT Karthik Reddy1-0/+28
Tpm test cases relies on tpm device setup. Provide an environment variable "env__tpm_device_test_skip = True" to skip the test case if tpm device is not present. Only needed will have to add variable to the py-test framework. Test runs successfully even this variable is absent. Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com> Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com> Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2021-08-01sandbox: tpm: Support extending a PCR multiple timesSimon Glass1-1/+17
It is fairly easy to handle this case and it makes the emulator more useful, since PCRs are commonly extended several times. Add support for this, using U-Boot's sha256 support. For now sandbox only supports a single PCR, but that is enough for the tests that currently exist. Signed-off-by: Simon Glass <sjg@chromium.org>
2018-07-28test/py: tpm2: switch from 'tpm' to 'tpm2' commandMiquel Raynal1-20/+20
While using the 'tpm' command should work on most cases, this test suite only works with TPMv2 and since the work to make both versions build at the same time, we might end up having both 'tpm' (TPMv1) and 'tpm2' (TPMv2) commands available at the same time. Ensure this test suite always use the right one. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-07-20test/py: remove hacks for non-zero RAM base address in testsQuentin Schulz1-2/+2
Some functions have different behaviour when the given address is 0 (assumed to be NULL by the function). find_ram_base() does not return 0 anymore so it's safe to remove those offsets. Suggested-by: Stephen Warren <swarren@wwwdotorg.org> Signed-off-by: Quentin Schulz <quentin.schulz@bootlin.com> Reviewed-by: Stephen Warren <swarren@nvidia.com> Tested-by: Stephen Warren <swarren@nvidia.com>
2018-05-26test/py: add TPMv2.x test suiteMiquel Raynal1-0/+233
Add tests for the TPMv2.x commands. These commands may run both on a physical TPM and with the sandbox driver. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>