Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
configure.ac: enable 64-bit file API on 32-bit systems
My local filesystem is btrfs with a long life. It's inodes ecxeed 32-bit space and that causes test failures in `swtpm` on `i686-linux` containers: FAIL: test_parameters FAIL: test_swtpm_setup_file_backend FAIL: test_swtpm_setup_overwrite FAIL: test_tpm2_swtpm_setup_create_cert FAIL: test_tpm2_swtpm_setup_overwrite FAIL: test_swtpm_setup_create_cert FAIL: test_tpm2_parameters The example test failure log looks this way: 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 ==== Test 1: Ok ==== Starting swtpm with interfaces socket+socket ==== Test 2: Ok ==== Starting swtpm with interfaces socket+socket ==== swtpm: Missing migration key to decrypt volatilestate Test 3: Ok ==== Starting swtpm with interfaces socket+socket ==== Could not stat file '/build/tests/data/migkey1/volatilestate.bin': Value too large for defined data type Error: Could not load encrypted volatile state into TPM. FAIL test_migration_key (exit status: 1) The `stat()` fails because inode value exceeds 32-bit value: $ stat /build/tests/data/migkey1/volatilestate.bin File: /build/tests/data/migkey1/volatilestate.bin Size: 1290 Blocks: 8 IO Block: 4096 regular file Device: 0,30 Inode: 9639547569 Links: 1 ... The change fixes all the test failures. To fix `test_tpm2_swtpm_setup_create_cert` I also had to include `config.h` into `swtpm_backend_dir.c` to get 64-bit file open there as well. Signed-off-by: Sergei Trofimovich <[email protected]>
- Loading branch information