On 10/15/24 2:11 PM, Fabiano Rosas wrote:
Hi Stefan,

I see the tpm-tis-device-swtpm test timing out, could you take a look?

qemu:qtest+qtest-aarch64 / qtest-aarch64/tpm-tis-device-swtpm-test time out 
(After 60.0 seconds)
135/138 qemu:qtest+qtest-aarch64 /
qtest-aarch64/tpm-tis-device-swtpm-test TIMEOUT 60.01s killed by signal 11 
SIGSEGV

Is this something new or been happening for a while? Does it happen consistently? I just build the master branch and ran the tests on a very old machine, I mean 13 years old. The host runs Fedora 40 with libtpms-0.96-6 + swtpm-0.9.0 from the distro:

104/473 qemu:qtest+qtest-aarch64 / qtest-aarch64/tpm-tis-device-swtpm-test OK 2.32s 2 subtests passed

I see some other non-TPM tests timing out but not this one. Same result for TIS test on 2nd run.

104/473 qemu:qtest+qtest-aarch64 / qtest-aarch64/tpm-tis-device-swtpm-test OK 2.51s 2 subtests passed

3rd run:

104/473 qemu:qtest+qtest-aarch64 / qtest-aarch64/tpm-tis-device-swtpm-test OK 2.37s 2 subtests passed

4th run:

104/473 qemu:qtest+qtest-aarch64 / qtest-aarch64/tpm-tis-device-swtpm-test OK 2.63s 2 subtests passed



If I run it as a single test on the command line like this then it consistently works here - I ran it >10 times now.

$ QTEST_QEMU_BINARY=build/qemu-system-aarch64 ./build/tests/qtest/tpm-tis-device-swtpm-test
TAP version 13
# random seed: R02S8155b3cf024c2696e895e5f548396138
1..2
# Start of aarch64 tests
# Start of tpm tests
# Start of tis-swtpm tests
# starting QEMU: exec build/qemu-system-aarch64 -qtest unix:/tmp/qtest-3738308.sock -qtest-log /dev/null -chardev socket,path=/tmp/qtest-3738308.qmp,id=char0 -mon chardev=char0,mode=control -display none -audio none -machine virt,gic-version=max -accel tcg -chardev socket,id=chr,path=/tmp/qemu-tpm-tis-device-swtpm-test.YEUOV2/sock -tpmdev emulator,id=dev,chardev=chr -device tpm-tis-device,tpmdev=dev -accel qtest
ok 1 /aarch64/tpm/tis-swtpm/test
# slow test /aarch64/tpm/tis-swtpm/test executed in 0.66 secs
# End of tis-swtpm tests
# Start of tis-swtpm-migration tests
# starting QEMU: exec build/qemu-system-aarch64 -qtest unix:/tmp/qtest-3738308.sock -qtest-log /dev/null -chardev socket,path=/tmp/qtest-3738308.qmp,id=char0 -mon chardev=char0,mode=control -display none -audio none -machine virt,gic-version=max -accel tcg -chardev socket,id=chr,path=/tmp/qemu-tpm-tis-device-swtpm-test.YEUOV2/sock -tpmdev emulator,id=dev,chardev=chr -device tpm-tis-device,tpmdev=dev -accel qtest # starting QEMU: exec build/qemu-system-aarch64 -qtest unix:/tmp/qtest-3738308.sock -qtest-log /dev/null -chardev socket,path=/tmp/qtest-3738308.qmp,id=char0 -mon chardev=char0,mode=control -display none -audio none -machine virt,gic-version=max -accel tcg -chardev socket,id=chr,path=/tmp/qemu-tpm-tis-device-swtpm-test.V9TOV2/sock -tpmdev emulator,id=dev,chardev=chr -device tpm-tis-device,tpmdev=dev -incoming unix:/tmp/qemu-tpm-tis-device-swtpm-test.YEUOV2/migsocket -accel qtest
ok 2 /aarch64/tpm/tis-swtpm-migration/test
# slow test /aarch64/tpm/tis-swtpm-migration/test executed in 1.10 secs
# End of tis-swtpm-migration tests
# End of tpm tests
# End of aarch64 tests





(gdb) bt
#0 0x00005654e7ac4872 in tpm_tis_transfer (s=0x5654e7dec570, req=0x5654e7b42410 <tpm_pcrread> 
"\200\001", req_size=21, rsp=0x7ffd2295ca00 '\377' <repeats 200 times>..., 
rsp_size=1024) at ../tests/qtest/tpm-tis-util.c:490
#1 0x00005654e7ac1879 in tpm_util_pcrread (s=0x5654e7dec570, tx=0x5654e7ac467a 
<tpm_tis_transfer>, exp_resp=0x5654e7b42620 <tpm_pcrread_resp> "\200\001", 
exp_resp_size=63) at ../tests/qtest/tpm-util.c:96
#2 0xffffffffffffffff in ?? ()
...

(gdb) l
485         sts = qtest_readl(s, TIS_REG(0, TPM_TIS_REG_STS));
486         bcount = (sts >> 8) & 0xffff;
487
488         memset(rsp, 0, rsp_size);
489         for (i = 0; i < bcount; i++) {
490             rsp[i] = qtest_readb(s, TIS_REG(0, TPM_TIS_REG_DATA_FIFO));
491         }
492
493         /* relinquish use of locality 0 */
494         qtest_writeb(s, TIS_REG(0, TPM_TIS_REG_ACCESS),
(gdb) p rsp_size
$5 = 1024
(gdb) p bcount
$6 = 65535

Thanks!


Reply via email to