mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-14 00:22:38 +03:00
Modify the OS layer so that I/O routines are called through a virtual function
table. The os_test.c module has been replaced by test6.c. The crash tests are busted now and need to be fixed. (CVS 2785) FossilOrigin-Name: 1f69aec285dd8e26bd739d5e44bb50fe03a9682a
This commit is contained in:
10
src/test2.c
10
src/test2.c
@@ -13,7 +13,7 @@
|
||||
** is not included in the SQLite library. It is used for automated
|
||||
** testing of the SQLite library.
|
||||
**
|
||||
** $Id: test2.c,v 1.35 2005/11/04 22:03:30 drh Exp $
|
||||
** $Id: test2.c,v 1.36 2005/11/26 00:25:04 drh Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#include "os.h"
|
||||
@@ -533,20 +533,20 @@ static int fake_big_file(
|
||||
}
|
||||
if( Tcl_GetInt(interp, argv[1], &n) ) return TCL_ERROR;
|
||||
memset(&fd, 0, sizeof(fd));
|
||||
rc = sqlite3OsOpenReadWrite(argv[2], &fd, &readOnly);
|
||||
rc = sqlite3Io.xOpenReadWrite(argv[2], &fd, &readOnly);
|
||||
if( rc ){
|
||||
Tcl_AppendResult(interp, "open failed: ", errorName(rc), 0);
|
||||
return TCL_ERROR;
|
||||
}
|
||||
offset = n;
|
||||
offset *= 1024*1024;
|
||||
rc = sqlite3OsSeek(&fd, offset);
|
||||
rc = sqlite3Io.xSeek(&fd, offset);
|
||||
if( rc ){
|
||||
Tcl_AppendResult(interp, "seek failed: ", errorName(rc), 0);
|
||||
return TCL_ERROR;
|
||||
}
|
||||
rc = sqlite3OsWrite(&fd, "Hello, World!", 14);
|
||||
sqlite3OsClose(&fd);
|
||||
rc = sqlite3Io.xWrite(&fd, "Hello, World!", 14);
|
||||
sqlite3Io.xClose(&fd);
|
||||
if( rc ){
|
||||
Tcl_AppendResult(interp, "write failed: ", errorName(rc), 0);
|
||||
return TCL_ERROR;
|
||||
|
||||
Reference in New Issue
Block a user