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

SQLite testing information is incorrect #122

Open
numist opened this issue Aug 11, 2015 · 0 comments
Open

SQLite testing information is incorrect #122

numist opened this issue Aug 11, 2015 · 0 comments
Labels

Comments

@numist
Copy link

numist commented Aug 11, 2015

One of the best-tested pieces of code in the world is called SQLite, the database mentioned earlier that’s probably on your smartphone. It was developed by D. Richard Hipp, who’s been working on it for 15 years. It’s totally open, totally free, and has 33,402 tests. It’s one of the most widely used pieces of software and one of the most respected.

Filing an issue regarding the number of tests in SQLite feels like nitpicking, but the test count here is incorrect by more than an order of magnitude.

SQLite uses a number of different unit test strategies. The one available alongside the source is the TCL test suite. Within those tests, the veryquick suite represents the highest-impact tests that can run in a (relatively) short amount of time. As of ~3.8.10.2, it contains 205,754 test cases.

The slower tests involve testing things like verifying database integrity in the face of inopportune power loss and memory allocation failures (such as testing what happens when malloc returns NULL for literally any and all calls to malloc)—such tests can be quantified by the number of cases, but are far more meaningful for their completeness of coverage. As of 3.8.10, SQLite is also under constant scrutiny from the afl fuzzer.

And yet, testing does not catch everything. There's no substitute for formal proofs when it comes to guaranteeing behaviour.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants