blob: f9655fb8c0ad0e40c54d246318f4acfabcd16393 [file] [log] [blame]
dan8cf35eb2010-09-01 11:40:05 +00001# 2010 September 1
2#
3# The author disclaims copyright to this source code. In place of
4# a legal notice, here is a blessing:
5#
6# May you do good and not evil.
7# May you find forgiveness for yourself and forgive others.
8# May you share freely, never taking more than you give.
9#
10#***********************************************************************
11#
12
13set testdir [file dirname $argv0]
14source $testdir/tester.tcl
mistachkin4a41f342012-03-06 03:00:49 +000015
16# If SQLITE_CURDIR is not defined, omit this file.
17ifcapable !curdir {
18 finish_test
19 return
20}
21
dan06bfd362010-09-01 18:00:09 +000022source $testdir/malloc_common.tcl
dan8cf35eb2010-09-01 11:40:05 +000023
drhde60fc22011-12-14 17:53:36 +000024unset -nocomplain defaultVfs
25set defaultVfs [file_control_vfsname db]
dan8cf35eb2010-09-01 11:40:05 +000026db close
27
28do_test quota-1.1 { sqlite3_quota_initialize nosuchvfs 1 } {SQLITE_ERROR}
29do_test quota-1.2 { sqlite3_quota_initialize "" 1 } {SQLITE_OK}
30do_test quota-1.3 { sqlite3_quota_initialize "" 1 } {SQLITE_MISUSE}
31do_test quota-1.4 { sqlite3_quota_shutdown } {SQLITE_OK}
32
33do_test quota-1.5 { sqlite3_quota_initialize "" 0 } {SQLITE_OK}
34do_test quota-1.6 { sqlite3_quota_shutdown } {SQLITE_OK}
35do_test quota-1.7 { sqlite3_quota_initialize "" 1 } {SQLITE_OK}
36do_test quota-1.8 { sqlite3_quota_shutdown } {SQLITE_OK}
37
38
39#-------------------------------------------------------------------------
40# Some simple warm-body tests with a single database file in rollback
41# mode:
42#
43# quota-2.1.*: Test that SQLITE_FULL is returned if the database would
44# exceed the configured quota.
45#
46# quota-2.2.*: Test that SQLITE_FULL is not returned and the database
47# grows if the callback extends the quota when the database
48# attempts to grow beyond the configured quota.
49#
50# quota-2.3.*: Open and close a db that is not part of any quota group. At
51# one point this was causing mutex refs to be leaked.
52#
53# quota-2.4.*: Try to shutdown the quota system before closing the db
54# file. Check that this fails and the quota system still works
55# afterwards. Then close the database and successfully shut
56# down the quota system.
57#
58sqlite3_quota_initialize "" 1
59
drha76e8582011-12-01 20:48:15 +000060unset -nocomplain quota_request_ok
dan8cf35eb2010-09-01 11:40:05 +000061proc quota_check {filename limitvar size} {
62 upvar $limitvar limit
63
64 lappend ::quota [set limit] $size
65 if {[info exists ::quota_request_ok]} { set limit $size }
66}
67
68do_test quota-2.1.1 {
69 sqlite3_quota_set *test.db 4096 quota_check
70} {SQLITE_OK}
71do_test quota-2.1.2 {
72 sqlite3 db test.db
73 execsql {
74 PRAGMA page_size=1024;
75 PRAGMA auto_vacuum=OFF;
76 PRAGMA journal_mode=DELETE;
77 }
78 set ::quota [list]
79 execsql {
80 CREATE TABLE t1(a, b);
81 INSERT INTO t1 VALUES(1, randomblob(1100));
82 INSERT INTO t1 VALUES(2, randomblob(1100));
83 }
84 set ::quota
85} {}
drhde60fc22011-12-14 17:53:36 +000086do_test quota-2.1.2.1 {
87 file_control_vfsname db
88} quota/$defaultVfs
dan8cf35eb2010-09-01 11:40:05 +000089do_test quota-2.1.3 { file size test.db } {4096}
90do_test quota-2.1.4 {
91 catchsql { INSERT INTO t1 VALUES(3, randomblob(1100)) }
92} {1 {database or disk is full}}
93do_test quota-2.1.5 { set ::quota } {4096 5120}
94
95set ::quota_request_ok 1
96set ::quota [list]
97do_test quota-2.2.1 {
98 execsql { INSERT INTO t1 VALUES(3, randomblob(1100)) }
99} {}
100do_test quota-2.2.2 { set ::quota } {4096 5120}
101do_test quota-2.2.3 { file size test.db } {5120}
102unset ::quota_request_ok
103
104do_test quota-2.3.1 {
105 sqlite3 db2 bak.db
106 db2 close
107} {}
108
109do_test quota-2.4.1 {
110 sqlite3_quota_shutdown
111} {SQLITE_MISUSE}
112set ::quota [list]
113do_test quota-2.4.2 {
114 catchsql { INSERT INTO t1 VALUES(3, randomblob(1100)) }
115} {1 {database or disk is full}}
116do_test quota-2.4.3 { set ::quota } {5120 6144}
117do_test quota-2.4.4 { file size test.db } {5120}
drhef9659b2010-09-01 14:35:48 +0000118do_test quota-2.4.99 {
dan8cf35eb2010-09-01 11:40:05 +0000119 db close
120 sqlite3_quota_shutdown
121} {SQLITE_OK}
122
123#-------------------------------------------------------------------------
124# Try some tests with more than one connection to a database file. Still
125# in rollback mode.
126#
dan06bfd362010-09-01 18:00:09 +0000127# quota-3.1.*: Two connections to a single database file.
128#
129# quota-3.2.*: Two connections to each of several database files (that
130# are in the same quota group).
131#
dan8cf35eb2010-09-01 11:40:05 +0000132proc quota_check {filename limitvar size} {
133 upvar $limitvar limit
134 lappend ::quota [set limit] $size
135 if {[info exists ::quota_request_ok]} { set limit $size }
136}
137
138do_test quota-3.1.1 {
mistachkinfda06be2011-08-02 00:57:34 +0000139 forcedelete test.db
dan8cf35eb2010-09-01 11:40:05 +0000140 sqlite3_quota_initialize "" 1
141 sqlite3_quota_set *test.db 4096 quota_check
142} {SQLITE_OK}
dan8cf35eb2010-09-01 11:40:05 +0000143do_test quota-3.1.2 {
144 sqlite3 db test.db
145 execsql {
146 PRAGMA page_size = 1024;
147 PRAGMA journal_mode = delete;
148 PRAGMA auto_vacuum = off;
149 CREATE TABLE t1(a PRIMARY KEY, b);
150 INSERT INTO t1 VALUES(1, 'one');
151 }
152 file size test.db
153} {3072}
154do_test quota-3.1.3 {
155 sqlite3 db2 test.db
156 set ::quota [list]
157 execsql { CREATE TABLE t2(a, b) } db2
158 set ::quota
159} {}
dan9fc77022010-09-01 16:19:57 +0000160do_test quota-3.1.4 {
161 catchsql { CREATE TABLE t3(a, b) }
162} {1 {database or disk is full}}
163do_test quota-3.1.5 {
164 set ::quota_request_ok 1
165 execsql { CREATE TABLE t3(a, b) }
166} {}
dan06bfd362010-09-01 18:00:09 +0000167do_test quota-3.1.6 {
168 db close
169 db2 close
170 sqlite3_quota_set *test.db 0 {}
171} {SQLITE_OK}
dan8cf35eb2010-09-01 11:40:05 +0000172
dan06bfd362010-09-01 18:00:09 +0000173do_test quota-3.2.1 {
mistachkinfda06be2011-08-02 00:57:34 +0000174 delete_file force test.db test2.db
dan06bfd362010-09-01 18:00:09 +0000175
176 sqlite3_quota_set * 4096 {}
177 sqlite3 db1a test.db
178 sqlite3 db2a test2.db
179
180 foreach db {db1a db2a} {
181 execsql {
182 PRAGMA page_size = 1024;
183 PRAGMA journal_mode = delete;
184 PRAGMA auto_vacuum = off;
185 CREATE TABLE t1(a, b);
186 } $db
187 }
188
189 sqlite3 db1b test.db
190 sqlite3 db2b test2.db
191
192 list [file size test.db] [file size test2.db]
193} {2048 2048}
194
195catch { unset ::quota_request_ok }
196
197do_test quota-3.2.2 { execsql { INSERT INTO t1 VALUES('x', 'y') } db1a } {}
198do_test quota-3.2.3 { execsql { INSERT INTO t1 VALUES('v', 'w') } db1b } {}
199do_test quota-3.2.4 { execsql { INSERT INTO t1 VALUES('t', 'u') } db2a } {}
200do_test quota-3.2.5 { execsql { INSERT INTO t1 VALUES('r', 's') } db2b } {}
201
202do_test quota-3.2.6 {
203 catchsql { INSERT INTO t1 VALUES(randomblob(500), randomblob(500)) } db1a
204} {1 {database or disk is full}}
205do_test quota-3.2.7 {
206 catchsql { INSERT INTO t1 VALUES(randomblob(500), randomblob(500)) } db1b
207} {1 {database or disk is full}}
208do_test quota-3.2.8 {
209 catchsql { INSERT INTO t1 VALUES(randomblob(500), randomblob(500)) } db2a
210} {1 {database or disk is full}}
211do_test quota-3.2.9 {
212 catchsql { INSERT INTO t1 VALUES(randomblob(500), randomblob(500)) } db2b
213} {1 {database or disk is full}}
214
215set ::quota [list]
216proc quota_callback {file limitvar size} {
217 upvar $limitvar limit
shanehb76ee872011-04-15 21:37:33 +0000218 if {$::tcl_platform(platform)=="windows"} {
219 set file [ lindex [string map {\\ \/} $file] 0 ]
220 }
dan06bfd362010-09-01 18:00:09 +0000221 lappend ::quota $file $size
222 set limit 0
223}
224sqlite3_quota_set * 4096 quota_callback
225do_test quota-3.3.1 {
226 execsql { INSERT INTO t1 VALUES(randomblob(500), randomblob(500)) } db1a
227 execsql { INSERT INTO t1 VALUES(randomblob(500), randomblob(500)) } db1b
228 execsql { INSERT INTO t1 VALUES(randomblob(500), randomblob(500)) } db2a
229 execsql { INSERT INTO t1 VALUES(randomblob(500), randomblob(500)) } db2b
230 set ::quota
mistachkinf8a78462012-03-08 20:00:36 +0000231} [list [file join [get_pwd] test.db] 5120]
dan06bfd362010-09-01 18:00:09 +0000232
233do_test quota-3.2.X {
234 foreach db {db1a db2a db2b db1b} { catch { $db close } }
235 sqlite3_quota_set * 0 {}
236} {SQLITE_OK}
drhef9659b2010-09-01 14:35:48 +0000237
238#-------------------------------------------------------------------------
drh796af152011-08-24 01:25:55 +0000239# Quotas are deleted when unused and when their limit is set to zero
drhef9659b2010-09-01 14:35:48 +0000240#
241
242# Return a list of all currently defined quotas. Each quota is identified
243# by its pattern.
244proc quota_list {} {
245 set allq {}
246 foreach q [sqlite3_quota_dump] {
247 lappend allq [lindex $q 0]
248 }
249 return [lsort $allq]
250}
drhb6020c42011-08-25 01:42:12 +0000251proc quota_size {name} {
252 set allq {}
253 foreach q [sqlite3_quota_dump] {
254 if {[lindex $q 0]==$name} {return [lindex $q 2]}
255 }
256 return 0
257}
drh3d3e60e2010-09-01 15:11:38 +0000258
dan9fc77022010-09-01 16:19:57 +0000259do_test quota-4.1.1 {
drhef9659b2010-09-01 14:35:48 +0000260 sqlite3_quota_set *test.db 0 {}
261 quota_list
262} {}
dan9fc77022010-09-01 16:19:57 +0000263do_test quota-4.1.2 {
drhef9659b2010-09-01 14:35:48 +0000264 sqlite3_quota_set *test.db 4096 {}
265 quota_list
266} {*test.db}
dan9fc77022010-09-01 16:19:57 +0000267do_test quota-4.1.3 {
drh61cc4232010-09-01 14:45:16 +0000268 sqlite3_quota_set *test2.db 0 {}
269 quota_list
270} {*test.db}
dan9fc77022010-09-01 16:19:57 +0000271do_test quota-4.1.4 {
drh3d3e60e2010-09-01 15:11:38 +0000272 sqlite3_quota_set *test2.db 100000 {}
drh61cc4232010-09-01 14:45:16 +0000273 quota_list
274} {*test.db *test2.db}
dan9fc77022010-09-01 16:19:57 +0000275do_test quota-4.1.5 {
drh61cc4232010-09-01 14:45:16 +0000276 sqlite3_quota_set *test.db 0 {}
277 quota_list
278} {*test2.db}
dan9fc77022010-09-01 16:19:57 +0000279do_test quota-4.1.6 {
mistachkinfda06be2011-08-02 00:57:34 +0000280 forcedelete test2.db test2.db-journal test2.db-wal
drh3d3e60e2010-09-01 15:11:38 +0000281 sqlite3 db test2.db
282 db eval {CREATE TABLE t2(x); INSERT INTO t2 VALUES('tab-t2');}
283 quota_list
284} {*test2.db}
dan9fc77022010-09-01 16:19:57 +0000285do_test quota-4.1.7 {
drh3d3e60e2010-09-01 15:11:38 +0000286 catchsql {INSERT INTO t2 VALUES(zeroblob(200000))}
287} {1 {database or disk is full}}
dan9fc77022010-09-01 16:19:57 +0000288do_test quota-4.1.8 {
drh3d3e60e2010-09-01 15:11:38 +0000289 sqlite3 db2 test2.db
290 db2 eval {SELECT * FROM t2}
291} {tab-t2}
dan9fc77022010-09-01 16:19:57 +0000292do_test quota-4.1.9 {
drh3d3e60e2010-09-01 15:11:38 +0000293 sqlite3_quota_set *test2.db 0 {}
294 catchsql {INSERT INTO t2 VALUES(zeroblob(200000))}
295} {0 {}}
dan9fc77022010-09-01 16:19:57 +0000296do_test quota-4.1.10 {
drh3d3e60e2010-09-01 15:11:38 +0000297 quota_list
298} {*test2.db}
dan9fc77022010-09-01 16:19:57 +0000299do_test quota-4.1.11 {
drh3d3e60e2010-09-01 15:11:38 +0000300 db2 close
301 quota_list
302} {*test2.db}
dan9fc77022010-09-01 16:19:57 +0000303do_test quota-4.1.12 {
drh3d3e60e2010-09-01 15:11:38 +0000304 db close
305 quota_list
306} {}
drhef9659b2010-09-01 14:35:48 +0000307
dan9fc77022010-09-01 16:19:57 +0000308do_test quota-4.2.1 {
309 sqlite3_quota_set A 1000 {}
310 sqlite3_quota_set B 1000 {}
311 sqlite3_quota_set C 1000 {}
312 sqlite3_quota_set D 1000 {}
313 quota_list
314} {A B C D}
315do_test quota-4.2.2 {
316 sqlite3_quota_set C 0 {}
317 sqlite3_quota_set B 0 {}
318 quota_list
319} {A D}
320do_test quota-4.2.3 {
321 sqlite3_quota_set A 0 {}
322 sqlite3_quota_set D 0 {}
323 quota_list
324} {}
325do_test quota-4.2.4 {
326 sqlite3_quota_set A 1000 {}
327 sqlite3_quota_set B 1000 {}
328 sqlite3_quota_set C 1000 {}
329 sqlite3_quota_set A 0 {}
330 sqlite3_quota_set B 0 {}
331 sqlite3_quota_set C 0 {}
332 quota_list
333} {}
334do_test quota-4.2.5 {
335 sqlite3_quota_set A 1000 {}
336 sqlite3_quota_set B 1000 {}
337 sqlite3_quota_set C 1000 {}
338 sqlite3_quota_set C 0 {}
339 sqlite3_quota_set B 0 {}
340 sqlite3_quota_set A 0 {}
341 quota_list
342} {}
drhef9659b2010-09-01 14:35:48 +0000343
dan9fc77022010-09-01 16:19:57 +0000344do_test quota-4.3.1 {
345 sqlite3_quota_set A 1000 quota_callback
346 sqlite3 db A
347 sqlite3_quota_set A 0 quota_callback
348 db close
349 quota_list
350} {}
351
drh26541c92011-08-25 03:38:31 +0000352unset -nocomplain quotagroup
353if {$tcl_platform(platform)=="windows"} {
354 set quotagroup *\\quota-test-A?.db
355} else {
356 set quotagroup */quota-test-A?.db
357}
358foreach file [glob -nocomplain quota-test-A*] {
359 forcedelete $file
360}
dan9fc77022010-09-01 16:19:57 +0000361do_test quota-4.4.1 {
drh796af152011-08-24 01:25:55 +0000362 set ::quota {}
drh26541c92011-08-25 03:38:31 +0000363 sqlite3_quota_set $::quotagroup 10000 quota_callback
mistachkin9ac99312013-09-13 23:26:47 +0000364 forcedelete ./quota-test-A1.db ./quota-test-A2.db
drh796af152011-08-24 01:25:55 +0000365 sqlite3 db ./quota-test-A1.db
366 db eval {
367 CREATE TABLE t1(x);
368 INSERT INTO t1 VALUES(randomblob(5000));
369 }
370 quota_list
drh26541c92011-08-25 03:38:31 +0000371} [list $quotagroup]
drh796af152011-08-24 01:25:55 +0000372do_test quota-4.4.2 {
373 expr {$::quota==""}
374} {1}
375do_test quota-4.4.3 {
376 db close
377 sqlite3 db ./quota-test-A2.db
378 db eval {
379 CREATE TABLE t1(x);
380 INSERT INTO t1 VALUES(randomblob(5000));
381 }
382 quota_list
drh26541c92011-08-25 03:38:31 +0000383} [list $quotagroup]
drh796af152011-08-24 01:25:55 +0000384do_test quota-4.4.4 {
385 expr {$::quota!=""}
386} {1}
drhb6020c42011-08-25 01:42:12 +0000387do_test quota-4.4.5 {
388 db close
drh26541c92011-08-25 03:38:31 +0000389 sqlite3_quota_set $::quotagroup 0 {}
drhb6020c42011-08-25 01:42:12 +0000390 sqlite3_quota_dump
391} {}
392do_test quota-4.4.6 {
drh26541c92011-08-25 03:38:31 +0000393 sqlite3_quota_set $quotagroup 10000 quota_callback
drhb6020c42011-08-25 01:42:12 +0000394 sqlite3 db quota-test-A1.db
395 db eval {SELECT count(*) FROM sqlite_master}
drh26541c92011-08-25 03:38:31 +0000396 quota_size $quotagroup
drhb6020c42011-08-25 01:42:12 +0000397} [file size quota-test-A1.db]
398do_test quota-4.4.7 {
399 sqlite3_quota_file quota-test-A2.db
drh26541c92011-08-25 03:38:31 +0000400 quota_size $::quotagroup
drhb6020c42011-08-25 01:42:12 +0000401} [expr {[file size quota-test-A1.db]+[file size quota-test-A2.db]}]
drh796af152011-08-24 01:25:55 +0000402
drh26541c92011-08-25 03:38:31 +0000403unset -nocomplain quotagroup
404if {$tcl_platform(platform)=="windows"} {
405 set quotagroup *\\quota-test-B*
406} else {
407 set quotagroup */quota-test-B*
408}
409foreach file [glob -nocomplain quota-test-B*] {
410 forcedelete $file
411}
drhb6020c42011-08-25 01:42:12 +0000412do_test quota-4.5.1 {
drh26541c92011-08-25 03:38:31 +0000413 sqlite3_quota_set $::quotagroup 100000 quota_callback
414 quota_size $::quotagroup
drhb6020c42011-08-25 01:42:12 +0000415} {0}
416do_test quota-4.5.2 {
417 sqlite3_quota_file quota-test-B1.txt
drh26541c92011-08-25 03:38:31 +0000418 quota_size $::quotagroup
drhb6020c42011-08-25 01:42:12 +0000419} {0}
420proc add_to_file {name n} {
421 set out [open $name a]
422 fconfigure $out -translation binary
423 puts -nonewline $out [string repeat x $n]
424 close $out
425}
426do_test quota-4.5.3 {
427 add_to_file quota-test-B1.txt 123
428 sqlite3_quota_file quota-test-B1.txt
drh26541c92011-08-25 03:38:31 +0000429 quota_size $::quotagroup
drhb6020c42011-08-25 01:42:12 +0000430} {123}
431do_test quota-4.5.4 {
432 add_to_file quota-test-B2.txt 234
433 sqlite3_quota_file quota-test-B2.txt
drh26541c92011-08-25 03:38:31 +0000434 quota_size $::quotagroup
drhb6020c42011-08-25 01:42:12 +0000435} {357}
436do_test quota-4.5.5 {
437 add_to_file quota-test-B1.txt 2000
438 sqlite3_quota_file quota-test-B1.txt
drh26541c92011-08-25 03:38:31 +0000439 quota_size $::quotagroup
drhb6020c42011-08-25 01:42:12 +0000440} {2357}
441do_test quota-4.5.6 {
442 forcedelete quota-test-B1.txt
443 sqlite3_quota_file quota-test-B1.txt
drh26541c92011-08-25 03:38:31 +0000444 quota_size $::quotagroup
drhb6020c42011-08-25 01:42:12 +0000445} {234}
446do_test quota-4.5.7 {
447 forcedelete quota-test-B2.txt
448 sqlite3_quota_file quota-test-B2.txt
drh26541c92011-08-25 03:38:31 +0000449 quota_size $::quotagroup
drhb6020c42011-08-25 01:42:12 +0000450} {0}
451do_test quota-4.5.8 {
452 add_to_file quota-test-B3.txt 1234
453 sqlite3_quota_file quota-test-B3.txt
drh26541c92011-08-25 03:38:31 +0000454 quota_size $::quotagroup
drhb6020c42011-08-25 01:42:12 +0000455} {1234}
456do_test quota-4.5.9 {
drh26541c92011-08-25 03:38:31 +0000457 sqlite3_quota_set $quotagroup 0 {}
458 quota_size $::quotagroup
drhb6020c42011-08-25 01:42:12 +0000459} {0}
drh796af152011-08-24 01:25:55 +0000460
461do_test quota-4.9.1 {
462 db close
dan9fc77022010-09-01 16:19:57 +0000463 sqlite3_quota_set A 1000 quota_callback
464 sqlite3_quota_shutdown
465} {SQLITE_OK}
drh796af152011-08-24 01:25:55 +0000466do_test quota-4.9.2 {
dan9fc77022010-09-01 16:19:57 +0000467 quota_list
468} {}
469
dan06bfd362010-09-01 18:00:09 +0000470#-------------------------------------------------------------------------
471# The following tests test that the quota VFS handles malloc and IO
472# errors.
473#
dan9fc77022010-09-01 16:19:57 +0000474
dan06bfd362010-09-01 18:00:09 +0000475sqlite3_quota_initialize "" 1
476sqlite3_quota_set *test.db 4096 {}
477
478do_faultsim_test quota-5.1 -prep {
479 catch {db close}
480} -body {
481 sqlite3 db test2.db
482}
483do_faultsim_test quota-5.2 -prep {
484 catch {db close}
485} -body {
486 sqlite3 db test.db
487}
488
489catch { db close }
mistachkinfda06be2011-08-02 00:57:34 +0000490forcedelete test.db
dan06bfd362010-09-01 18:00:09 +0000491
492do_test quota-5.3.prep {
493 sqlite3 db test.db
494 execsql {
495 PRAGMA auto_vacuum = 1;
496 PRAGMA page_size = 1024;
497 CREATE TABLE t1(a, b);
498 INSERT INTO t1 VALUES(10, zeroblob(1200));
499 }
500 faultsim_save_and_close
501} {}
502do_faultsim_test quota-5.3 -prep {
503 faultsim_restore_and_reopen
504} -body {
505 execsql { DELETE FROM t1 }
506}
507
508do_test quota-5.4.1 {
509 catch { db close }
mistachkinfda06be2011-08-02 00:57:34 +0000510 forcedelete test.db
dan06bfd362010-09-01 18:00:09 +0000511 file mkdir test.db
512 list [catch { sqlite3 db test.db } msg] $msg
513} {1 {unable to open database file}}
514
515do_faultsim_test quota-5.5 -prep {
516 catch { sqlite3_quota_shutdown }
517} -body {
518 sqlite3_quota_initialize "" 1
519}
520
521do_faultsim_test quota-5.6 -prep {
522 catch { sqlite3_quota_shutdown }
523 sqlite3_quota_initialize "" 1
524} -body {
525 sqlite3_quota_set * 4096 {}
526}
dan9fc77022010-09-01 16:19:57 +0000527
528catch { sqlite3_quota_shutdown }
dan8cf35eb2010-09-01 11:40:05 +0000529finish_test