Martin Jenkins wrote:
corrupt2 tests fail on Solaris 9/Ultra5/csw tools
    Test file is not actually corrupted (ie altered at all AFAICS)
Exact same failure on a fresh Debian 3.1r4 install too. All other tests passed OK.

[EMAIL PROTECTED]:~/dev/sqlite/bld$ uname -a
Linux ultra5b 2.4.27-3-sparc64 #1 Thu Sep 14 07:31:38 UTC 2006 sparc64 GNU/Linux
[EMAIL PROTECTED]:~/dev/sqlite/bld$ ./testfixture ../test/corrupt2.test
corrupt2-1.1... Ok
corrupt2-1.2...
Expected: [1 {file is encrypted or is not a database}]
    Got: [0 {table abc abc 2 {CREATE TABLE abc(a, b, c)}}]
corrupt2-1.3...
Expected: [1 {file is encrypted or is not a database}]
    Got: [0 {table abc abc 2 {CREATE TABLE abc(a, b, c)}}]
corrupt2-1.4...
Expected: [1 {database disk image is malformed}]
    Got: [0 {table abc abc 2 {CREATE TABLE abc(a, b, c)}}]
corrupt2-1.5...
Expected: [1 {database disk image is malformed}]
    Got: [0 {table abc abc 2 {CREATE TABLE abc(a, b, c)}}]
Thread-specific data deallocated properly
4 errors out of 6 tests
Failures on these tests: corrupt2-1.2 corrupt2-1.3 corrupt2-1.4 corrupt2-1.5

The corruption tests do appear to work (where v3.2.1 does does not), so as I said earlier it appears the test harness is not actually corrupting the file. I checked the file contents (with a hex viewer) on S9 but didn't try manually corrupting it.

[EMAIL PROTECTED]:~/dev/sqlite/bld$ sqlite3 -version
3.2.1
[EMAIL PROTECTED]:~/dev/sqlite/bld$ ./sqlite3 -version
3.3.13

NB I don't exactly replicate the real tests below.

[EMAIL PROTECTED]:~/dev/sqlite/bld$ echo "pragma integrity_check;" | sqlite3 corrupt.db
ok
[EMAIL PROTECTED]:~/dev/sqlite/bld$ echo "pragma integrity_check;" | ./sqlite3 corrupt.db
ok

[EMAIL PROTECTED]:~/dev/sqlite/bld$ cp test.db corrupt.db ; dd if=/dev/random of=corrupt.db bs=1 count=4 skip=8
4+0 records in
4+0 records out
4 bytes transferred in 0.001219 seconds (3281 bytes/sec)
[EMAIL PROTECTED]:~/dev/sqlite/bld$ echo "pragma integrity_check;" | sqlite3 corrupt.db
ok
[EMAIL PROTECTED]:~/dev/sqlite/bld$ echo "pragma integrity_check;" | ./sqlite3 corrupt.db
SQL error near line 1: file is encrypted or is not a database

[EMAIL PROTECTED]:~/dev/sqlite/bld$ cp test.db corrupt.db ; dd if=/dev/random of=corrupt.db bs=1 count=4 skip=100
4+0 records in
4+0 records out
4 bytes transferred in 0.001105 seconds (3620 bytes/sec)
[EMAIL PROTECTED]:~/dev/sqlite/bld$ echo "pragma integrity_check;" | sqlite3 corrupt.db
ok
[EMAIL PROTECTED]:~/dev/sqlite/bld$ echo "pragma integrity_check;" | ./sqlite3 corrupt.db
SQL error near line 1: file is encrypted or is not a database

[EMAIL PROTECTED]:~/dev/sqlite/bld$ cp test.db corrupt.db ; dd if=/dev/random of=corrupt.db bs=1 count=4 skip=200
4+0 records in
4+0 records out
4 bytes transferred in 0.001141 seconds (3506 bytes/sec)
[EMAIL PROTECTED]:~/dev/sqlite/bld$ echo "pragma integrity_check;" | sqlite3 corrupt.db
ok
[EMAIL PROTECTED]:~/dev/sqlite/bld$ echo "pragma integrity_check;" | ./sqlite3 corrupt.db
SQL error near line 1: file is encrypted or is not a database

Martin


-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to