Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(70)

Side by Side Diff: third_party/sqlite/sqlite-src-3080704/test/crashtest1.c

Issue 883353008: [sql] Import reference version of SQLite 3.8.7.4. (Closed) Base URL: http://chromium.googlesource.com/chromium/src.git@master
Patch Set: Hold back encoding change which is messing up patch. Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 ** This program tests the ability of SQLite database to recover from a crash. 2 ** This program tests the ability of SQLite database to recover from a crash.
3 ** This program runs under Unix only, but the results are applicable to all 3 ** This program runs under Unix only, but the results are applicable to all
4 ** systems. 4 ** systems.
5 ** 5 **
6 ** The main process first constructs a test database, then starts creating 6 ** The main process first constructs a test database, then starts creating
7 ** subprocesses that write to that database. Each subprocess is killed off, 7 ** subprocesses that write to that database. Each subprocess is killed off,
8 ** without a chance to clean up its database connection, after a random 8 ** without a chance to clean up its database connection, after a random
9 ** delay. This killing of the subprocesses simulates a crash or power 9 ** delay. This killing of the subprocesses simulates a crash or power
10 ** failure. The next subprocess to open the database should rollback 10 ** failure. The next subprocess to open the database should rollback
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 do_some_sql(parent); 87 do_some_sql(parent);
88 return 0; 88 return 0;
89 } 89 }
90 printf("test %d, pid=%d\n", i, pid); 90 printf("test %d, pid=%d\n", i, pid);
91 usleep(rand()%10000 + 1000); 91 usleep(rand()%10000 + 1000);
92 kill(pid, SIGKILL); 92 kill(pid, SIGKILL);
93 waitpid(pid, &status, 0); 93 waitpid(pid, &status, 0);
94 } 94 }
95 return 0; 95 return 0;
96 } 96 }
OLDNEW
« no previous file with comments | « third_party/sqlite/sqlite-src-3080704/test/crash8.test ('k') | third_party/sqlite/sqlite-src-3080704/test/createtab.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698