Bug#1070720: tpm2-tss: test/unit/tcti-spidev failure on 32bit with 64bit time_t

2024-06-20 Thread Gábor Gombás
Source: tpm2-tss
Followup-For: Bug #1070720

Hi,

Taking a quick look, it's the testsuite which appears to be broken.
Upstream commit
https://github.com/tpm2-software/tpm2-tss/commit/932b1e78047ed0ddc09fcb06bff2e7cf96406976
silenced tests failing in a similar way for large file offset builds
instead of attempting a proper fix, so I guess it would be fine to skip
this test on 32-bit if time_t is 64-bit.

Regards,
Gabor

-- System Information:
Debian Release: trixie/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'stable-security'), (500, 'stable'), 
(102, 'unstable'), (101, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.9.5 (SMP w/8 CPU threads; PREEMPT)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)



Bug#1070720: tpm2-tss: test/unit/tcti-spidev failure on 32bit with 64bit time_t

2024-05-07 Thread Adrian Bunk
Source: tpm2-tss
Version: 4.1.0-1
Severity: serious
Tags: ftbfs

https://buildd.debian.org/status/logs.php?pkg=tpm2-tss=4.1.0-1

...
SKIP: test/unit/tcti-libtpms


WARNING:test:test/unit/tcti-libtpms.c:1793:main() _FILE_OFFSET == 64 would 
produce cmocka errors. 
SKIP test/unit/tcti-libtpms (exit status: 77)

SKIP: test/unit/tcti-device
===

WARNING:tests:test/unit/tcti-device.c:454:main() _FILE_OFFSET == 64 would 
produce cmocka errors. 
SKIP test/unit/tcti-device (exit status: 77)

SKIP: test/unit/tcti-pcap
=

WARNING:tests:test/unit/tcti-pcap.c:736:main() _FILE_OFFSET == 64 would produce 
cmocka errors. 
SKIP test/unit/tcti-pcap (exit status: 77)

FAIL: test/unit/tcti-spidev
===

[==] tests: Running 1 test(s).
[ RUN  ] tcti_spi_init_test
ERROR:tcti:src/tss2-tcti/tcti-spidev.c:48:platform_spi_acquire() SPI acquire 
failed: Bad file descriptor 
ERROR:tcti:src/tss2-tcti/tcti-spi-helper.c:164:spi_tpm_helper_log_register_access()
 READ register 0xd40f00 (4 bytes) failed in transaction start 
ERROR:tcti:src/tss2-tcti/tcti-spidev.c:68:platform_spi_release() SPI release 
failed: Bad file descriptor 
ERROR:tcti:src/tss2-tcti/tcti-spidev.c:48:platform_spi_acquire() SPI acquire 
failed: Bad file descriptor 
ERROR:tcti:src/tss2-tcti/tcti-spi-helper.c:164:spi_tpm_helper_log_register_access()
 READ register 0xd40f00 (4 bytes) failed in transaction start 
ERROR:tcti:src/tss2-tcti/tcti-spidev.c:68:platform_spi_release() SPI release 
failed: Bad file descriptor 
ERROR:tcti:src/tss2-tcti/tcti-spidev.c:48:platform_spi_acquire() SPI acquire 
failed: Bad file descriptor 
ERROR:tcti:src/tss2-tcti/tcti-spi-helper.c:164:spi_tpm_helper_log_register_access()
 READ register 0xd40f00 (4 bytes) failed in transaction start 
ERROR:tcti:src/tss2-tcti/tcti-spidev.c:68:platform_spi_release() SPI release 
failed: Bad file descriptor 
...
ERROR:tcti:src/tss2-tcti/tcti-spi-helper.c:164:spi_tpm_helper_log_register_access()
 READ register 0xd40f00 (4 bytes) failed in transaction start 
ERROR:tcti:src/tss2-tcti/tcti-spidev.c:68:platform_spi_release() SPI release 
failed: Bad file descriptor 
ERROR:tcti:src/tss2-tcti/tcti-spi-helper.c:728:Tss2_Tcti_Spi_Helper_Init() 
Probing TPM failed 
[  ERROR   ] --- 0xa000a != 0
[   LINE   ] --- test/unit/tcti-spidev.c:200: error: Failure!
[  FAILED  ] tcti_spi_init_test
[==] tests: 1 test(s) run.
[  PASSED  ] 0 test(s).
[  FAILED  ] tests: 1 test(s), listed below:
[  FAILED  ] tcti_spi_init_test

 1 FAILED TEST(S)
FAIL test/unit/tcti-spidev (exit status: 1)

SKIP: test/unit/fapi-io
===

WARNING:tests:test/unit/fapi-io.c:370:main() _FILE_OFFSET == 64 would produce 
cmocka errors. 
SKIP test/unit/fapi-io (exit status: 77)


Testsuite summary for tpm2-tss 4.1.0

# TOTAL: 61
# PASS:  56
# SKIP:  4
# XFAIL: 0
# FAIL:  1
# XPASS: 0
# ERROR: 0

See ./test-suite.log
Please report to https://github.com/tpm2-software/tpm2-tss/issues

make[3]: *** [Makefile:33547: test-suite.log] Error 1