Skip to content

qtests: tpm: Add test cases for TPM TIS I2C device emulation

Stefan Berger qemu-devel 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest3 patches 1 replyIn review
  2. v43 patches 2 repliesSuperseded
  3. v33 patches 3 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v13 patches10 repliesSuperseded

Changes in v5 from the cover letter

- 3/3: Added more test cases; read from REG_STS + 1 and + 3; try to select an invalid locality

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3qtest: Add functions for accessing devices on Aspeed I2C controllerinclude/hw/i2c/aspeed_i2c.h tests/qtest/qtest_aspeed.c tests/qtest/qtest_aspeed.h+165 -00 replies
2/3qtest: Move tpm_util_tis_transmit() into tpm-tis-utils.c and rename ittests/qtest/tpm-crb-swtpm-test.c tests/qtest/tpm-crb-test.c tests/qtest/tpm-tis-device-swtpm-test.c +5 more+56 -590 replies
3/3qtest: Add a test case for TPM TIS I2C connected to Aspeed I2C controllertests/qtest/meson.build tests/qtest/tpm-tis-i2c-test.c+666 -01 reply

Reviews trailers per patch

2 of 3 patches have a Reviewed-by or Acked-by.

PatchNinad PalsuleThomas HuthCédric Le Goater
1/3R-b A-b R-b
2/3R-b R-b
3/3T-b T-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v5 thread

Cover letter [PATCH v5 0/3] qtests: tpm: Add test cases for TPM TIS I2C device emulation

This series adds test cases exercising much of the TPM TIS I2C device model 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 (v12):
https://lists.nongnu.org/archive/html/qemu-devel/2023-03/msg07258.html

Regards,
Stefan

v5:
- 3/3: Added more test cases; read from REG_STS + 1 and + 3; try to select an invalid locality

v4:
- 1/3: Use qtest_writel() and qtest_readl()

v3:
- 1/3: Renaming of inline function and added comment
- 3/3: Made variables static

v2:
- Split off Aspeed I2C controller library functions
- Tweaking on test cases

Stefan Berger (3):
qtest: Add functions for accessing devices on Aspeed I2C controller
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

 include/hw/i2c/aspeed_i2c.h             |   7 +
 tests/qtest/meson.build                 |   3 +
 tests/qtest/qtest_aspeed.c              | 117 +++++
 tests/qtest/qtest_aspeed.h              |  41 ++
 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          | 663 ++++++++++++++++++++++++
 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 -
 13 files changed, 887 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
Signature · 1 line
2.39.2