Tests error in PPC64
I am running the tests (units and integration) under a PPC64 architecture and I have errors in 4 tests.
I create the issue to report them and maybe work on them in separate issues later.
[ 322s] FAIL: test/unit/test_tpm2_header
[ 322s] ================================
[ 322s]
[ 322s] [==========] Running 2 test(s).
[ 322s] [ RUN ] test_tpm_command_header
[ 322s] [ ERROR ] --- c->tag == 0x0180
[ 322s] [ LINE ] --- test/unit/test_tpm2_header.c:23: error: Failure!
[ 322s] [ FAILED ] test_tpm_command_header
[ 322s] [ RUN ] test_tpm_response_header
[ 322s] [ ERROR ] --- r->tag == 0x0180
[ 322s] [ LINE ] --- test/unit/test_tpm2_header.c:99: error: Failure!
[ 322s] [ FAILED ] test_tpm_response_header
[ 322s] [==========] 2 test(s) run.
[ 322s] [ PASSED ] 0 test(s).
[ 322s] [ FAILED ] 2 test(s), listed below:
[ 322s] [ FAILED ] test_tpm_command_header
[ 322s] [ FAILED ] test_tpm_response_header
[ 322s]
[ 322s] 2 FAILED TEST(S)
[ 322s] FAIL test/unit/test_tpm2_header (exit status: 2)
[ 322s] FAIL: test/integration/tests/abrmd_policyticket
[ 322s] ===============================================
[ 322s]
[ 322s] creating simulator working dir: /tmp/tpm2_test_KiMy7R
[ 322s] /tmp/tpm2_test_KiMy7R ~/rpmbuild/BUILD/tpm2-tools-5.2
[ 322s] Switched to CWD: /tmp/tpm2_test_KiMy7R
[ 322s] Starting the simulator
[ 322s] Attempting to start simulator on port: 49151
[ 322s] LISTEN 0 0 0.0.0.0:49151 0.0.0.0:* users:(("tpm_server",pid=7624,fd=6))
[ 322s] LISTEN 0 0 0.0.0.0:49152 0.0.0.0:* users:(("tpm_server",pid=7624,fd=8))
[ 322s] Started simulator on port 49151 in dir "/tmp/tpm2_test_KiMy7R"
[ 322s] tpm2tools_tcti="mssim:host=localhost,port=49151"
[ 322s] Started the simulator
[ 322s] Starting tpm2-abrmd
[ 322s] TPM2ABRMD_TCTI is empty, configuring
[ 322s] TPM2ABRMD_TCTI="--session --dbus-name=com.intel.tss2.Tabrmd49151 --tcti=mssim:port=49151"
[ 322s] tpm2-abrmd command: tpm2-abrmd --session --dbus-name=com.intel.tss2.Tabrmd49151 --tcti=mssim:port=49151 --session --dbus-name=com.intel.tss2.Tabrmd49151 --tcti=mssim:port=49151
[ 322s] tpm2tools_tcti="tabrmd:bus_type=session,bus_name=com.intel.tss2.Tabrmd49151"
[ 322s] TPM2TOOLS_TEST_TCTI=
[ 322s] TPM2TOOLS_TEST_TCTI not set, attempting to figure out default
[ 322s] export TPM2TOOLS_TCTI="tabrmd:bus_type=session,bus_name=com.intel.tss2.Tabrmd49151"
[ 322s]
[ 322s] --- To recreate this test run the following: ---
[ 322s] #!/usr/bin/env bash
[ 322s] export TPM2_ABRMD="tpm2-abrmd"
[ 322s] export TPM2_SIM="tpm_server"
[ 322s] export TPM2ABRMD_TCTI="--session --dbus-name=com.intel.tss2.Tabrmd49151 --tcti=mssim:port=49151"
[ 322s] export TPM2_SIMPORT="49151"
[ 322s] export TPM2TOOLS_TEST_TCTI="tabrmd:bus_type=session,bus_name=com.intel.tss2.Tabrmd49151"
[ 322s] export TPM2TOOLS_TEST_PERSISTENT=""
[ 322s] export PATH="/home/abuild/rpmbuild/BUILD/tpm2-tools-5.2/tools:/home/abuild/rpmbuild/BUILD/tpm2-tools-5.2/tools/misc:/home/abuild/rpmbuild/BUILD/tpm2-tools-5.2/test/integration:/home/abuild/rpmbuild/BUILD/tpm2-tools-5.2/tools/fapi:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/usr/libexec/ibmtss"
[ 322s] export srcdir="."
[ 322s] export abs_srcdir="/home/abuild/rpmbuild/BUILD/tpm2-tools-5.2"
[ 322s] export abs_builddir="/home/abuild/rpmbuild/BUILD/tpm2-tools-5.2"
[ 322s]
[ 322s] /home/abuild/rpmbuild/BUILD/tpm2-tools-5.2/test/integration/tests/abrmd_policyticket.sh
[ 322s] --- EOF ---
[ 322s]
[ 322s] run_startup: false
[ 322s] Generating RSA private key, 2048 bit long modulus (2 primes)
[ 322s] .........+++++
[ 322s] ...+++++
[ 322s] e is 65537 (0x010001)
[ 322s] writing RSA key
[ 322s] name: 000b0c5c7621c7e10e7657e682e08b34a4ae7fd14f536f82a1abb49a48a0e3ed82d6
[ 322s] 7ac11283ba6dbe84e54faf08e0e6ce6f13d48815a18ea96bcc28ddc90ef4f56a
[ 322s] WARNING:esys:src/tss2-esys/api/Esys_PolicySigned.c:343:Esys_PolicySigned_Finish() Received TPM Error
[ 322s] ERROR:esys:src/tss2-esys/api/Esys_PolicySigned.c:117:Esys_PolicySigned() Esys Finish ErrorCode (0x000005db)
[ 322s] ERROR: Esys_PolicySigned(0x5DB) - tpm:parameter(5):the signature is not valid
[ 322s] ERROR: Could not build policysigned TPM
[ 322s] ERROR: Unable to run policysigned
[ 322s] tpm2 policysigned -S session.ctx -g sha256 -s signature.dat -f rsassa -c signing_key.ctx -x --ticket tic.ket --timeout time.out -t -500 on line 50 failed: 1
[ 322s] Shutting down
[ 322s] ~/rpmbuild/BUILD/tpm2-tools-5.2
[ 322s] Removing sim dir: /tmp/tpm2_test_KiMy7R
[ 322s] /home/abuild/rpmbuild/BUILD/tpm2-tools-5.2/test/integration/helpers.sh: line 443: 7624 Killed "$TPM2_SIM" -port "$tpm2_sim_port" (wd: /tmp/tpm2_test_KiMy7R)
[ 322s] FAIL test/integration/tests/abrmd_policyticket.sh (exit status: 1)
[ 322s] FAIL: test/integration/tests/checkquote
[ 322s] =======================================
[ 322s]
[ 322s] creating simulator working dir: /tmp/tpm2_test_HSxfbX
[ 322s] /tmp/tpm2_test_HSxfbX ~/rpmbuild/BUILD/tpm2-tools-5.2
[ 322s] Switched to CWD: /tmp/tpm2_test_HSxfbX
[ 322s] Starting the simulator
[ 322s] Attempting to start simulator on port: 33451
[ 322s] LISTEN 0 0 0.0.0.0:33451 0.0.0.0:* users:(("tpm_server",pid=9045,fd=6))
[ 322s] LISTEN 0 0 0.0.0.0:33452 0.0.0.0:* users:(("tpm_server",pid=9045,fd=8))
[ 322s] Started simulator on port 33451 in dir "/tmp/tpm2_test_HSxfbX"
[ 322s] tpm2tools_tcti="mssim:host=localhost,port=33451"
[ 322s] Started the simulator
[ 322s] Starting tpm2-abrmd
[ 322s] TPM2ABRMD_TCTI is empty, configuring
[ 322s] TPM2ABRMD_TCTI="--session --dbus-name=com.intel.tss2.Tabrmd33451 --tcti=mssim:port=33451"
[ 322s] tpm2-abrmd command: tpm2-abrmd --session --dbus-name=com.intel.tss2.Tabrmd33451 --tcti=mssim:port=33451 --session --dbus-name=com.intel.tss2.Tabrmd33451 --tcti=mssim:port=33451
[ 322s] tpm2tools_tcti="tabrmd:bus_type=session,bus_name=com.intel.tss2.Tabrmd33451"
[ 322s] TPM2TOOLS_TEST_TCTI=
[ 322s] TPM2TOOLS_TEST_TCTI not set, attempting to figure out default
[ 322s] export TPM2TOOLS_TCTI="tabrmd:bus_type=session,bus_name=com.intel.tss2.Tabrmd33451"
[ 322s]
[ 322s] --- To recreate this test run the following: ---
[ 322s] #!/usr/bin/env bash
[ 322s] export TPM2_ABRMD="tpm2-abrmd"
[ 322s] export TPM2_SIM="tpm_server"
[ 322s] export TPM2ABRMD_TCTI="--session --dbus-name=com.intel.tss2.Tabrmd33451 --tcti=mssim:port=33451"
[ 322s] export TPM2_SIMPORT="33451"
[ 322s] export TPM2TOOLS_TEST_TCTI="tabrmd:bus_type=session,bus_name=com.intel.tss2.Tabrmd33451"
[ 322s] export TPM2TOOLS_TEST_PERSISTENT=""
[ 322s] export PATH="/home/abuild/rpmbuild/BUILD/tpm2-tools-5.2/tools:/home/abuild/rpmbuild/BUILD/tpm2-tools-5.2/tools/misc:/home/abuild/rpmbuild/BUILD/tpm2-tools-5.2/test/integration:/home/abuild/rpmbuild/BUILD/tpm2-tools-5.2/tools/fapi:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/usr/libexec/ibmtss"
[ 322s] export srcdir="."
[ 322s] export abs_srcdir="/home/abuild/rpmbuild/BUILD/tpm2-tools-5.2"
[ 322s] export abs_builddir="/home/abuild/rpmbuild/BUILD/tpm2-tools-5.2"
[ 322s]
[ 322s] /home/abuild/rpmbuild/BUILD/tpm2-tools-5.2/test/integration/tests/checkquote.sh
[ 322s] --- EOF ---
[ 322s]
[ 322s] run_startup: false
[ 322s] loaded-key:
[ 322s] name: 000b7b6c4ef59ebbde5ec3a4d36a7c5a4149429b835a7f453a07de7d206905b16848
[ 322s] qualified name: 000b0830fcd6d191cfc00fe883210141980018f29aede0316cc4918073790b4f2cf3
[ 322s] quoted: ff54434780180022000b0830fcd6d191cfc00fe883210141980018f29aede0316cc4918073790b4f2cf30014f0bd46fe0914c8d513c2d65c21cf400ed13257f50000000000000544000000000000000001201910230016363600000001000b03008041002051cdfd15463a712da38c49e9390d861030e28cf1f19ebe9f5a8b6901a9df64fc
[ 322s] signature:
[ 322s] alg: rsassa
[ 322s] sig: 26419ae9b5510fb07f6d78164dfcb8a3389691ecb48c8445cdb00c86556aa1c76c8e14228f9190499f758bad4c664896ccf68bfe10fe4c8a7f1172ba21ca5e3707baa569f2916a8528cee90b799f818e8747cf106b36eefc6d1adcac8ca365c2f7cc70f8bc500997a6440bb694096b61e023ef20bb9ec03fff100fe8f9c29223f64d0c9c2ad88af50d64a282ef8fe9c908ff402d66aad35c1cd55733e0612530ec2c71cc5daf815cd6ddbf119dc6eb5c8c99617e5d84c7528dc54dc725acb26cf8549db99f42bb1040396128207ea2e78a0d7b6d4339eb1b505ee65a69a9888ebd7bf08a42e80654c445e70c0d37b8369ca66d1acd3b4d9b6ba14aebe4f9c1fb
[ 322s] pcrs:
[ 322s] sha256:
[ 322s] 15: 0x0000000000000000000000000000000000000000000000000000000000000000
[ 322s] 16: 0x0000000000000000000000000000000000000000000000000000000000000000
[ 322s] 22: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
[ 322s] calcDigest: 51cdfd15463a712da38c49e9390d861030e28cf1f19ebe9f5a8b6901a9df64fc
[ 322s] pcrs:
[ 322s] sha256:
[ 322s] 15: 0x0000000000000000000000000000000000000000000000000000000000000000
[ 322s] 16: 0x0000000000000000000000000000000000000000000000000000000000000000
[ 322s] 22: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
[ 322s] sig: 26419ae9b5510fb07f6d78164dfcb8a3389691ecb48c8445cdb00c86556aa1c76c8e14228f9190499f758bad4c664896ccf68bfe10fe4c8a7f1172ba21ca5e3707baa569f2916a8528cee90b799f818e8747cf106b36eefc6d1adcac8ca365c2f7cc70f8bc500997a6440bb694096b61e023ef20bb9ec03fff100fe8f9c29223f64d0c9c2ad88af50d64a282ef8fe9c908ff402d66aad35c1cd55733e0612530ec2c71cc5daf815cd6ddbf119dc6eb5c8c99617e5d84c7528dc54dc725acb26cf8549db99f42bb1040396128207ea2e78a0d7b6d4339eb1b505ee65a69a9888ebd7bf08a42e80654c445e70c0d37b8369ca66d1acd3b4d9b6ba14aebe4f9c1fb
[ 322s] loaded-key:
[ 322s] name: 000b6da660167cf6ac1b7a3690e85b05d1644ac11ab4caba04d2da57295d30fab9bf
[ 322s] qualified name: 000bd4fc63092cd124f7306f8dae106238a7999bab1ac1a7efb3a1e304090486bb7d
[ 322s] name: 000b6da660167cf6ac1b7a3690e85b05d1644ac11ab4caba04d2da57295d30fab9bf
[ 322s] qualified name: 000bd4fc63092cd124f7306f8dae106238a7999bab1ac1a7efb3a1e304090486bb7d
[ 322s] name-alg:
[ 322s] value: sha256
[ 322s] raw: 0xb
[ 322s] attributes:
[ 322s] value: fixedtpm|fixedparent|sensitivedataorigin|userwithauth|restricted|sign
[ 322s] raw: 0x50072
[ 322s] type:
[ 322s] value: ecc
[ 322s] raw: 0x23
[ 322s] curve-id:
[ 322s] value: NIST p256
[ 322s] raw: 0x3
[ 322s] kdfa-alg:
[ 322s] value: null
[ 322s] raw: 0x10
[ 322s] kdfa-halg:
[ 322s] value: (null)
[ 322s] raw: 0x0
[ 322s] scheme:
[ 322s] value: ecdsa
[ 322s] raw: 0x18
[ 322s] scheme-halg:
[ 322s] value: sha256
[ 322s] raw: 0xb
[ 322s] sym-alg:
[ 322s] value: null
[ 322s] raw: 0x10
[ 322s] sym-mode:
[ 322s] value: (null)
[ 322s] raw: 0x0
[ 322s] sym-keybits: 0
[ 322s] x: 489c323ce95bf7a1bd76ae89e0baff595ca9b224f240bbadded5b9bb18ee89a1
[ 322s] y: 46488b7e4cac0e8ffba3067932d797201139cd0a44f7a5240de416a7f89c7131
[ 322s] quoted: ff54434780180022000bd4fc63092cd124f7306f8dae106238a7999bab1ac1a7efb3a1e304090486bb7d00148767210f8eb60cb3ad2f622bfcc1f72ea1b54fd100000000000008e9000000000000000001201910230016363600000001000b03008041002051cdfd15463a712da38c49e9390d861030e28cf1f19ebe9f5a8b6901a9df64fc
[ 322s] signature:
[ 322s] alg: ecdsa
[ 322s] sig: 30450221008c30cf5df59cad7ca278131dcafc4b333c76e4ca2933627dd925f76e960f177a022050f83cc277ef5e19afea4db7d5d60b45f8b999e8f87e06dc6f21a0573f19b05d
[ 322s] pcrs:
[ 322s] sha256:
[ 322s] 15: 0x0000000000000000000000000000000000000000000000000000000000000000
[ 322s] 16: 0x0000000000000000000000000000000000000000000000000000000000000000
[ 322s] 22: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
[ 322s] calcDigest: 51cdfd15463a712da38c49e9390d861030e28cf1f19ebe9f5a8b6901a9df64fc
[ 322s] pcrs:
[ 322s] sha256:
[ 322s] 15: 0x0000000000000000000000000000000000000000000000000000000000000000
[ 322s] 16: 0x0000000000000000000000000000000000000000000000000000000000000000
[ 322s] 22: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
[ 322s] sig: 30450221008c30cf5df59cad7ca278131dcafc4b333c76e4ca2933627dd925f76e960f177a022050f83cc277ef5e19afea4db7d5d60b45f8b999e8f87e06dc6f21a0573f19b05d
[ 322s] name: 000b6da660167cf6ac1b7a3690e85b05d1644ac11ab4caba04d2da57295d30fab9bf
[ 322s] qualified name: 000bd4fc63092cd124f7306f8dae106238a7999bab1ac1a7efb3a1e304090486bb7d
[ 322s] name-alg:
[ 322s] value: sha256
[ 322s] raw: 0xb
[ 322s] attributes:
[ 322s] value: fixedtpm|fixedparent|sensitivedataorigin|userwithauth|restricted|sign
[ 322s] raw: 0x50072
[ 322s] type:
[ 322s] value: ecc
[ 322s] raw: 0x23
[ 322s] curve-id:
[ 322s] value: NIST p256
[ 322s] raw: 0x3
[ 322s] kdfa-alg:
[ 322s] value: null
[ 322s] raw: 0x10
[ 322s] kdfa-halg:
[ 322s] value: (null)
[ 322s] raw: 0x0
[ 322s] scheme:
[ 322s] value: ecdsa
[ 322s] raw: 0x18
[ 322s] scheme-halg:
[ 322s] value: sha256
[ 322s] raw: 0xb
[ 322s] sym-alg:
[ 322s] value: null
[ 322s] raw: 0x10
[ 322s] sym-mode:
[ 322s] value: (null)
[ 322s] raw: 0x0
[ 322s] sym-keybits: 0
[ 322s] x: 489c323ce95bf7a1bd76ae89e0baff595ca9b224f240bbadded5b9bb18ee89a1
[ 322s] y: 46488b7e4cac0e8ffba3067932d797201139cd0a44f7a5240de416a7f89c7131
[ 322s] pcrs:
[ 322s] sha256:
[ 322s] 15: 0x0000000000000000000000000000000000000000000000000000000000000000
[ 322s] 16: 0x0000000000000000000000000000000000000000000000000000000000000000
[ 322s] 22: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
[ 322s] sig: 30450221008c30cf5df59cad7ca278131dcafc4b333c76e4ca2933627dd925f76e960f177a022050f83cc277ef5e19afea4db7d5d60b45f8b999e8f87e06dc6f21a0573f19b05d
[ 322s] name: 000b6da660167cf6ac1b7a3690e85b05d1644ac11ab4caba04d2da57295d30fab9bf
[ 322s] qualified name: 000bd4fc63092cd124f7306f8dae106238a7999bab1ac1a7efb3a1e304090486bb7d
[ 322s] name-alg:
[ 322s] value: sha256
[ 322s] raw: 0xb
[ 322s] attributes:
[ 322s] value: fixedtpm|fixedparent|sensitivedataorigin|userwithauth|restricted|sign
[ 322s] raw: 0x50072
[ 322s] type:
[ 322s] value: ecc
[ 322s] raw: 0x23
[ 322s] curve-id:
[ 322s] value: NIST p256
[ 322s] raw: 0x3
[ 322s] kdfa-alg:
[ 322s] value: null
[ 322s] raw: 0x10
[ 322s] kdfa-halg:
[ 322s] value: (null)
[ 322s] raw: 0x0
[ 322s] scheme:
[ 322s] value: ecdsa
[ 322s] raw: 0x18
[ 322s] scheme-halg:
[ 322s] value: sha256
[ 322s] raw: 0xb
[ 322s] sym-alg:
[ 322s] value: null
[ 322s] raw: 0x10
[ 322s] sym-mode:
[ 322s] value: (null)
[ 322s] raw: 0x0
[ 322s] sym-keybits: 0
[ 322s] x: 489c323ce95bf7a1bd76ae89e0baff595ca9b224f240bbadded5b9bb18ee89a1
[ 322s] y: 46488b7e4cac0e8ffba3067932d797201139cd0a44f7a5240de416a7f89c7131
[ 322s] pcrs:
[ 322s] sha256:
[ 322s] 15: 0x0000000000000000000000000000000000000000000000000000000000000000
[ 322s] 16: 0x0000000000000000000000000000000000000000000000000000000000000000
[ 322s] 22: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
[ 322s] sig: 30450221008c30cf5df59cad7ca278131dcafc4b333c76e4ca2933627dd925f76e960f177a022050f83cc277ef5e19afea4db7d5d60b45f8b999e8f87e06dc6f21a0573f19b05d
[ 322s] sha256:
[ 322s] 15: 0x0000000000000000000000000000000000000000000000000000000000000000
[ 322s] 16: 0x0000000000000000000000000000000000000000000000000000000000000000
[ 322s] 22: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
[ 322s] ERROR: Unable to run checkquote
[ 322s] tpm2 checkquote -u ecc.ak.tpmt -m quote.bin -s quote.sig -g sha256 -q nonce.bin -f pcr.bin -l sha256:15,16,22 on line 90 failed: 1
[ 322s] persistent-handle: 0x81010009
[ 322s] action: evicted
[ 322s] persistent-handle: 0x8101000a
[ 322s] action: evicted
[ 322s] Shutting down
[ 322s] ~/rpmbuild/BUILD/tpm2-tools-5.2
[ 322s] Removing sim dir: /tmp/tpm2_test_HSxfbX
[ 322s] shutdown
[ 322s] FAIL test/integration/tests/checkquote.sh (exit status: 1)
[ 322s] FAIL: test/integration/tests/createprimary
[ 322s] ==========================================
[ 322s]
[ 322s] creating simulator working dir: /tmp/tpm2_test_cOq9pZ
[ 322s] /tmp/tpm2_test_cOq9pZ ~/rpmbuild/BUILD/tpm2-tools-5.2
[ 322s] Switched to CWD: /tmp/tpm2_test_cOq9pZ
[ 322s] Starting the simulator
[ 322s] Attempting to start simulator on port: 41473
[ 322s] LISTEN 0 0 0.0.0.0:41473 0.0.0.0:* users:(("tpm_server",pid=10065,fd=6))
[ 322s] LISTEN 0 0 0.0.0.0:41474 0.0.0.0:* users:(("tpm_server",pid=10065,fd=8))
[ 322s] Started simulator on port 41473 in dir "/tmp/tpm2_test_cOq9pZ"
[ 322s] tpm2tools_tcti="mssim:host=localhost,port=41473"
[ 322s] Started the simulator
[ 322s] Starting tpm2-abrmd
[ 322s] TPM2ABRMD_TCTI is empty, configuring
[ 322s] TPM2ABRMD_TCTI="--session --dbus-name=com.intel.tss2.Tabrmd41473 --tcti=mssim:port=41473"
[ 322s] tpm2-abrmd command: tpm2-abrmd --session --dbus-name=com.intel.tss2.Tabrmd41473 --tcti=mssim:port=41473 --session --dbus-name=com.intel.tss2.Tabrmd41473 --tcti=mssim:port=41473
[ 322s] tpm2tools_tcti="tabrmd:bus_type=session,bus_name=com.intel.tss2.Tabrmd41473"
[ 322s] TPM2TOOLS_TEST_TCTI=
[ 322s] TPM2TOOLS_TEST_TCTI not set, attempting to figure out default
[ 322s] export TPM2TOOLS_TCTI="tabrmd:bus_type=session,bus_name=com.intel.tss2.Tabrmd41473"
[ 322s]
[ 322s] --- To recreate this test run the following: ---
[ 322s] #!/usr/bin/env bash
[ 322s] export TPM2_ABRMD="tpm2-abrmd"
[ 322s] export TPM2_SIM="tpm_server"
[ 322s] export TPM2ABRMD_TCTI="--session --dbus-name=com.intel.tss2.Tabrmd41473 --tcti=mssim:port=41473"
[ 322s] export TPM2_SIMPORT="41473"
[ 322s] export TPM2TOOLS_TEST_TCTI="tabrmd:bus_type=session,bus_name=com.intel.tss2.Tabrmd41473"
[ 322s] export TPM2TOOLS_TEST_PERSISTENT=""
[ 322s] export PATH="/home/abuild/rpmbuild/BUILD/tpm2-tools-5.2/tools:/home/abuild/rpmbuild/BUILD/tpm2-tools-5.2/tools/misc:/home/abuild/rpmbuild/BUILD/tpm2-tools-5.2/test/integration:/home/abuild/rpmbuild/BUILD/tpm2-tools-5.2/tools/fapi:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/usr/libexec/ibmtss"
[ 322s] export srcdir="."
[ 322s] export abs_srcdir="/home/abuild/rpmbuild/BUILD/tpm2-tools-5.2"
[ 322s] export abs_builddir="/home/abuild/rpmbuild/BUILD/tpm2-tools-5.2"
[ 322s]
[ 322s] /home/abuild/rpmbuild/BUILD/tpm2-tools-5.2/test/integration/tests/createprimary.sh
[ 322s] --- EOF ---
[ 322s]
[ 322s] run_startup: false
[ 322s] tpm2 createprimary -Q -g sha1 -G rsa -c context.out
[ 322s] tpm2 createprimary -Q -g sha1 -G xor -c context.out
[ 322s] tpm2 createprimary -Q -g sha1 -G ecc -c context.out
[ 322s] tpm2 createprimary -Q -g sha1 -G aes -c context.out
[ 322s] tpm2 createprimary -Q -g sha256 -G rsa -c context.out
[ 322s] tpm2 createprimary -Q -g sha256 -G xor -c context.out
[ 322s] tpm2 createprimary -Q -g sha256 -G ecc -c context.out
[ 322s] tpm2 createprimary -Q -g sha256 -G aes -c context.out
[ 322s] tpm2 createprimary -Q -g sha384 -G rsa -c context.out
[ 322s] tpm2 createprimary -Q -g sha384 -G xor -c context.out
[ 322s] tpm2 createprimary -Q -g sha384 -G ecc -c context.out
[ 322s] tpm2 createprimary -Q -g sha384 -G aes -c context.out
[ 322s] tpm2 createprimary -Q -g sha512 -G rsa -c context.out
[ 322s] tpm2 createprimary -Q -g sha512 -G xor -c context.out
[ 322s] tpm2 createprimary -Q -g sha512 -G ecc -c context.out
[ 322s] tpm2 createprimary -Q -g sha512 -G aes -c context.out
[ 322s] 1+0 records in
[ 322s] 1+0 records out
[ 322s] 256 bytes copied, 0.00013212 s, 1.9 MB/s
[ 322s] name-alg:
[ 322s] value: sha256
[ 322s] raw: 0xb
[ 322s] attributes:
[ 322s] value: fixedtpm|fixedparent|sensitivedataorigin|userwithauth|noda|restricted|decrypt
[ 322s] raw: 0x30472
[ 322s] type:
[ 322s] value: rsa
[ 322s] raw: 0x1
[ 322s] exponent: 65537
[ 322s] bits: 2048
[ 322s] scheme:
[ 322s] value: null
[ 322s] raw: 0x10
[ 322s] scheme-halg:
[ 322s] value: (null)
[ 322s] raw: 0x0
[ 322s] sym-alg:
[ 322s] value: aes
[ 322s] raw: 0x6
[ 322s] sym-mode:
[ 322s] value: cfb
[ 322s] raw: 0x43
[ 322s] sym-keybits: 128
[ 322s] rsa: c4f54aca6e877b8b447adfb60ab0e59582e5718702fe408cac96796c6e5f9bca468c43c57655eef0d7f888ad419f61dd1beba80d8246de106400d1cca01820dfef0e13f1662f7dd6f7bd893d9a84ce9b9878a81e5f1b542237ef1768803fde58d387253b8205e849ae5037d2c01e16618eb0978ac4636efaea9e4cf0289b5993f5a2d960a75f6b85d9c6448851aa0417e85f80addcc09bbe508139b03c84e0740c20e741e9a98f59edcdb07113f450b9c7c73323d20a94b577f8ea4dc5584159c3c2bc845fd795d03f7059e7aebbff470e55afc6a02a3673b7b7b349c57705b15b48e77e1f788c42ca25dce32ab4014e37fb2ec3b457f94a2ac678cf7f795ab5
[ 322s] 1+0 records in
[ 322s] 1+0 records out
[ 322s] 32 bytes copied, 0.000169904 s, 188 kB/s
[ 322s] ERROR:esys:src/tss2-esys/api/Esys_CreatePrimary.c:228:Esys_CreatePrimary_Async() SAPI Prepare returned error. ErrorCode (0x00090006)
[ 322s] ERROR:esys:src/tss2-esys/api/Esys_CreatePrimary.c:110:Esys_CreatePrimary() Error in async function ErrorCode (0x00090006)
[ 322s] ERROR: Esys_CreatePrimary(0x90006) - mu:A buffer isn't large enough
[ 322s] ERROR: Unable to run createprimary
[ 322s] tpm2 createprimary -C o -G ecc -g sha256 -c prim.ctx -u unique.dat -a "restricted|decrypt|fixedtpm|fixedparent|sensitivedataorigin|userwithauth|noda" on line 67 failed: 1
[ 322s] Shutting down
[ 322s] ~/rpmbuild/BUILD/tpm2-tools-5.2
[ 322s] Removing sim dir: /tmp/tpm2_test_cOq9pZ
[ 322s] /home/abuild/rpmbuild/BUILD/tpm2-tools-5.2/test/integration/helpers.sh: line 443: 10065 Killed "$TPM2_SIM" -port "$tpm2_sim_port" (wd: /tmp/tpm2_test_cOq9pZ)
[ 322s] /home/abuild/rpmbuild/BUILD/tpm2-tools-5.2/test/integration/helpers.sh: line 443: 10153 Killed $TPM2_ABRMD $tpm2_tabrmd_opts $TPM2ABRMD_TCTI (wd: /tmp/tpm2_test_cOq9pZ)
[ 322s] FAIL test/integration/tests/createprimary.sh (exit status: 1)
I am trying to fix the "test/integration/tests/abrmd_policycountertimer.sh" for PPC64, a big endian architecture.
Checking the tests, seems that the expected output is the sha256(0000016d 03000000 0008000000000000ea60 0000 0005), but seems that "tpm2 policycountertimer" is actually returning the hash of a different byte array, probably a big endian ordering of the assembled array.
For me is not clear if the bug is in the test (the byte array should be re-ordered) or if it is in the policycoutertimer code, and that the cp.hash should be different depending on the endianess.
In a LE arch the hash is for
0000016d 03000000 0008000000000000ea60 0000 0005
but in a BE the hash is for
0000016d 03000000 000860ea000000000000 0000 0005
So I guess that the bug is in the marshal, or around there?
@aplanas I'm trying to run a qemu ppc64 system with a freebsd 13.2 OS, but I just don't have the hardware with enough resources to run all the emulations layers. Do you have access to anything I could give you my ssh public key for for testing? I'd like to to get this fixed for you.
@williamcroberts sadly I do not have ssh access to a ppc64 system, but I use the OBS (open build system) services to run the package in there.
With OBS I can branch and clone the main package and build the package remotely in the different architectures:
https://build.opensuse.org/package/show/security/tpm2.0-tools
With OBS I can clone the package and do a local copy with obs bco tpm2.0-tools. The nice thing is that I can also build it locally for the ppc64le architecture with osc build openSUSE_Factory_PowerPC ppc64le. It will setup qemu via binfmt, and install the toolchain specific for this. Later we can access to the build environment with osc shell to inspect the issues.
As today I do not have any other option, but after holidays I can ask if there is some hardware that can be used.
With OBS I can branch and clone the main package and build the package remotely in the different architectures:
Ok no worries, I can always spin up an EC2 instance that can run qemu faster
@aplanas that didn't work, but I may have found someone with a Power 8, will keep trying.
If needed, I might be able to provide SSH to a ppc64 machine.