Testfixture for Unix platform

Hello,
I need some help :

I have successfullly compiled tcl8.6, openssl 1.1.1g and sqlite3 (latest release) on Redhat 7.8 OS platform.
Tests on Sqlite are successfull with “make test”
SQLite 2020-01-27 19:55:54 3bfa9cc97da10598521b342961df8f5f68c7388fa117345eeb516eaa837bb4d6
0 errors out of 249979 tests on sqlcipher2.***.fr Linux 64-bit little-endian
All memory allocations freed - no leaks
Maximum memory usage: 9283424 bytes
Current memory usage: 0 bytes
Number of malloc() : -1 calls

I cloned latest sqlcipher with git and compile it :
export CPATH=/usr/local/include
export LIBRARY_PATH=/usr/local/lib:/usr/local/lib64
export LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib64

./configure --enable-tempstore=yes CFLAGS="-DSQLITE_HAS_CODEC" LDFLAGS="-Lcrypto"

make

make testfixture

But when trying to run testfixture/all.test i ran into this issue :

altermalloc-1.transient.77… Ok
altermalloc-1.transient.78… Ok
altermalloc-1.transient.79… Ok
altermalloc-1.transient.80…
! altermalloc-1.transient.80 expected: [1 1]
! altermalloc-1.transient.80 got: [0 {}]
altermalloc-1.transient.81…
! altermalloc-1.transient.81 expected: [1 1]
! altermalloc-1.transient.81 got: [0 {}]
altermalloc-1.transient.82…
! altermalloc-1.transient.82 expected: [1 1]
! altermalloc-1.transient.82 got: [0 {}]
altermalloc-1.transient.83…
! altermalloc-1.transient.83 expected: [1 1]
! altermalloc-1.transient.83 got: [0 {}]
altermalloc-1.transient.84…
! altermalloc-1.transient.84 expected: [1 1]
! altermalloc-1.transient.84 got: [0 {}]
altermalloc-1.transient.85…
! altermalloc-1.transient.85 expected: [1 1]
! altermalloc-1.transient.85 got: [0 {}]
altermalloc-1.transient.86…Erreur de segmentation (core dumped)

Same occurs if with static :
./configure --enable-tempstore=yes CFLAGS="-DSQLITE_HAS_CODEC" LDFLAGS="/usr/local/lib64/libcrypto.a"

Any help would be kind: What is the platform of choice to compile sqlcipher, any advice how to tests before install ?

Thank you for your help.

Hello @Atom - Thanks for getting in touch. We’re going to be adding a section on this to the README in the next release. Here is the relevant information:

The full SQLite test suite will not complete successfully when using SQLCipher. In some cases encryption interferes with low-level tests that require access to database file data or features which are unsupported by SQLCipher. Those tests that are intended to support encryption are intended for non-SQLCipher implementations. In addition, because SQLite tests are not always isolated, if one test fails it can trigger a domino effect with other failures in later steps.

As a result, the SQLCipher package includes it’s own independent tests that exercise and verify the core functionality of the SQLCipher extensions. This test suite is intended to provide an abbreviated verification of SQLCipher’s internal logic; it does not perform an exhaustive test of the SQLite database system as a whole or verify functionality on specific platforms. Because SQLCipher is based on stable upstream builds of SQLite, it is consider a basic assumption that the core SQLite library code is operating properly (the SQLite core is almost untouched in SQLCipher). Thus, the additional SQLCipher-specific test provide the requisite verification that the library is operating as expected with SQLCipher’s security features enabled.

To run SQLCipher specific tests, configure as described above and run the following to execute the tests and recieve a report of the results:

  $ make testfixture
  $ ./testfixture test/sqlcipher.test

Kudos !

add --enable-fts5 on configuration and run ./testfixture test/sqlcipher.test successfully

SQLite 2019-10-10 20:19:45 18db032d058f1436ce3dea84081f4ee5a0f2259ad97301d43c426bc7f3dfalt1
0 errors out of 170 tests on sqlcipher2.****.fr Linux 64-bit little-endian
-1 files were left open
All memory allocations freed - no leaks
Memory used: now 0 max 2862664 max-size 169120
Allocation count: now 0 max 7019
Page-cache used: now 0 max 0 max-size 8456
Page-cache overflow: now 0 max 2504888
Maximum memory usage: 2862664 bytes
Current memory usage: 0 bytes
Number of malloc() : -1 calls

Thank you for your really fast answer.