Debian Codegraph @

www/qmplan.html

raw
1 <!DOCTYPE html>
2 <html><head>
3 <meta name="viewport" content="width=device-width, initial-scale=1.0">
4 <meta http-equiv="content-type" content="text/html; charset=UTF-8">
5 <link href="sqlite.css" rel="stylesheet">
6 <title>Quality Management</title>
7 <!-- path= -->
8 </head>
9 <body>
10 <div class=nosearch>
11 <a href="index.html">
12 <img class="logo" src="images/sqlite370_banner.svg" alt="SQLite" border="0">
13 </a>
14 <div><!-- IE hack to prevent disappearing logo --></div>
15 <div class="tagline desktoponly">
16 Small. Fast. Reliable.<br>Choose any three.
17 </div>
18 <div class="menu mainmenu">
19 <ul>
20 <li><a href="index.html">Home</a>
21 <li class='mobileonly'><a href="javascript:void(0)" onclick='toggle_div("submenu")'>Menu</a>
22 <li class='wideonly'><a href='about.html'>About</a>
23 <li class='desktoponly'><a href="docs.html">Documentation</a>
24 <li class='desktoponly'><a href="download.html">Download</a>
25 <li class='wideonly'><a href='copyright.html'>License</a>
26 <li class='desktoponly'><a href="support.html">Support</a>
27 <li class='desktoponly'><a href="prosupport.html">Purchase</a>
28 <li class='search' id='search_menubutton'>
29 <a href="javascript:void(0)" onclick='toggle_search()'>Search</a>
30 </ul>
31 </div>
32 <div class="menu submenu" id="submenu">
33 <ul>
34 <li><a href='about.html'>About</a>
35 <li><a href='docs.html'>Documentation</a>
36 <li><a href='download.html'>Download</a>
37 <li><a href='support.html'>Support</a>
38 <li><a href='prosupport.html'>Purchase</a>
39 </ul>
40 </div>
41 <div class="searchmenu" id="searchmenu">
42 <form method="GET" action="search">
43 <select name="s" id="searchtype">
44 <option value="d">Search Documentation</option>
45 <option value="c">Search Changelog</option>
46 </select>
47 <input type="text" name="q" id="searchbox" value="">
48 <input type="submit" value="Go">
49 </form>
50 </div>
51 </div>
52 <script>
53 function toggle_div(nm) {
54 var w = document.getElementById(nm);
55 if( w.style.display=="block" ){
56 w.style.display = "none";
57 }else{
58 w.style.display = "block";
59 }
60 }
61 function toggle_search() {
62 var w = document.getElementById("searchmenu");
63 if( w.style.display=="block" ){
64 w.style.display = "none";
65 } else {
66 w.style.display = "block";
67 setTimeout(function(){
68 document.getElementById("searchbox").focus()
69 }, 30);
70 }
71 }
72 function div_off(nm){document.getElementById(nm).style.display="none";}
73 window.onbeforeunload = function(e){div_off("submenu");}
74 /* Disable the Search feature if we are not operating from CGI, since */
75 /* Search is accomplished using CGI and will not work without it. */
76 if( !location.origin || !location.origin.match || !location.origin.match(/http/) ){
77 document.getElementById("search_menubutton").style.display = "none";
78 }
79 /* Used by the Hide/Show button beside syntax diagrams, to toggle the */
80 function hideorshow(btn,obj){
81 var x = document.getElementById(obj);
82 var b = document.getElementById(btn);
83 if( x.style.display!='none' ){
84 x.style.display = 'none';
85 b.innerHTML='show';
86 }else{
87 x.style.display = '';
88 b.innerHTML='hide';
89 }
90 return false;
91 }
92 var antiRobot = 0;
93 function antiRobotGo(){
94 if( antiRobot!=3 ) return;
95 antiRobot = 7;
96 var j = document.getElementById("mtimelink");
97 if(j && j.hasAttribute("data-href")) j.href=j.getAttribute("data-href");
98 }
99 function antiRobotDefense(){
100 document.body.onmousedown=function(){
101 antiRobot |= 2;
102 antiRobotGo();
103 document.body.onmousedown=null;
104 }
105 document.body.onmousemove=function(){
106 antiRobot |= 2;
107 antiRobotGo();
108 document.body.onmousemove=null;
109 }
110 setTimeout(function(){
111 antiRobot |= 1;
112 antiRobotGo();
113 }, 100)
114 antiRobotGo();
115 }
116 antiRobotDefense();
117 </script>
118 <div class=fancy>
119 <div class=nosearch>
120 <div class="fancy_title">
121 Quality Management
122 </div>
123 <details class="fancy_toc">
124 <summary>Table Of Contents</summary>
125 <div id="toc_sub"><div class="fancy-toc1"><a href="#overview">1. Overview</a></div>
126 <div class="fancy-toc2"><a href="#about_this_document">1.1. About This Document</a></div>
127 <div class="fancy-toc1"><a href="#software_development_plan">2. Software Development Plan</a></div>
128 <div class="fancy-toc2"><a href="#software_life_cycle">2.1. Software Life Cycle</a></div>
129 <div class="fancy-toc3"><a href="#maintenance_releases">2.1.1. Maintenance Releases</a></div>
130 <div class="fancy-toc3"><a href="#patch_releases">2.1.2. Patch Releases</a></div>
131 <div class="fancy-toc2"><a href="#release_history">2.2. Release History</a></div>
132 <div class="fancy-toc2"><a href="#schedule">2.3. Schedule</a></div>
133 <div class="fancy-toc1"><a href="#software_development_environment">3. Software Development Environment</a></div>
134 <div class="fancy-toc1"><a href="#software_verification_plan">4. Software Verification Plan</a></div>
135 <div class="fancy-toc1"><a href="#software_configuration_management">5. Software Configuration Management</a></div>
136 <div class="fancy-toc2"><a href="#version_control">5.1. Version Control</a></div>
137 <div class="fancy-toc2"><a href="#survivability">5.2. Survivability</a></div>
138 <div class="fancy-toc2"><a href="#repositories">5.3. Repositories</a></div>
139 <div class="fancy-toc3"><a href="#sqlite_source_code">5.3.1. SQLite Source Code</a></div>
140 <div class="fancy-toc3"><a href="#sqlite_documentation_sources">5.3.2. SQLite Documentation Sources</a></div>
141 <div class="fancy-toc3"><a href="#sql_logic_test">5.3.3. SQL Logic Test</a></div>
142 <div class="fancy-toc3"><a href="#test_harness_3">5.3.4. Test Harness #3</a></div>
143 <div class="fancy-toc3"><a href="#dbsqlfuzz">5.3.5. Dbsqlfuzz</a></div>
144 <div class="fancy-toc2"><a href="#software_verification_results">5.4. Software Verification Results</a></div>
145 <div class="fancy-toc1"><a href="#software_requirements_standards_and_data">6. Software Requirements Standards And Data</a></div>
146 <div class="fancy-toc1"><a href="#software_design_and_coding_standards">7. Software Design And Coding Standards</a></div>
147 <div class="fancy-toc1"><a href="#problem_reports">8. Problem Reports</a></div>
148 </div>
149 </details>
150 </div>
151
152
153
154 <h1 id="overview"><span>1. </span>Overview</h1>
155
156 <p>
157 This is the Quality Management Plan for SQLite.
158
159 </p><p>
160 Quality management documents tend to expand into
161 binders full of incomprehensible jargon that nobody
162 reads. This document strives to break that pattern by
163 being concise and useful.
164
165 </p><p>
166 The inspiration for this document is
167 <a href="https://en.wikipedia.org/wiki/DO-178B">DO-178B</a>.
168 Among quality standards, DO-178B seems to have the highest usefulness
169 to paperwork ratio. Even so, the amount of documentation needed
170 for a full-up DO-178B implementation is vast. SQLite strives to be
171 nimble and low-ceremony, and to that end, much of the required
172 DO-178B documentation is omitted. We retain only those parts that
173 genuinely improve quality for an open-source software project such
174 as SQLite.
175
176 </p><p>
177 The purpose of this document is to brief the reader on how the
178 SQLite development team functions on a daily basis, as they continuously
179 enhance the SQLite software and work to improve its already high reliability.
180 The document achieves its purpose if a competent developer can be
181 assimilated into the development team quickly after perusing this
182 document.
183
184 </p><h2 id="about_this_document"><span>1.1. </span>About This Document</h2>
185
186 <p>
187 The quality management plan was originally composed by going through
188 the description of outputs in section 11 of DO-178B (pages 48 through 56)
189 and writing down those elements that seemed relevant to SQLite.
190 The text will be subsequently revised to track enhancements to the
191 SQLite quality process.
192
193 </p><h1 id="software_development_plan"><span>2. </span>Software Development Plan</h1>
194
195 <p>
196 This section is a combination of the Plan For Software Aspects Of
197 Certification and the Software Development Plan sections of DO-178B.
198
199
200 </p><p>
201 See <a href="about.html">About SQLite</a> for an overview of the
202 SQLite software and what it does and how it is different.
203
204 </p><h2 id="software_life_cycle"><span>2.1. </span>Software Life Cycle</h2>
205
206 <p>
207 SQLite uses a continuous integration process. The software
208 is under constant enhancement and refinement. The latest trunk
209 check-ins are frequently used internally for mission-critical
210 operations.
211
212 </p><p>
213 There is no pre-defined release cycle. Releases occur
214 when there is a critical mass of feature enhancements and/or
215 bug fixes. Historically, releases have occurred about 5 or 6
216 times per year.
217 Users of SQLite pick up new releases from the website on an
218 as-needed basis.
219
220 </p><h3 id="maintenance_releases"><span>2.1.1. </span>Maintenance Releases</h3>
221
222 <p>
223 Routine maintenance releases of SQLite contain feature enhancements,
224 performance enhancements, and/or fixes for non-critical issues.
225 The version number for major releases are of the form "3.N.0"
226 for some integer N. See the <a href="versionnumbers.html">version numbering conventions</a> document
227 for details.
228
229 </p><p>
230 Upcoming maintenance releases announced on the the
231 <a href="support.html#mailinglists">SQLite forum</a> about two weeks prior to the anticipated
232 release. Approximately one week prior to release, the lead developer
233 declares "pencils down" after which only bug-fix check-ins are
234 allowed on trunk. A new
235 <a href="https://sqlite.org/src/ext/checklist/top/index">release checklist</a>
236 is created and updated as needed. As items of the checklist are
237 verified, they are checked off and turn green. The release occurs
238 when all elements of the checklist are green. That process normally
239 takes about a week.
240
241 </p><h3 id="patch_releases"><span>2.1.2. </span>Patch Releases</h3>
242
243 <p>
244 Occasionally, a serious problem is found and a small "patch" release
245 must be made against a regular maintenance release. Patches are distinct
246 from maintenance releases in that the number of lines of code changed
247 from the previous release is small. Every effort is made to avoid
248 patch releases by making sure that maintenance releases are bug free.
249
250 </p><p>
251 Patch releases may or may not have a release checklist, depending on the
252 issue. This is a judgement call by the project leader.
253
254 </p><h2 id="release_history"><span>2.2. </span>Release History</h2>
255
256 <p>The documentation system automatically maintains a
257 <a href="chronology.html">chronology</a> of past releases, as well as a
258 <a href="changes.html">complete list of SQLite releases</a> with change summaries.
259
260 </p><h2 id="schedule"><span>2.3. </span>Schedule</h2>
261
262 <p>SQLite has a long-range vision.
263 Planning is done with the assumption that SQLite
264 will be used and supported through at least the year 2050.
265 All code is written with the idea that it will one day be read and
266 maintained by people not yet born. The code is carefully commented
267 with an eye toward helping those future developers more easily
268 understand the logic and the rationale behind the code.
269
270 </p><h1 id="software_development_environment"><span>3. </span>Software Development Environment</h1>
271
272 <p>
273 SQLite is written in portable C code.
274 Development work occurs on a mix of Linux, Mac, and Windows workstations.
275 The developers use command-line tools and eschew integrated development
276 environments (IDEs) whenever possible. All developers are expected to be
277 fluent with the unix command-line.
278
279 </p><p>
280 A minimum setup for compiling and testing SQLite from canonical
281 sources is as follows:
282
283 </p><ul>
284 <li> A host computer with a 32-bit or 64-bit address space.
285 The OS can be Linux, Mac, Windows, *BSD, Solaris, or some other.
286 </li><li> A C99 compiler such as GCC (including MinGW variants for Windows),
287 Clang, or MSVC
288 </li><li> A text editor of the user's choice supporting UTF-8 text.
289 </li><li> <a href="https://core.tcl.tk/">Tcl</a> version 8.6 or later.
290 </li><li> The "make" utility, or optionally "nmake" on Windows.
291 </li></ul>
292
293 <p>
294 The Tcl script language is used to help translate canonical source code
295 into the <a href="amalgamation.html">amalgamation</a> and to manage testing. Tcl is not used directly
296 by SQLite itself (unless requested by a compile-time option). End users
297 of the SQLite amalgamation sources do not need Tcl.
298
299 </p><p>
300 When building the <a href="cli.html">CLI</a>, it is helpful, but not required, to have
301 the following third-party libraries on hand:
302
303 </p><ul>
304 <li> <a href="https://zlib.net/">zLib</a>
305 </li><li> <a href="http://git.savannah.gnu.org/cgit/readline.git?h=devel">readline</a>
306 or <a href="http://thrysoee.dk/editline/">editline</a>
307 or <a href="https://github.com/antirez/linenoise">linenoise</a> for
308 command-line editing.
309 </li></ul>
310
311 <p>
312 A complete release-test of SQLite requires additional software,
313
314 </p><ul>
315 <li> <a href="http://www.valgrind.org/">valgrind</a>
316 </li><li> <a href="https://gcc.gnu.org/onlinedocs/gcc/Gcov.html">gcov</a>
317 </li></ul>
318
319 <p>
320 SQLite is expected to operate the same, and use exactly the same
321 <a href="fileformat2.html">on-disk format</a>,
322 on all modern operating systems, on all modern computer architectures,
323 and using all modern C compilers. The developers are constantly testing
324 SQLite on as many diverse platforms as they can get their hands on.
325
326 </p><h1 id="software_verification_plan"><span>4. </span>Software Verification Plan</h1>
327
328 <p>The testing process for SQLite is described in the <a href="testing.html">testing</a> document.
329 Testing objectives include:
330
331 </p><ul>
332 <li> 100% MC/DC in an as-delivered configuration
333 </li><li> Testing of both source code and object code
334 </li><li> Testing on multiple platforms and with multiple compilers
335 </li><li> Fuzz testing
336 </li><li> Code change inspection
337 </li><li> Dynamic and static analysis of the code
338 </li></ul>
339
340 <p>The testing process is controlled by the
341 <a href="testing.html#cklist">release testing checklists</a>. The checklists succinctly summarize
342 all steps necessary to fully validate SQLite, and they record when
343 and by whom each validation step was performed.
344
345 </p><p>The set of checklist items for release checklist is potentially
346 updated for each release. The content and complete
347 history of each release checklist are retained for the historical
348 record.
349
350 </p><h1 id="software_configuration_management"><span>5. </span>Software Configuration Management</h1>
351
352 <h2 id="version_control"><span>5.1. </span>Version Control</h2>
353
354 <p>
355 SQLite source code is managed using the <a href="https://fossil-scm.org">Fossil</a>
356 version control system. Fossil was written specifically to support
357 SQLite development. Fossil provides both distributed version control
358 and issue tracking.
359
360 </p><h2 id="survivability"><span>5.2. </span>Survivability</h2>
361
362 <p>
363 All code is archived on three separate machines:
364 <a href="https://sqlite.org">https://sqlite.org</a>, <a href="https://www2.sqlite.org">https://www2.sqlite.org</a>, <a href="https://www3.sqlite.org">https://www3.sqlite.org</a>.
365 These machines are located in different cities (Dallas, Newark, and
366 San Francisco, respectively) and managed by two different hosting
367 companies (<a href="https://linode.com">Linode</a> for the first two and
368 <a href="https://digitalocean.com">Digital Ocean</a> for the third).
369 This diversity is intended to avoid a single point of failure.
370
371 </p><p>
372 The main machine in Dallas <a href="https://sqlite.org/">https://sqlite.org/</a> is the primary
373 server and the one that most people use. The other two are considered
374 backups.
375
376 </p><p>
377 In addition to the official repositories, the developers typically
378 keep complete clones of all software on their personal machines.
379 And there are other clones scattered about the internet.
380
381 </p><h2 id="repositories"><span>5.3. </span>Repositories</h2>
382
383 <p>The SQLite source is broken up into multiple repositories, each described
384 in a separate section below.
385
386 </p><h3 id="sqlite_source_code"><span>5.3.1. </span>SQLite Source Code</h3>
387
388 <p>The SQLite source code and the <a href="testing.html#tcl">TCL test suite</a> are stored together
389 in a single repository. This one repository is all that is required to
390 build the SQLite source. The source repository is public and is
391 readable by anonymous passersby on the internet.
392
393 </p><ul>
394 <li> Primary location: <a href="https://sqlite.org/src">https://sqlite.org/src</a>
395 </li><li> Backup A: <a href="https://www2.sqlite.org/src">https://www2.sqlite.org/src</a>
396 </li><li> Backup B: <a href="https://www3.sqlite.org/cgi/src">https://www3.sqlite.org/cgi/src</a>
397 </li><li> GitHub mirror: <a href="https://github.com/sqlite/sqlite/">https://github.com/sqlite/sqlite/</a>
398 </li></ul>
399
400 <h3 id="sqlite_documentation_sources"><span>5.3.2. </span>SQLite Documentation Sources</h3>
401
402 <p>The documentation sources include documentation text and images with the
403 scripts and makefile needed to construct the SQLite website documentation.
404 This document is contained within the documentation sources. The
405 document sources are kept in a separate repository distinct from the
406 source code. The documentation sources repository is publicly readable.
407
408 </p><p>The makefiles and scripts used to generate the documentation gather
409 text from baseline documents in the documentation source repository.
410 Additional text is extracted from comments in the SQLite source code.
411 Requirements coverage information is extracted from special comments in the
412 <a href="testing.html#tcl">TCL test suite</a> which is part of the source repository, and from
413 comments in the <a href="th3.html">TH3</a> test suite which is in a separate private repository.
414
415 </p><ul>
416 <li> Primary location: <a href="https://sqlite.org/docsrc">https://sqlite.org/docsrc</a>
417 </li><li> Backup A: <a href="https://www2.sqlite.org/docsrc">https://www2.sqlite.org/docsrc</a>
418 </li><li> Backup B: <a href="https://www3.sqlite.org/cgi/docsrc">https://www3.sqlite.org/cgi/docsrc</a>
419 </li></ul>
420
421 <h3 id="sql_logic_test"><span>5.3.3. </span>SQL Logic Test</h3>
422
423 <p>
424 The <a href="testing.html#slt">SQL Logic Tests</a> are a set of test cases designed to show that
425 SQLite behaves the same as other SQL database engines. These tests
426 are hosted in a separate code public repository.
427
428 </p><ul>
429 <li> Primary location: <a href="https://sqlite.org/sqllogictest">https://sqlite.org/sqllogictest</a>
430 </li><li> Backups on private servers
431 </li></ul>
432
433 <h3 id="test_harness_3"><span>5.3.4. </span>Test Harness #3</h3>
434
435 <p>
436 The <a href="th3.html">Test Harness #3</a> or <a href="th3.html">TH3</a> test suite is a private set of
437 test cases used to test SQLite to 100% MC/DC in an as-delivered
438 configuration. TH3 sources are served on the same servers as the
439 other SQLite repositories, but differ from the others in being
440 proprietary. The TH3 code is only accessible to SQLite developers.
441
442
443 </p><ul>
444 <li> Primary location: <a href="https://sqlite.org/th3">https://sqlite.org/th3</a>
445 </li><li> Backup A: <a href="https://www3.sqlite.org/cgi/th3">https://www3.sqlite.org/cgi/th3</a>
446 </li><li> Additional backups on private servers
447 </li></ul>
448
449 <h3 id="dbsqlfuzz"><span>5.3.5. </span>Dbsqlfuzz</h3>
450
451 <p>
452 The dbsqlfuzz module is a
453 <a href="https://www.llvm.org/docs/LibFuzzer.html">libFuzzer</a>-based fuzzer
454 for SQLite. Dbsqlfuzz fuzzes both the SQL and the database file at
455 the same time. Dbsqlfuzz uses a customized mutator.
456
457 </p><p>
458 Dbsqlfuzz seems to work better at finding problems than any other
459 fuzzer available. For that reason, it is kept private. We do not
460 want hackers gaining access to this technology.
461
462 </p><ul>
463 <li> Primary location: <a href="https://sqlite.org/dbsqlfuzz">https://sqlite.org/dbsqlfuzz</a>
464 </li><li> Backup A: <a href="https://www3.sqlite.org/cgi/dbsqlfuzz">https://www3.sqlite.org/cgi/dbsqlfuzz</a>
465 </li><li> Additional backups on private servers
466 </li></ul>
467
468 <h2 id="software_verification_results"><span>5.4. </span>Software Verification Results</h2>
469
470 <p>
471 Release testing proceeds by <a href="testing.html#cklist">checklist</a>. The current status and
472 complete change history for each checklist is stored in a separate
473 SQLite database file. These files are not version controlled, but
474 separate copies are maintained on private backup servers.
475
476 </p><p>The source code to the software that runs the checklists is stored
477 in its own Fossil repository at <a href="https://sqlite.org/checklistapp">https://sqlite.org/checklistapp</a>.
478
479 </p><h1 id="software_requirements_standards_and_data"><span>6. </span>Software Requirements Standards And Data</h1>
480
481 <p>In the SQLite project, the "requirements" are the project documentation.
482 Special markup in the documentation text indentifies individual requirements.
483 The requirement numbers are based on a cryptographic hash of normalized
484 requirement text, so that it is impossible to change the requirement text
485 without also changing the requirement number.
486
487 </p><p>Documentation text (and hence requirement text) is taken from the
488 SQLite Documentation source repository, described above, and also from
489 comments in the implementation. The makefiles to build the documentation
490 are in the documentation source repository.
491
492 </p><p>When the documentation is build, requirements are identified and labeled.
493 The documentation build process also scans for test cases that verify
494 each requirement and constructs a matrix showing which requirements have
495 been testing and identifying the specific test cases that test those
496 requirements.
497
498 </p><h1 id="software_design_and_coding_standards"><span>7. </span>Software Design And Coding Standards</h1>
499
500 <p>Objective coding standards for SQLite are minimal:
501
502 </p><ul>
503 <li> 2-space indentation
504 </li><li> No lines over 80 characters in length
505 </li><li> No tabs
506 </li></ul>
507
508 <p>All other design and coding rules are subjective. The
509 goal here is to make the software so that it is readable
510 and maintainable through the year 2050. To that end, we look
511 for succinct yet useful comments (no boilerplate), carefully
512 chosen variable names, and careful explanation of the meaning
513 of each data structure and the role of each code block.
514
515 </p><h1 id="problem_reports"><span>8. </span>Problem Reports</h1>
516
517 <p>All problems are fixed expeditiously. There are no lingering problems
518 in the SQLite software.
519
520 </p><p>The <a href="https://fossil-scm.org/">Fossil version control system</a> utilized by
521 SQLite contains built-in support for tracking trouble-tickets. This built-in
522 ticket system is used to track and document many historical problems.
523
524 </p><p>The <a href="https://fossil-scm.org/forum">SQLite Community Forum</a> is a place
525 where anybody on the internet can go to ask questions about or report bugs
526 against SQLite. Bugs found by third-parties are often reported initially
527 on the Forum. Forum-reported bugs will sometimes be transferred to tickets,
528 though recent practice has been to just deal with the bugs on the Forum.
529 The Forum has an excellent full-text search feature, is mirrored to
530 multiple machines, and is just as searchable and survivable as the ticket
531 system, so it seems unnecessary to duplicate Forum-originated bug reports
532 into the ticket system. The public locations of the Forum are:
533
534 </p><ul>
535 <li> Primary location: <a href="https://sqlite.org/forum">https://sqlite.org/forum</a>
536 </li><li> Backup A: <a href="https://www2.sqlite.org/forum">https://www2.sqlite.org/forum</a>
537 </li><li> Backup B: <a href="https://www3.sqlite.org/cgi/forum">https://www3.sqlite.org/cgi/forum</a>
538 </li></ul>
539
540 <p>
541 As with the source repositories, the Forum is also synced to various
542 private machines.
543 Note that because of the way Fossil works, the "backups" are more than just
544 read-only backups. They can also function as data inputs. All content
545 entered is synced to all repositories, regardless of which repository is
546 used for insertion.
547 </p><p align="center"><small><i>This page was last updated on 2025-11-13 07:12:58Z </small></i></p>
548