[PATCH 0/2] qtests: tpm: Add test cases for TPM TIS I2C device emulation

Stefan Berger posted 2 patches 1 year ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20230327003703.3539303-1-stefanb@linux.ibm.com
Maintainers: Thomas Huth <thuth@redhat.com>, Laurent Vivier <lvivier@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, "Cédric Le Goater" <clg@kaod.org>, Peter Maydell <peter.maydell@linaro.org>, Andrew Jeffery <andrew@aj.id.au>, Joel Stanley <joel@jms.id.au>, Stefan Berger <stefanb@linux.vnet.ibm.com>
There is a newer version of this series
tests/qtest/meson.build                 |   3 +
tests/qtest/qtest_aspeed.c              | 117 +++++
tests/qtest/qtest_aspeed.h              |  27 +
tests/qtest/tpm-crb-swtpm-test.c        |   3 -
tests/qtest/tpm-crb-test.c              |   3 -
tests/qtest/tpm-tis-device-swtpm-test.c |   5 +-
tests/qtest/tpm-tis-i2c-test.c          | 628 ++++++++++++++++++++++++
tests/qtest/tpm-tis-swtpm-test.c        |   5 +-
tests/qtest/tpm-tis-util.c              |  47 +-
tests/qtest/tpm-tis-util.h              |   4 +
tests/qtest/tpm-util.c                  |  45 --
tests/qtest/tpm-util.h                  |   3 -
12 files changed, 831 insertions(+), 59 deletions(-)
create mode 100644 tests/qtest/qtest_aspeed.c
create mode 100644 tests/qtest/qtest_aspeed.h
create mode 100644 tests/qtest/tpm-tis-i2c-test.c
[PATCH 0/2] qtests: tpm: Add test cases for TPM TIS I2C device emulation
Posted by Stefan Berger 1 year ago
Refactor existing test code and move tpm_util_tis_transmit() into
tpm-tis-utils.c to avoid having to declare tpm_tis_base_addr in test
cases that have nothing to do with TIS and shouldn't need to provide
this variable.

Add test cases exercising much of the TPM TIS I2C device emulation
assuming that the device is connected to the Aspeed I2C controller.
Tests are passing on little and big endian hosts.

This series of patches builds on the following series of patches
providing the TPM TIS I2C device emulation:
https://lists.nongnu.org/archive/html/qemu-devel/2023-03/msg06253.html

Regards,
    Stefan


Stefan Berger (2):
  qtest: Move tpm_util_tis_transmit() into tpm-tis-utils.c and rename it
  qtest: Add a test case for TPM TIS I2C connected to Aspeed I2C
    controller

 tests/qtest/meson.build                 |   3 +
 tests/qtest/qtest_aspeed.c              | 117 +++++
 tests/qtest/qtest_aspeed.h              |  27 +
 tests/qtest/tpm-crb-swtpm-test.c        |   3 -
 tests/qtest/tpm-crb-test.c              |   3 -
 tests/qtest/tpm-tis-device-swtpm-test.c |   5 +-
 tests/qtest/tpm-tis-i2c-test.c          | 628 ++++++++++++++++++++++++
 tests/qtest/tpm-tis-swtpm-test.c        |   5 +-
 tests/qtest/tpm-tis-util.c              |  47 +-
 tests/qtest/tpm-tis-util.h              |   4 +
 tests/qtest/tpm-util.c                  |  45 --
 tests/qtest/tpm-util.h                  |   3 -
 12 files changed, 831 insertions(+), 59 deletions(-)
 create mode 100644 tests/qtest/qtest_aspeed.c
 create mode 100644 tests/qtest/qtest_aspeed.h
 create mode 100644 tests/qtest/tpm-tis-i2c-test.c

-- 
2.39.2