stefanberger / swtpm

Libtpms-based TPM emulator with socket, character device, and Linux CUSE interface.
Other
576 stars 143 forks source link

0.6.0: test suite is failing #454

Closed kloczek closed 3 years ago

kloczek commented 3 years ago

Source tree configured with:

%configure \
        --with-openssl \
        --without-cuse \
        --without-selinux \

Than build and check:

+ /usr/bin/make -O -j48 V=1 VERBOSE=1 check
Making check in etc
make[1]: Nothing to be done for 'check'.
Making check in include
Making check in swtpm
make[2]: Nothing to be done for 'check'.
make[2]: Nothing to be done for 'check-am'.
Making check in man
Making check in man3
make[2]: Nothing to be done for 'check'.
Making check in man8
make[2]: Nothing to be done for 'check'.
make[2]: Nothing to be done for 'check-am'.
Making check in samples
make[1]: Nothing to be done for 'check'.
Making check in src
Making check in utils
make[2]: Nothing to be done for 'check'.
Making check in swtpm
make[2]: Nothing to be done for 'check'.
Making check in swtpm_bios
make[2]: Nothing to be done for 'check'.
Making check in swtpm_cert
make[2]: Nothing to be done for 'check'.
Making check in swtpm_ioctl
make[2]: Nothing to be done for 'check'.
Making check in swtpm_setup
make[2]: Nothing to be done for 'check'.
make[2]: Nothing to be done for 'check-am'.
Making check in tests
/usr/bin/make
make[2]: Nothing to be done for 'all'.
/usr/bin/make  check-TESTS
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
SKIP: test_vtpm_proxy
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
SKIP: test_tpm2_vtpm_proxy
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
SKIP: test_tpm12
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
SKIP: test_tpm2_save_load_state_2
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
SKIP: test_tpm2_save_load_state_3
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
SKIP: test_tpm2_ibmtss2
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
SKIP: test_samples_create_tpmca
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
SKIP: test_tpm2_partial_reads
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
PASS: test_swtpm_cert
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
PASS: test_tpm2_swtpm_cert
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
PASS: test_print_capabilities
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
PASS: test_tpm2_print_capabilities
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
SKIP: test_tpm2_samples_create_tpmca
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
PASS: test_tpm2_swtpm_cert_ecc
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
PASS: test_ctrlchannel3
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
FAIL: test_commandline
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
PASS: test_ctrlchannel4
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
PASS: test_swtpm_setup_create_cert
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
PASS: test_tpm2_swtpm_setup_create_cert
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
FAIL: test_hashing
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
FAIL: test_setbuffersize
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
FAIL: test_encrypted_state
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
FAIL: test_locality
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
FAIL: test_getcap
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
FAIL: test_tpm_probe
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
FAIL: test_resume_volatile
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
FAIL: test_volatilestate
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
FAIL: test_tpm2_derived_keys
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
FAIL: test_hashing2
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
FAIL: test_tpm2_locality
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
FAIL: test_swtpm_bios
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
FAIL: test_tpm2_hashing2
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
FAIL: test_tpm2_getcap
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
FAIL: test_tpm2_encrypted_state
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
FAIL: test_wrongorder
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
FAIL: test_tpm2_wrongorder
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
FAIL: test_tpm2_hashing3
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
FAIL: test_tpm2_hashing
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
FAIL: test_tpm2_volatilestate
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
FAIL: test_tpm2_probe
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
FAIL: test_save_load_state
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
FAIL: test_tpm2_savestate
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
FAIL: test_init
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
FAIL: test_migration_key
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
FAIL: test_tpm2_resume_volatile
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
FAIL: test_save_load_encrypted_state
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
FAIL: test_tpm2_setbuffersize
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
FAIL: test_tpm2_swtpm_bios
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
FAIL: test_tpm2_save_load_state_da_timeout
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
FAIL: test_tpm2_init
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
FAIL: test_tpm2_migration_key
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
FAIL: test_tpm2_save_load_encrypted_state
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
FAIL: test_ctrlchannel
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
FAIL: test_tpm2_ctrlchannel2
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
FAIL: test_ctrlchannel2
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
PASS: test_tpm2_samples_swtpm_localca
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
PASS: test_parameters
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
PASS: test_tpm2_parameters
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
PASS: test_tpm2_samples_swtpm_localca_pkcs11
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
=======================================
   swtpm 0.6.0: tests/test-suite.log
=======================================

# TOTAL: 59
# PASS:  13
# SKIP:  9
# XFAIL: 0
# FAIL:  37
# XPASS: 0
# ERROR: 0

.. contents:: :depth: 2

SKIP: test_vtpm_proxy
=====================

Need to be root to run this test.
SKIP test_vtpm_proxy (exit status: 77)

SKIP: test_tpm2_vtpm_proxy
==========================

Need to be root to run this test.
SKIP test_tpm2_vtpm_proxy (exit status: 77)

FAIL: test_ctrlchannel2
=======================

OK
swtpm: Could not open TCP socket: Address already in use
Error: Socket TPM did not write pidfile.
FAIL test_ctrlchannel2 (exit status: 1)

FAIL: test_tpm2_ctrlchannel2
============================

OK
swtpm: Could not open TCP socket: Address already in use
Error: Socket TPM did not write pidfile.
FAIL test_tpm2_ctrlchannel2 (exit status: 1)

FAIL: test_commandline
======================

'^ [[:print:]]+$' occurrences: 1695 (OK)
'^  [[:print:]]+$' occurrences: 1675 (OK)
'^   [[:print:]]+$' occurrences: 1675 (OK)
'^    [[:print:]]+$' occurrences: 1675 (OK)
'^     [[:print:]]+$' occurrences: 1592 (OK)
'^      [[:print:]]+$' occurrences: 600 (OK)
'^       [[:print:]]+$' occurrences: 36 (OK)
Test 1 passed
./test_commandline: line 132: /dev/tcp/localhost/11234: No such file or directory
Test 2 failed: Could not connect to TPM
FAIL test_commandline (exit status: 1)

FAIL: test_ctrlchannel
======================

'^ [[:print:]]+$' occurrences: 2282 (OK)
'^  [[:print:]]+$' occurrences: 2254 (OK)
'^   [[:print:]]+$' occurrences: 2254 (OK)
'^    [[:print:]]+$' occurrences: 2254 (OK)
'^     [[:print:]]+$' occurrences: 2235 (OK)
'^      [[:print:]]+$' occurrences: 918 (OK)
'^       [[:print:]]+$' occurrences: 33 (OK)
OK
==== Starting swtpm with interfaces socket+unix ====
Server did not open port 65430
./test_ctrlchannel: line 20: 4116622 Killed                  ${SWTPM_EXE} socket "$@" ${SWTPM_TEST_SECCOMP_OPT} --server type=tcp,port=${SWTPM_SERVER_PORT}${swtpm_server_disconnect} --ctrl type=unixio,path=${SWTPM_CTRL_UNIX_PATH}
FAIL test_ctrlchannel (exit status: 1)

FAIL: test_encrypted_state
==========================

Need to be root to run test with CUSE interface.
Need to be root to run test with CUSE interface.
==== Starting swtpm with interfaces socket+socket ====
Server did not open port 65400
/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests/common: line 23: 4114526 Killed                  ${SWTPM_EXE} socket "$@" ${SWTPM_TEST_SECCOMP_OPT} --server type=tcp,port=${SWTPM_SERVER_PORT}${swtpm_server_disconnect} --ctrl type=tcp,port=${SWTPM_CTRL_PORT}
FAIL test_encrypted_state (exit status: 1)

FAIL: test_getcap
=================

Need to be root to run test with CUSE interface.
Need to be root to run test with CUSE interface.
==== Starting swtpm with interfaces socket+socket ====
Server did not open port 65402
/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests/common: line 23: 4114586 Killed                  ${SWTPM_EXE} socket "$@" ${SWTPM_TEST_SECCOMP_OPT} --server type=tcp,port=${SWTPM_SERVER_PORT}${swtpm_server_disconnect} --ctrl type=tcp,port=${SWTPM_CTRL_PORT}
FAIL test_getcap (exit status: 1)

FAIL: test_hashing
==================

Need to be root to run test with CUSE interface.
Need to be root to run test with CUSE interface.
==== Starting swtpm with interfaces socket+socket ====
Server did not open port 65404
/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests/common: line 23: 4114583 Killed                  ${SWTPM_EXE} socket "$@" ${SWTPM_TEST_SECCOMP_OPT} --server type=tcp,port=${SWTPM_SERVER_PORT}${swtpm_server_disconnect} --ctrl type=tcp,port=${SWTPM_CTRL_PORT}
FAIL test_hashing (exit status: 1)

FAIL: test_hashing2
===================

Need to be root to run test with CUSE interface.
Need to be root to run test with CUSE interface.
==== Starting swtpm with interfaces socket+socket ====
Server did not open port 65406
/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests/common: line 23: 4114730 Killed                  ${SWTPM_EXE} socket "$@" ${SWTPM_TEST_SECCOMP_OPT} --server type=tcp,port=${SWTPM_SERVER_PORT}${swtpm_server_disconnect} --ctrl type=tcp,port=${SWTPM_CTRL_PORT}
FAIL test_hashing2 (exit status: 1)

FAIL: test_init
===============

Need to be root to run test with CUSE interface.
Need to be root to run test with CUSE interface.
==== Starting swtpm with interfaces socket+socket ====
Server did not open port 65408
/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests/common: line 23: 4115124 Killed                  ${SWTPM_EXE} socket "$@" ${SWTPM_TEST_SECCOMP_OPT} --server type=tcp,port=${SWTPM_SERVER_PORT}${swtpm_server_disconnect} --ctrl type=tcp,port=${SWTPM_CTRL_PORT}
FAIL test_init (exit status: 1)

FAIL: test_locality
===================

Need to be root to run test with CUSE interface.
Need to be root to run test with CUSE interface.
==== Starting swtpm with interfaces socket+socket ====
Server did not open port 65410
/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests/common: line 23: 4114554 Killed                  ${SWTPM_EXE} socket "$@" ${SWTPM_TEST_SECCOMP_OPT} --server type=tcp,port=${SWTPM_SERVER_PORT}${swtpm_server_disconnect} --ctrl type=tcp,port=${SWTPM_CTRL_PORT}
FAIL test_locality (exit status: 1)

FAIL: test_migration_key
========================

Need to be root to run test with CUSE interface.
Need to be root to run test with CUSE interface.
==== Starting swtpm with interfaces socket+socket ====
Server did not open port 65412
/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests/common: line 23: 4115040 Killed                  ${SWTPM_EXE} socket "$@" ${SWTPM_TEST_SECCOMP_OPT} --server type=tcp,port=${SWTPM_SERVER_PORT}${swtpm_server_disconnect} --ctrl type=tcp,port=${SWTPM_CTRL_PORT}
FAIL test_migration_key (exit status: 1)

FAIL: test_resume_volatile
==========================

Need to be root to run test with CUSE interface.
Need to be root to run test with CUSE interface.
==== Starting swtpm with interfaces socket+socket ====
Server did not open port 65414
/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests/common: line 23: 4114619 Killed                  ${SWTPM_EXE} socket "$@" ${SWTPM_TEST_SECCOMP_OPT} --server type=tcp,port=${SWTPM_SERVER_PORT}${swtpm_server_disconnect} --ctrl type=tcp,port=${SWTPM_CTRL_PORT}
FAIL test_resume_volatile (exit status: 1)

FAIL: test_save_load_encrypted_state
====================================

Need to be root to run test with CUSE interface.
Need to be root to run test with CUSE interface.
==== Starting swtpm with interfaces socket+socket ====
Server did not open port 65416
/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests/common: line 23: 4115060 Killed                  ${SWTPM_EXE} socket "$@" ${SWTPM_TEST_SECCOMP_OPT} --server type=tcp,port=${SWTPM_SERVER_PORT}${swtpm_server_disconnect} --ctrl type=tcp,port=${SWTPM_CTRL_PORT}
FAIL test_save_load_encrypted_state (exit status: 1)

FAIL: test_save_load_state
==========================

Need to be root to run test with CUSE interface.
Need to be root to run test with CUSE interface.
==== Starting swtpm with interfaces socket+socket ====
Server did not open port 65418
/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests/common: line 23: 4114888 Killed                  ${SWTPM_EXE} socket "$@" ${SWTPM_TEST_SECCOMP_OPT} --server type=tcp,port=${SWTPM_SERVER_PORT}${swtpm_server_disconnect} --ctrl type=tcp,port=${SWTPM_CTRL_PORT}
FAIL test_save_load_state (exit status: 1)

FAIL: test_setbuffersize
========================

Need to be root to run test with CUSE interface.
Need to be root to run test with CUSE interface.
==== Starting swtpm with interfaces socket+socket ====
Server did not open port 65432
/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests/common: line 23: 4114624 Killed                  ${SWTPM_EXE} socket "$@" ${SWTPM_TEST_SECCOMP_OPT} --server type=tcp,port=${SWTPM_SERVER_PORT}${swtpm_server_disconnect} --ctrl type=tcp,port=${SWTPM_CTRL_PORT}
FAIL test_setbuffersize (exit status: 1)

FAIL: test_volatilestate
========================

Need to be root to run test with CUSE interface.
Need to be root to run test with CUSE interface.
==== Starting swtpm with interfaces socket+socket ====
Server did not open port 65420
/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests/common: line 23: 4114673 Killed                  ${SWTPM_EXE} socket "$@" ${SWTPM_TEST_SECCOMP_OPT} --server type=tcp,port=${SWTPM_SERVER_PORT}${swtpm_server_disconnect} --ctrl type=tcp,port=${SWTPM_CTRL_PORT}
FAIL test_volatilestate (exit status: 1)

FAIL: test_swtpm_bios
=====================

Need to be root to run test with CUSE interface.
Need to be root to run test with CUSE interface.
==== Starting swtpm with interfaces socket+socket ====
Server did not open port 65424
/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests/common: line 23: 4114715 Killed                  ${SWTPM_EXE} socket "$@" ${SWTPM_TEST_SECCOMP_OPT} --server type=tcp,port=${SWTPM_SERVER_PORT}${swtpm_server_disconnect} --ctrl type=tcp,port=${SWTPM_CTRL_PORT}
FAIL test_swtpm_bios (exit status: 1)

FAIL: test_tpm_probe
====================

Need to be root to run test with CUSE interface.
Need to be root to run test with CUSE interface.
==== Starting swtpm with interfaces socket+socket ====
Server did not open port 65526
/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests/common: line 23: 4114681 Killed                  ${SWTPM_EXE} socket "$@" ${SWTPM_TEST_SECCOMP_OPT} --server type=tcp,port=${SWTPM_SERVER_PORT}${swtpm_server_disconnect} --ctrl type=tcp,port=${SWTPM_CTRL_PORT}
FAIL test_tpm_probe (exit status: 1)

SKIP: test_tpm12
================

SKIP test_tpm12 (exit status: 77)

FAIL: test_wrongorder
=====================

Need to be root to run test with CUSE interface.
Need to be root to run test with CUSE interface.
==== Starting swtpm with interfaces socket+socket ====
Server did not open port 65422
/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests/common: line 23: 4114871 Killed                  ${SWTPM_EXE} socket "$@" ${SWTPM_TEST_SECCOMP_OPT} --server type=tcp,port=${SWTPM_SERVER_PORT}${swtpm_server_disconnect} --ctrl type=tcp,port=${SWTPM_CTRL_PORT}
FAIL test_wrongorder (exit status: 1)

FAIL: test_tpm2_derived_keys
============================

Need to be root to run test with CUSE interface.
Need to be root to run test with CUSE interface.
==== Starting swtpm with interfaces socket+socket ====
Server did not open port 65444
/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests/common: line 23: 4114723 Killed                  ${SWTPM_EXE} socket "$@" ${SWTPM_TEST_SECCOMP_OPT} --server type=tcp,port=${SWTPM_SERVER_PORT}${swtpm_server_disconnect} --ctrl type=tcp,port=${SWTPM_CTRL_PORT}
FAIL test_tpm2_derived_keys (exit status: 1)

FAIL: test_tpm2_encrypted_state
===============================

Need to be root to run test with CUSE interface.
Need to be root to run test with CUSE interface.
==== Starting swtpm with interfaces socket+socket ====
Server did not open port 65534
/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests/common: line 23: 4114821 Killed                  ${SWTPM_EXE} socket "$@" ${SWTPM_TEST_SECCOMP_OPT} --server type=tcp,port=${SWTPM_SERVER_PORT}${swtpm_server_disconnect} --ctrl type=tcp,port=${SWTPM_CTRL_PORT}
FAIL test_tpm2_encrypted_state (exit status: 1)

FAIL: test_tpm2_init
====================

Need to be root to run test with CUSE interface.
Need to be root to run test with CUSE interface.
==== Starting swtpm with interfaces socket+socket ====
Server did not open port 65508
/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests/common: line 23: 4115363 Killed                  ${SWTPM_EXE} socket "$@" ${SWTPM_TEST_SECCOMP_OPT} --server type=tcp,port=${SWTPM_SERVER_PORT}${swtpm_server_disconnect} --ctrl type=tcp,port=${SWTPM_CTRL_PORT}
FAIL test_tpm2_init (exit status: 1)

FAIL: test_tpm2_getcap
======================

Need to be root to run test with CUSE interface.
Need to be root to run test with CUSE interface.
==== Starting swtpm with interfaces socket+socket ====
Server did not open port 65506
/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests/common: line 23: 4114906 Killed                  ${SWTPM_EXE} socket "$@" ${SWTPM_TEST_SECCOMP_OPT} --server type=tcp,port=${SWTPM_SERVER_PORT}${swtpm_server_disconnect} --ctrl type=tcp,port=${SWTPM_CTRL_PORT}
FAIL test_tpm2_getcap (exit status: 1)

FAIL: test_tpm2_locality
========================

Need to be root to run test with CUSE interface.
Need to be root to run test with CUSE interface.
==== Starting swtpm with interfaces socket+socket ====
Server did not open port 65510
/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests/common: line 23: 4114768 Killed                  ${SWTPM_EXE} socket "$@" ${SWTPM_TEST_SECCOMP_OPT} --server type=tcp,port=${SWTPM_SERVER_PORT}${swtpm_server_disconnect} --ctrl type=tcp,port=${SWTPM_CTRL_PORT}
FAIL test_tpm2_locality (exit status: 1)

FAIL: test_tpm2_hashing
=======================

Need to be root to run test with CUSE interface.
Need to be root to run test with CUSE interface.
==== Starting swtpm with interfaces socket+socket ====
Server did not open port 65514
/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests/common: line 23: 4114883 Killed                  ${SWTPM_EXE} socket "$@" ${SWTPM_TEST_SECCOMP_OPT} --server type=tcp,port=${SWTPM_SERVER_PORT}${swtpm_server_disconnect} --ctrl type=tcp,port=${SWTPM_CTRL_PORT}
FAIL test_tpm2_hashing (exit status: 1)

FAIL: test_tpm2_hashing2
========================

Need to be root to run test with CUSE interface.
Need to be root to run test with CUSE interface.
==== Starting swtpm with interfaces socket+socket ====
Server did not open port 65516
/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests/common: line 23: 4114817 Killed                  ${SWTPM_EXE} socket "$@" ${SWTPM_TEST_SECCOMP_OPT} --server type=tcp,port=${SWTPM_SERVER_PORT}${swtpm_server_disconnect} --ctrl type=tcp,port=${SWTPM_CTRL_PORT}
FAIL test_tpm2_hashing2 (exit status: 1)

FAIL: test_tpm2_hashing3
========================

Need to be root to run test with CUSE interface.
Need to be root to run test with CUSE interface.
==== Starting swtpm with interfaces socket+socket ====
Server did not open port 65518
/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests/common: line 23: 4114889 Killed                  ${SWTPM_EXE} socket "$@" ${SWTPM_TEST_SECCOMP_OPT} --server type=tcp,port=${SWTPM_SERVER_PORT}${swtpm_server_disconnect} --ctrl type=tcp,port=${SWTPM_CTRL_PORT}
FAIL test_tpm2_hashing3 (exit status: 1)

FAIL: test_tpm2_migration_key
=============================

Need to be root to run test with CUSE interface.
Need to be root to run test with CUSE interface.
==== Starting swtpm with interfaces socket+socket ====
Server did not open port 65500
/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests/common: line 23: 4115365 Killed                  ${SWTPM_EXE} socket "$@" ${SWTPM_TEST_SECCOMP_OPT} --server type=tcp,port=${SWTPM_SERVER_PORT}${swtpm_server_disconnect} --ctrl type=tcp,port=${SWTPM_CTRL_PORT}
FAIL test_tpm2_migration_key (exit status: 1)

SKIP: test_tpm2_partial_reads
=============================

Need to be root to run test with CUSE interface.
SKIP test_tpm2_partial_reads (exit status: 77)

FAIL: test_tpm2_resume_volatile
===============================

Need to be root to run test with CUSE interface.
Need to be root to run test with CUSE interface.
==== Starting swtpm with interfaces socket+socket ====
Server did not open port 65502
/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests/common: line 23: 4115017 Killed                  ${SWTPM_EXE} socket "$@" ${SWTPM_TEST_SECCOMP_OPT} --server type=tcp,port=${SWTPM_SERVER_PORT}${swtpm_server_disconnect} --ctrl type=tcp,port=${SWTPM_CTRL_PORT}
FAIL test_tpm2_resume_volatile (exit status: 1)

FAIL: test_tpm2_savestate
=========================

Need to be root to run test with CUSE interface.
Need to be root to run test with CUSE interface.
==== Starting swtpm with interfaces socket+socket ====
Server did not open port 65524
/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests/common: line 23: 4115004 Killed                  ${SWTPM_EXE} socket "$@" ${SWTPM_TEST_SECCOMP_OPT} --server type=tcp,port=${SWTPM_SERVER_PORT}${swtpm_server_disconnect} --ctrl type=tcp,port=${SWTPM_CTRL_PORT}
FAIL test_tpm2_savestate (exit status: 1)

FAIL: test_tpm2_save_load_encrypted_state
=========================================

Need to be root to run test with CUSE interface.
Need to be root to run test with CUSE interface.
==== Starting swtpm with interfaces socket+socket ====
Server did not open port 65528
/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests/common: line 23: 4115370 Killed                  ${SWTPM_EXE} socket "$@" ${SWTPM_TEST_SECCOMP_OPT} --server type=tcp,port=${SWTPM_SERVER_PORT}${swtpm_server_disconnect} --ctrl type=tcp,port=${SWTPM_CTRL_PORT}
FAIL test_tpm2_save_load_encrypted_state (exit status: 1)

SKIP: test_tpm2_save_load_state_2
=================================

SWTPM_TEST_IBMTSS2 must be set to run this test.
SKIP test_tpm2_save_load_state_2 (exit status: 77)

SKIP: test_tpm2_save_load_state_3
=================================

SWTPM_TEST_IBMTSS2 must be set to run this test.
SKIP test_tpm2_save_load_state_3 (exit status: 77)

FAIL: test_tpm2_save_load_state_da_timeout
==========================================

Need to be root to run test with CUSE interface.
Need to be root to run test with CUSE interface.
==== Starting swtpm with interfaces socket+socket ====
Server did not open port 65438
/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests/common: line 23: 4115308 Killed                  ${SWTPM_EXE} socket "$@" ${SWTPM_TEST_SECCOMP_OPT} --server type=tcp,port=${SWTPM_SERVER_PORT}${swtpm_server_disconnect} --ctrl type=tcp,port=${SWTPM_CTRL_PORT}
FAIL test_tpm2_save_load_state_da_timeout (exit status: 1)

FAIL: test_tpm2_setbuffersize
=============================

Need to be root to run test with CUSE interface.
Need to be root to run test with CUSE interface.
==== Starting swtpm with interfaces socket+socket ====
Server did not open port 65448
/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests/common: line 23: 4115053 Killed                  ${SWTPM_EXE} socket "$@" ${SWTPM_TEST_SECCOMP_OPT} --server type=tcp,port=${SWTPM_SERVER_PORT}${swtpm_server_disconnect} --ctrl type=tcp,port=${SWTPM_CTRL_PORT}
FAIL test_tpm2_setbuffersize (exit status: 1)

FAIL: test_tpm2_volatilestate
=============================

Need to be root to run test with CUSE interface.
Need to be root to run test with CUSE interface.
==== Starting swtpm with interfaces socket+socket ====
Server did not open port 65504
/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests/common: line 23: 4114940 Killed                  ${SWTPM_EXE} socket "$@" ${SWTPM_TEST_SECCOMP_OPT} --server type=tcp,port=${SWTPM_SERVER_PORT}${swtpm_server_disconnect} --ctrl type=tcp,port=${SWTPM_CTRL_PORT}
FAIL test_tpm2_volatilestate (exit status: 1)

FAIL: test_tpm2_wrongorder
==========================

Need to be root to run test with CUSE interface.
Need to be root to run test with CUSE interface.
==== Starting swtpm with interfaces socket+socket ====
Server did not open port 65512
/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests/common: line 23: 4115013 Killed                  ${SWTPM_EXE} socket "$@" ${SWTPM_TEST_SECCOMP_OPT} --server type=tcp,port=${SWTPM_SERVER_PORT}${swtpm_server_disconnect} --ctrl type=tcp,port=${SWTPM_CTRL_PORT}
FAIL test_tpm2_wrongorder (exit status: 1)

FAIL: test_tpm2_probe
=====================

Need to be root to run test with CUSE interface.
Need to be root to run test with CUSE interface.
==== Starting swtpm with interfaces socket+socket ====
Server did not open port 65522
/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests/common: line 23: 4115001 Killed                  ${SWTPM_EXE} socket "$@" ${SWTPM_TEST_SECCOMP_OPT} --server type=tcp,port=${SWTPM_SERVER_PORT}${swtpm_server_disconnect} --ctrl type=tcp,port=${SWTPM_CTRL_PORT}
FAIL test_tpm2_probe (exit status: 1)

FAIL: test_tpm2_swtpm_bios
==========================

Need to be root to run test with CUSE interface.
Need to be root to run test with CUSE interface.
==== Starting swtpm with interfaces socket+socket ====
Server did not open port 65520
/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests/common: line 23: 4115168 Killed                  ${SWTPM_EXE} socket "$@" ${SWTPM_TEST_SECCOMP_OPT} --server type=tcp,port=${SWTPM_SERVER_PORT}${swtpm_server_disconnect} --ctrl type=tcp,port=${SWTPM_CTRL_PORT}
FAIL test_tpm2_swtpm_bios (exit status: 1)

SKIP: test_tpm2_ibmtss2
=======================

SKIP test_tpm2_ibmtss2 (exit status: 77)

SKIP: test_samples_create_tpmca
===============================

Need to be root to run this test.
SKIP test_samples_create_tpmca (exit status: 77)

SKIP: test_tpm2_samples_create_tpmca
====================================

Need to be root to run this test.
SKIP test_tpm2_samples_create_tpmca (exit status: 77)

============================================================================
Testsuite summary for swtpm 0.6.0
============================================================================
# TOTAL: 59
# PASS:  13
# SKIP:  9
# XFAIL: 0
# FAIL:  37
# XPASS: 0
# ERROR: 0
============================================================================
See tests/test-suite.log
============================================================================
make[3]: *** [Makefile:728: test-suite.log] Error 1
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/swtpm-0.6.0/tests'
make[2]: *** [Makefile:836: check-TESTS] Error 2
make[1]: *** [Makefile:1316: check-am] Error 2
make: *** [Makefile:479: check-recursive] Error 1
kloczek commented 3 years ago

After switching to fedora binaries I have now some other effect

[root@barrel ~]# systemctl status --full --lines=50 tpm2-abrmd
● tpm2-abrmd.service - TPM2 Access Broker and Resource Management Daemon
     Loaded: loaded (/usr/lib/systemd/system/tpm2-abrmd.service; disabled; vendor preset: disabled)
     Active: failed (Result: exit-code) since Tue 2021-08-03 01:10:11 BST; 5min ago
    Process: 47269 ExecStart=/usr/sbin/tpm2-abrmd (code=exited, status=74)
   Main PID: 47269 (code=exited, status=74)
        CPU: 16ms

Aug 03 01:10:11 barrel systemd[1]: Starting TPM2 Access Broker and Resource Management Daemon...
Aug 03 01:10:11 barrel tpm2-abrmd[47269]: tcti_conf before: "(null)"
Aug 03 01:10:11 barrel tpm2-abrmd[47269]: tcti_conf after: "device:/dev/tpm0"
Aug 03 01:10:11 barrel tpm2-abrmd[47269]: ERROR:tcti:src/tss2-tcti/tcti-device.c:442:Tss2_Tcti_Device_Init() Failed to open specified TCTI device file /dev/tpm0: No such f>
Aug 03 01:10:11 barrel tpm2-abrmd[47269]: ERROR:tcti:src/tss2-tcti/tctildr-dl.c:154:tcti_from_file() Could not initialize TCTI file: device
Aug 03 01:10:11 barrel tpm2-abrmd[47269]: ERROR:tcti:src/tss2-tcti/tctildr.c:428:Tss2_TctiLdr_Initialize_Ex() Failed to instantiate TCTI
Aug 03 01:10:11 barrel tpm2-abrmd[47269]: init_thread_func: failed to create TCTI with conf "device:/dev/tpm0", got RC: 0xa000a
Aug 03 01:10:11 barrel tpm2-abrmd[47269]: g_bus_unown_name: assertion 'owner_id > 0' failed
Aug 03 01:10:11 barrel systemd[1]: tpm2-abrmd.service: Main process exited, code=exited, status=74/IOERR
Aug 03 01:10:11 barrel systemd[1]: tpm2-abrmd.service: Failed with result 'exit-code'.
Aug 03 01:10:11 barrel systemd[1]: Failed to start TPM2 Access Broker and Resource Management Daemon.
Aug 03 01:12:57 barrel systemd[1]: Dependency failed for TPM2 Access Broker and Resource Management Daemon.
Aug 03 01:12:57 barrel systemd[1]: tpm2-abrmd.service: Job tpm2-abrmd.service/start failed with result 'dependency'.

[root@barrel ~]# lsmod |grep tpm
tpm_vtpm_proxy         20480  0
stefanberger commented 3 years ago

You don't seem to have a hardware TPM 2 on your system... that's what this seems to show.

kloczek commented 3 years ago

You don't seem to have a hardware TPM 2 on your system... that's what this seems to show.

That is true. Question still is: why suddenly everything around started crashing because of that? And/or: what I can do in this situation?

mephmanx commented 3 years ago

Could I ask a follow on question to this? I have things set up and working and I can create KVM VM’s with tpm’s but they aren’t enabled on boot. I see docs in the github for this on seaBIOS and compiling/enabling there and wanted to ask if that repo is set up to where I could check that out, build it, and use the resulting bin in my VM’s if that would be enabled by default? I want to script the VM create so that I don’t have to go into the bios menu and enable the TPM’s on each VM after it is created.

Thank you for your help.

From: Chris Lyons @.> Date: Wednesday, July 28, 2021 at 11:02 AM To: stefanberger/swtpm @.>, stefanberger/swtpm @.> Cc: Mention @.> Subject: Re: [stefanberger/swtpm] 0.6.0: test suite is failing (#454) Yes, its fixed now. Thanks.

From: Stefan Berger @.> Date: Wednesday, July 28, 2021 at 9:45 AM To: stefanberger/swtpm @.> Cc: Chris Lyons @.>, Mention @.> Subject: Re: [stefanberger/swtpm] 0.6.0: test suite is failing (#454)

@mephmanxhttps://github.com/mephmanx Is it fixed now? I have PR #507https://github.com/stefanberger/swtpm/pull/507 that I will also apply to stable-0.6 branch that should fix the issue entirely.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/stefanberger/swtpm/issues/454#issuecomment-888321822, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AMNAQ2TNCI6WSMHQQTZE7M3T2ACYVANCNFSM46MYJJ3A.

This email has been scanned by Inbound Shield™.

stefanberger commented 3 years ago

Could I ask a follow on question to this? I have things set up and working and I can create KVM VM’s with tpm’s but they aren’t enabled on boot. I see docs in the github for this on seaBIOS and compiling/enabling there and wanted to ask if that repo is set up to where I could check that out, build it, and use the resulting bin in my VM’s if that would be enabled by default? I want to script the VM create so that I don’t have to go into the bios menu and enable the TPM’s on each VM after it is created.

What does that mean 'enabled on boot'? If you attach a TPM 1.2 or TPM 2 to a QEMU VM they are automatically enabled.

mephmanx commented 3 years ago

Whenever I try operations with the vtpm’s I get this error:

@. ~]# tpm_takeownership Enter owner password: Confirm password: Enter SRK password: Confirm password: Tspi_Context_Connect failed: 0x00003011 - layer=tsp, code=0011 (17), Communication failure @. ~]#

From: Stefan Berger @.> Date: Wednesday, August 11, 2021 at 1:43 PM To: stefanberger/swtpm @.> Cc: Chris Lyons @.>, Mention @.> Subject: Re: [stefanberger/swtpm] 0.6.0: test suite is failing (#454)

Could I ask a follow on question to this? I have things set up and working and I can create KVM VM’s with tpm’s but they aren’t enabled on boot. I see docs in the github for this on seaBIOS and compiling/enabling there and wanted to ask if that repo is set up to where I could check that out, build it, and use the resulting bin in my VM’s if that would be enabled by default? I want to script the VM create so that I don’t have to go into the bios menu and enable the TPM’s on each VM after it is created.

What does that mean 'enabled on boot'? If you attach a TPM 1.2 or TPM 2 to a QEMU VM they are automatically enabled.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/stefanberger/swtpm/issues/454#issuecomment-897022555, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AMNAQ2RVRJSLZMS7U25SJKLT4KZCXANCNFSM46MYJJ3A.

This email has been scanned by Inbound Shield™.

stefanberger commented 3 years ago

Whenever I try operations with the vtpm’s I get this error:

***@***.*** ~]# tpm_takeownership 
Enter owner password: 
Confirm password: 
Enter SRK password: 
Confirm password: Tspi_Context_Connect failed: 0x00003011 - layer=tsp, code=0011 (17), Communication failure ***@***.*** ~]#

So you want to use a TPM 1.2, right? If not you would need to pass --tpm2 to the swtpm command line . For TPM 1.2 you have to make sure that tcsd is installed and running. On Fedora this would be in the trousers package.

$ sudo dnf -y install trouser
$ ps aux | grep tcsd
stefanb  3016709  0.0  0.0 221400   856 pts/21   S+   14:02   0:00 grep --color=auto tcsd
$ systemctl status tcsd
?? tcsd.service - TCG Core Services Daemon
     Loaded: loaded (/usr/lib/systemd/system/tcsd.service; disabled; vendor preset: disabled)
     Active: inactive (dead)
$ sudo systemctl enable tcsd
Created symlink /etc/systemd/system/multi-user.target.wants/tcsd.service ?? /usr/lib/systemd/system/tcsd.service.
$ sudo systemctl status tcsd
?? tcsd.service - TCG Core Services Daemon
     Loaded: loaded (/usr/lib/systemd/system/tcsd.service; enabled; vendor preset: disabled)
     Active: inactive (dead)
$ sudo systemctl start tcsd
$ ps aux | grep tcsd
tss      3016843  0.0  0.0  21816   380 ?        Ss   14:03   0:00 /sbin/tcsd
stefanb  3016857  0.0  0.0 221400   860 pts/21   S+   14:03   0:00 grep --color=auto tcsd
mephmanx commented 3 years ago

So, for example this VM create:

virt-install --hvm --virt-type=kvm --name=storage01 --memory=22000 --cpu=host-passthrough,cache.mode=passthrough --cpuset=auto --vcpus=vcpus=4,maxvcpus=4,sockets=1,cores=2,threads=2 --tpm emulator,model=tpm-tis,version=2.0 --memorybacking hugepages=yes --controller type=scsi,model=virtio-scsi --disk pool=Disk,size=300,bus=virtio,sparse=no --disk pool=Disk,size=300,bus=virtio,sparse=no --disk pool=SSD,size=175,bus=virtio,sparse=no --disk pool=SSD,size=175,bus=virtio,sparse=no --disk pool=SSD,size=175,bus=virtio,sparse=no --cdrom=/var/tmp/storage01-iso.iso --network type=bridge,source=amp-net,model=virtio --network type=bridge,source=loc-static,model=virtio --os-variant=centos8 --graphics=vnc --autostart

I need to add the –tpm2 argument to this?

From: Stefan Berger @.> Date: Wednesday, August 11, 2021 at 2:06 PM To: stefanberger/swtpm @.> Cc: Chris Lyons @.>, Mention @.> Subject: Re: [stefanberger/swtpm] 0.6.0: test suite is failing (#454)

Whenever I try operations with the vtpm’s I get this error:

@.*** ~]# tpm_takeownership

Enter owner password:

Confirm password:

Enter SRK password:

Confirm password: Tspi_Context_Connect failed: 0x00003011 - layer=tsp, code=0011 (17), Communication failure @.*** ~]#

So you want to use a TPM 1.2, right? If not you would need to pass --tpm2 to the swtpm command line . For TPM 1.2 you have to make sure that tcsd is installed and running. On Fedora this would be in the trousers package.

$ sudo dnf -y install trouser

$ ps aux | grep tcsd

stefanb 3016709 0.0 0.0 221400 856 pts/21 S+ 14:02 0:00 grep --color=auto tcsd

$ systemctl status tcsd

?? tcsd.service - TCG Core Services Daemon

 Loaded: loaded (/usr/lib/systemd/system/tcsd.service; disabled; vendor preset: disabled)

 Active: inactive (dead)

$ sudo systemctl enable tcsd

Created symlink /etc/systemd/system/multi-user.target.wants/tcsd.service ?? /usr/lib/systemd/system/tcsd.service.

$ sudo systemctl status tcsd

?? tcsd.service - TCG Core Services Daemon

 Loaded: loaded (/usr/lib/systemd/system/tcsd.service; enabled; vendor preset: disabled)

 Active: inactive (dead)

$ sudo systemctl start tcsd

$ ps aux | grep tcsd

tss 3016843 0.0 0.0 21816 380 ? Ss 14:03 0:00 /sbin/tcsd

stefanb 3016857 0.0 0.0 221400 860 pts/21 S+ 14:03 0:00 grep --color=auto tcsd

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/stefanberger/swtpm/issues/454#issuecomment-897038056, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AMNAQ2SQ46V3VKHKD6FK253T4K3ZRANCNFSM46MYJJ3A.

This email has been scanned by Inbound Shield™.

stefanberger commented 3 years ago

Since you are passing --tpm emulator,model=tpm-tis,version=2.0 you want to use a TPM 2. tpm_takeownership is a TPM 1.2 tool, which will not work. Now you have to install the tpm2-tools package and read the documentation about these tools: https://www.mankier.com/package/tpm2-tools .