diff options
author | drh <drh@noemail.net> | 2008-01-22 21:30:53 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2008-01-22 21:30:53 +0000 |
commit | 643167ff21ce008806a5afc54edec08887d685f2 (patch) | |
tree | 2229d0349aa78dcd82f9fb3faa5e445d5f14e28c /src/test8.c | |
parent | 02cd2b80c16e3797000411d9d0717f09db2915e2 (diff) | |
download | sqlite-643167ff21ce008806a5afc54edec08887d685f2.tar.gz sqlite-643167ff21ce008806a5afc54edec08887d685f2.zip |
Add the fault injector module in fault.c. Use it as a basis for memory
allocation failure testing. (CVS 4742)
FossilOrigin-Name: 1a335e180183b414fcc3510ce28b98b21cd134a6
Diffstat (limited to 'src/test8.c')
-rw-r--r-- | src/test8.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/test8.c b/src/test8.c index 5cbcf533e..944ac686e 100644 --- a/src/test8.c +++ b/src/test8.c @@ -13,7 +13,7 @@ ** is not included in the SQLite library. It is used for automated ** testing of the SQLite library. ** -** $Id: test8.c,v 1.58 2007/12/13 21:54:11 drh Exp $ +** $Id: test8.c,v 1.59 2008/01/22 21:30:53 drh Exp $ */ #include "sqliteInt.h" #include "tcl.h" @@ -1021,8 +1021,11 @@ static int echoSync(sqlite3_vtab *tab){ return rc; } static int echoCommit(sqlite3_vtab *tab){ - sqlite3MallocBenignFailure(1); - return echoTransactionCall(tab, "xCommit"); + int rc; + sqlite3FaultBenign(SQLITE_FAULTINJECTOR_MALLOC, 1); + rc = echoTransactionCall(tab, "xCommit"); + sqlite3FaultBenign(SQLITE_FAULTINJECTOR_MALLOC, 0); + return rc; } static int echoRollback(sqlite3_vtab *tab){ return echoTransactionCall(tab, "xRollback"); |