Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

s390x test failures #2531

Open
nekopsykose opened this issue Jan 4, 2023 · 2 comments
Open

s390x test failures #2531

nekopsykose opened this issue Jan 4, 2023 · 2 comments

Comments

@nekopsykose
Copy link

when running check for 4.0.0 on s390x on alpine linux:

test log
============================================================================
Testsuite summary for tpm2-tss 4.0.0
============================================================================
# TOTAL: 55
# PASS:  52
# SKIP:  0
# XFAIL: 0
# FAIL:  3
# XPASS: 0
# ERROR: 0
============================================================================
See ./test-suite.log
Please report to https://github.com/tpm2-software/tpm2-tss/issues
============================================================================
make[2]: *** [Makefile:32811: test-suite.log] Error 1
make[2]: Leaving directory '/home/buildozer/aports/community/tpm2-tss/src/tpm2-tss-4.0.0'
make[1]: *** [Makefile:32919: check-TESTS] Error 2
make[1]: Leaving directory '/home/buildozer/aports/community/tpm2-tss/src/tpm2-tss-4.0.0'
make: *** [Makefile:33539: check-am] Error 2
======================================
   tpm2-tss 4.0.0: ./test-suite.log
======================================

# TOTAL: 55
# PASS:  52
# SKIP:  0
# XFAIL: 0
# FAIL:  3
# XPASS: 0
# ERROR: 0

.. contents:: :depth: 2

FAIL: test/unit/tcti-spi-helper
===============================

[==========] Running 4 test(s).
[ RUN      ] tcti_spi_no_wait_state_success_test
ERROR:tcti:src/tss2-tcti/tcti-spi-helper.c:732:Tss2_Tcti_Spi_Helper_Init() Failed waiting for TPM to become ready 
[  ERROR   ] --- 0xa0009 != 0
[   LINE   ] --- test/unit/tcti-spi-helper.c:228: error: Failure!
[  FAILED  ] tcti_spi_no_wait_state_success_test
[ RUN      ] tcti_spi_with_wait_state_success_test
ERROR:tcti:src/tss2-tcti/tcti-spi-helper.c:732:Tss2_Tcti_Spi_Helper_Init() Failed waiting for TPM to become ready 
[  ERROR   ] --- 0xa0009 != 0
[   LINE   ] --- test/unit/tcti-spi-helper.c:257: error: Failure!
[  FAILED  ] tcti_spi_with_wait_state_success_test
[ RUN      ] tcti_spi_with_bad_callbacks_test
ERROR:tcti:src/tss2-tcti/tcti-spi-helper.c:439:check_platform_conf() Expected sleep_ms, spi_transfer, start_timeout and timeout_expired to be set. 
ERROR:tcti:src/tss2-tcti/tcti-spi-helper.c:697:Tss2_Tcti_Spi_Helper_Init() platform_conf invalid ErrorCode (0x000a000b) 
[       OK ] tcti_spi_with_bad_callbacks_test
[ RUN      ] tcti_spi_with_wait_state_bad_callbacks_test
ERROR:tcti:src/tss2-tcti/tcti-spi-helper.c:444:check_platform_conf() Expected spi_acquire and spi_release to both be NULL or set. 
ERROR:tcti:src/tss2-tcti/tcti-spi-helper.c:697:Tss2_Tcti_Spi_Helper_Init() platform_conf invalid ErrorCode (0x000a000b) 
[       OK ] tcti_spi_with_wait_state_bad_callbacks_test
[==========] 4 test(s) run.
[  PASSED  ] 2 test(s).
[  FAILED  ] 2 test(s), listed below:
[  FAILED  ] tcti_spi_no_wait_state_success_test
[  FAILED  ] tcti_spi_with_wait_state_success_test

 2 FAILED TEST(S)
FAIL test/unit/tcti-spi-helper (exit status: 2)

FAIL: test/unit/fapi-eventlog
=============================

[==========] Running 7 test(s).
[ RUN      ] check_bios_nuc
ERROR:fapi:src/tss2-fapi/ifapi_eventlog_system.c:316:parse_sha1_log_event() insufficient size for SpecID event data 
ERROR:fapifirmware:src/tss2-fapi/ifapi_json_eventlog_serialize.c:875:ifapi_tcg_eventlog_serialize() ErrorCode (0x0006000b) Eventlog could not be parsed. 
ERROR:fapifirmware:src/tss2-fapi/ifapi_json_eventlog_serialize.c:944:ifapi_get_tcg_firmware_event_list() Serialize eventlog. ErrorCode (0x0006000b) 
[  ERROR   ] --- 0x6000b != 0
[   LINE   ] --- test/unit/fapi-eventlog.c:99: error: Failure!
[  FAILED  ] check_bios_nuc
[ RUN      ] check_bios_pc_client
ERROR:fapi:src/tss2-fapi/ifapi_eventlog_system.c:316:parse_sha1_log_event() insufficient size for SpecID event data 
ERROR:fapifirmware:src/tss2-fapi/ifapi_json_eventlog_serialize.c:875:ifapi_tcg_eventlog_serialize() ErrorCode (0x0006000b) Eventlog could not be parsed. 
ERROR:fapifirmware:src/tss2-fapi/ifapi_json_eventlog_serialize.c:944:ifapi_get_tcg_firmware_event_list() Serialize eventlog. ErrorCode (0x0006000b) 
[  ERROR   ] --- 0x6000b != 0
[   LINE   ] --- test/unit/fapi-eventlog.c:99: error: Failure!
[  FAILED  ] check_bios_pc_client
[ RUN      ] check_event_uefiservices
ERROR:fapi:src/tss2-fapi/ifapi_eventlog_system.c:316:parse_sha1_log_event() insufficient size for SpecID event data 
ERROR:fapifirmware:src/tss2-fapi/ifapi_json_eventlog_serialize.c:875:ifapi_tcg_eventlog_serialize() ErrorCode (0x0006000b) Eventlog could not be parsed. 
ERROR:fapifirmware:src/tss2-fapi/ifapi_json_eventlog_serialize.c:944:ifapi_get_tcg_firmware_event_list() Serialize eventlog. ErrorCode (0x0006000b) 
[  ERROR   ] --- 0x6000b != 0
[   LINE   ] --- test/unit/fapi-eventlog.c:99: error: Failure!
[  FAILED  ] check_event_uefiservices
[ RUN      ] check_event_uefiaction
ERROR:fapi:src/tss2-fapi/ifapi_eventlog_system.c:316:parse_sha1_log_event() insufficient size for SpecID event data 
ERROR:fapifirmware:src/tss2-fapi/ifapi_json_eventlog_serialize.c:875:ifapi_tcg_eventlog_serialize() ErrorCode (0x0006000b) Eventlog could not be parsed. 
ERROR:fapifirmware:src/tss2-fapi/ifapi_json_eventlog_serialize.c:944:ifapi_get_tcg_firmware_event_list() Serialize eventlog. ErrorCode (0x0006000b) 
[  ERROR   ] --- 0x6000b != 0
[   LINE   ] --- test/unit/fapi-eventlog.c:99: error: Failure!
[  FAILED  ] check_event_uefiaction
[ RUN      ] check_event_uefivar
ERROR:fapi:src/tss2-fapi/ifapi_eventlog_system.c:316:parse_sha1_log_event() insufficient size for SpecID event data 
ERROR:fapifirmware:src/tss2-fapi/ifapi_json_eventlog_serialize.c:875:ifapi_tcg_eventlog_serialize() ErrorCode (0x0006000b) Eventlog could not be parsed. 
ERROR:fapifirmware:src/tss2-fapi/ifapi_json_eventlog_serialize.c:944:ifapi_get_tcg_firmware_event_list() Serialize eventlog. ErrorCode (0x0006000b) 
[  ERROR   ] --- 0x6000b != 0
[   LINE   ] --- test/unit/fapi-eventlog.c:99: error: Failure!
[  FAILED  ] check_event_uefivar
[ RUN      ] check_event
ERROR:fapi:src/tss2-fapi/ifapi_eventlog_system.c:316:parse_sha1_log_event() insufficient size for SpecID event data 
ERROR:fapifirmware:src/tss2-fapi/ifapi_json_eventlog_serialize.c:875:ifapi_tcg_eventlog_serialize() ErrorCode (0x0006000b) Eventlog could not be parsed. 
ERROR:fapifirmware:src/tss2-fapi/ifapi_json_eventlog_serialize.c:944:ifapi_get_tcg_firmware_event_list() Serialize eventlog. ErrorCode (0x0006000b) 
[  ERROR   ] --- 0x6000b != 0
[   LINE   ] --- test/unit/fapi-eventlog.c:99: error: Failure!
[  FAILED  ] check_event
[ RUN      ] check_specid_vendordata
ERROR:fapi:src/tss2-fapi/ifapi_eventlog_system.c:316:parse_sha1_log_event() insufficient size for SpecID event data 
ERROR:fapifirmware:src/tss2-fapi/ifapi_json_eventlog_serialize.c:875:ifapi_tcg_eventlog_serialize() ErrorCode (0x0006000b) Eventlog could not be parsed. 
ERROR:fapifirmware:src/tss2-fapi/ifapi_json_eventlog_serialize.c:944:ifapi_get_tcg_firmware_event_list() Serialize eventlog. ErrorCode (0x0006000b) 
[  ERROR   ] --- 0x6000b != 0
[   LINE   ] --- test/unit/fapi-eventlog.c:99: error: Failure!
[  FAILED  ] check_specid_vendordata
[==========] 7 test(s) run.
[  PASSED  ] 0 test(s).
[  FAILED  ] 7 test(s), listed below:
[  FAILED  ] check_bios_nuc
[  FAILED  ] check_bios_pc_client
[  FAILED  ] check_event_uefiservices
[  FAILED  ] check_event_uefiaction
[  FAILED  ] check_event_uefivar
[  FAILED  ] check_event
[  FAILED  ] check_specid_vendordata

 7 FAILED TEST(S)
FAIL test/unit/fapi-eventlog (exit status: 7)

FAIL: test/unit/fapi-ima-eventlog
=================================

[==========] Running 5 test(s).
[ RUN      ] check_invalidate_event
ERROR:fapijson:src/tss2-fapi/ifapi_ima_eventlog.c:223:digest_with_hash_name_cb() Invalid IMA binary format. ErrorCode (0x0006000b) 
ERROR:fapijson:src/tss2-fapi/ifapi_ima_eventlog.c:497:convert_ima_event_buffer() Get field ErrorCode (0x0006000b) 
ERROR:fapijson:src/tss2-fapi/ifapi_ima_eventlog.c:827:ifapi_get_ima_eventname() Parsing of IMA template failed. ErrorCode (0x0006000b) 
[  ERROR   ] --- 0x6000b != 0
[   LINE   ] --- test/unit/fapi-ima-eventlog.c:234: error: Failure!
[  FAILED  ] check_invalidate_event
[ RUN      ] check_get_name
ERROR:fapijson:src/tss2-fapi/ifapi_ima_eventlog.c:223:digest_with_hash_name_cb() Invalid IMA binary format. ErrorCode (0x0006000b) 
ERROR:fapijson:src/tss2-fapi/ifapi_ima_eventlog.c:497:convert_ima_event_buffer() Get field ErrorCode (0x0006000b) 
ERROR:fapijson:src/tss2-fapi/ifapi_ima_eventlog.c:827:ifapi_get_ima_eventname() Parsing of IMA template failed. ErrorCode (0x0006000b) 
[  ERROR   ] --- 0x6000b != 0
[   LINE   ] --- test/unit/fapi-ima-eventlog.c:197: error: Failure!
[  FAILED  ] check_get_name
[ RUN      ] check_sml_ima_sha1
ERROR:fapijson:src/tss2-fapi/ifapi_ima_eventlog.c:598:read_ima_header() Invalid ima data 
[  ERROR   ] --- 0xc != 0
[   LINE   ] --- test/unit/fapi-ima-eventlog.c:126: error: Failure!
[  FAILED  ] check_sml_ima_sha1
[ RUN      ] check_sml_ima_ng_sha1
ERROR:fapijson:src/tss2-fapi/ifapi_ima_eventlog.c:598:read_ima_header() Invalid ima data 
[  ERROR   ] --- 0x6 != 0
[   LINE   ] --- test/unit/fapi-ima-eventlog.c:126: error: Failure!
[  FAILED  ] check_sml_ima_ng_sha1
[ RUN      ] check_sml_ima_sig_sha256
ERROR:fapijson:src/tss2-fapi/ifapi_ima_eventlog.c:598:read_ima_header() Invalid ima data 
[  ERROR   ] --- 0x9 != 0
[   LINE   ] --- test/unit/fapi-ima-eventlog.c:126: error: Failure!
[  FAILED  ] check_sml_ima_sig_sha256
[==========] 5 test(s) run.
[  PASSED  ] 0 test(s).
[  FAILED  ] 5 test(s), listed below:
[  FAILED  ] check_invalidate_event
[  FAILED  ] check_get_name
[  FAILED  ] check_sml_ima_sha1
[  FAILED  ] check_sml_ima_ng_sha1
[  FAILED  ] check_sml_ima_sig_sha256

 5 FAILED TEST(S)
FAIL test/unit/fapi-ima-eventlog (exit status: 5)

>>> ERROR: tpm2-tss: check failed

build recipe

@JuergenReppSIT
Copy link
Member

The test files for IMA and system events did contain little endian integers which were assigned to the big endian integers with memcpy. The conversion has to be fixed.

@joholl
Copy link
Collaborator

joholl commented Jan 23, 2023

Relevant: #2139

slyon added a commit to slyon/tpm2-tss that referenced this issue Aug 22, 2023
…g endian

We need to convert it back to the correct endianess.
tpm2-software#2531
slyon added a commit to slyon/tpm2-tss that referenced this issue Aug 22, 2023
…g endian

We need to convert it back to the correct endianess.
tpm2-software#2531

Signed-off-by: Lukas Märdian <slyon@ubuntu.com>
JuergenReppSIT added a commit to JuergenReppSIT/tpm2-tss that referenced this issue Nov 9, 2023
Based on tpm2-software#2685 In the function spi_tpm_helper_read_sts_reg the result
is converted back to the correct endianess.
Addresses tpm2-software#2531

Signed-off-by: Juergen Repp <juergen_repp@web.de>
JuergenReppSIT added a commit to JuergenReppSIT/tpm2-tss that referenced this issue Nov 28, 2023
Based on tpm2-software#2685 In the function spi_tpm_helper_read_sts_reg the result
is converted back to the correct endianess.
Addresses tpm2-software#2531

Co-authored-by: Lukas Märdian <slyon@ubuntu.com>
Signed-off-by: Juergen Repp <juergen_repp@web.de>
JuergenReppSIT added a commit to JuergenReppSIT/tpm2-tss that referenced this issue Dec 4, 2023
Based on tpm2-software#2686 In the function spi_tpm_helper_read_sts_reg the result
is converted back to the correct endianess.
Addresses tpm2-software#2531

Co-authored-by: Lukas Märdian <slyon@ubuntu.com>
Signed-off-by: Juergen Repp <juergen_repp@web.de>
AndreasFuchsTPM pushed a commit that referenced this issue Jan 10, 2024
Based on #2686 In the function spi_tpm_helper_read_sts_reg the result
is converted back to the correct endianess.
Addresses #2531

Co-authored-by: Lukas Märdian <slyon@ubuntu.com>
Signed-off-by: Juergen Repp <juergen_repp@web.de>
AndreasFuchsTPM pushed a commit that referenced this issue Jan 30, 2024
Based on #2686 In the function spi_tpm_helper_read_sts_reg the result
is converted back to the correct endianess.
Addresses #2531

Co-authored-by: Lukas Märdian <slyon@ubuntu.com>
Signed-off-by: Juergen Repp <juergen_repp@web.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants