Skip to content

Commit

Permalink
tests/tpm-vm: Add tests for handling TPMs with long names
Browse files Browse the repository at this point in the history
Signed-off-by: hamistao <[email protected]>
  • Loading branch information
hamistao committed May 27, 2024
1 parent f2663ff commit 0f77f8a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/tpm-vm
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,13 @@ waitInstanceReady "${vmName}"
! lxc exec "${vmName}" -- stat /dev/tpm0 || false
! lxc exec "${vmName}" -- stat /dev/tpmrm0 || false
lxc stop "${vmName}" --force

# TPM names are included on the swtpm socket path and long socket paths can cause problems if not handled correctly.
echo "==> Test handling TPMs with long names"
longName="tpm-device-with-long-name-for-testing"
lxc config device add "${vmName}" "${longName}" tpm
lxc start "${vmName}"
waitInstanceReady "${vmName}"
lxc exec "${vmName}" -- stat /dev/tpm0
lxc exec "${vmName}" -- stat /dev/tpmrm0
lxc delete "${vmName}" --force

0 comments on commit 0f77f8a

Please sign in to comment.