]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Fix a bug in loadext.test. (CVS 4359)
authordanielk1977 <danielk1977@noemail.net>
Sat, 1 Sep 2007 06:19:05 +0000 (06:19 +0000)
committerdanielk1977 <danielk1977@noemail.net>
Sat, 1 Sep 2007 06:19:05 +0000 (06:19 +0000)
FossilOrigin-Name: 2be8af9d402a5cd8da8c348883188eb38900f6dc

manifest
manifest.uuid
test/loadext.test

index 1c991da801027defcb8ed269d46191abf41ee1b9..113ce100d4ecc4e9384864f5a205b65503d713dc 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Call\ssqlite3OsDlError\sto\sobtain\serror\sinformation\safter\sDlOpen\sor\sDlSym\sfail.\s(CVS\s4358)
-D 2007-09-01T05:57:50
+C Fix\sa\sbug\sin\sloadext.test.\s(CVS\s4359)
+D 2007-09-01T06:19:06
 F Makefile.in bfcc303429a5d9dcd552d807ee016c77427418c3
 F Makefile.linux-gcc 65241babba6faf1152bf86574477baab19190499
 F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
@@ -338,7 +338,7 @@ F test/lastinsert.test 474d519c68cb79d07ecae56a763aa7f322c72f51
 F test/laststmtchanges.test 18ead86c8a87ade949a1d5658f6dc4bb111d1b02
 F test/like.test 9b8eb634d2c34b36b365c1baae115c9bd6e56674
 F test/limit.test 2a87b9cb2165abb49ca0ddcf5cb43cf24074581f
-F test/loadext.test ea04ac20e20e3f42514f55487ef9a9d6fda51bd1
+F test/loadext.test 1911e7365a6d31d77ba00dd3a8a31b7f2111a670
 F test/loadext2.test 95ca7e2cb03fd3e068de97c3a2fe58dbdfd769e1
 F test/lock.test 6825aea0b5885578b1b63a3b178803842c4ee9f1
 F test/lock2.test 5f9557b775662c2a5ee435378f39e10d64f65cb3
@@ -568,7 +568,7 @@ F www/tclsqlite.tcl 8be95ee6dba05eabcd27a9d91331c803f2ce2130
 F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
 F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b
 F www/whentouse.tcl fc46eae081251c3c181bd79c5faef8195d7991a5
-P ca6c1e3f44d8b9d9b76a0efe53ea6a6ad5e14d57
-R bc8176723b1b67ea3809dd5ad6b3d1c7
+P 3d74256c9123e8434c68e6a0c5b61686b34a4328
+R 1c0347842404603d8a4dc887d9128ff6
 U danielk1977
-Z 3bc8cc7848a229a5523b979148fa9e5d
+Z 352000b212599994e03c0b4ef61b1896
index 6e2e9837f83fa7ef621faf97f3ad5ba26b3af40f..2ba744d5df774badfff32fea08c7546c12e933d4 100644 (file)
@@ -1 +1 @@
-3d74256c9123e8434c68e6a0c5b61686b34a4328
\ No newline at end of file
+2be8af9d402a5cd8da8c348883188eb38900f6dc
\ No newline at end of file
index 2b90cc03fffc02aea87e93859501dcb0b429c659..81e152f4726a00e14d33c7e10cc276fe00e3c1d2 100644 (file)
@@ -11,7 +11,7 @@
 # This file implements regression tests for SQLite library.  The
 # focus of this script is extension loading.
 #
-# $Id: loadext.test,v 1.10 2007/09/01 05:57:50 danielk1977 Exp $
+# $Id: loadext.test,v 1.11 2007/09/01 06:19:06 danielk1977 Exp $
 
 set testdir [file dirname $argv0]
 source $testdir/tester.tcl
@@ -33,18 +33,28 @@ if {$::tcl_platform(platform) eq "windows"} {
 # (because they are returned by sqlite3OsDlError()). For now, they only
 # work with UNIX (and probably only certain kinds of UNIX).
 #
-# When a shared-object cannot be opened, we expect the error message to
-# be:
+# When a shared-object cannot be opened because it does not exist, the
+# format of the message returned is:
 #
-#      [format $dlerror_cantopen <shared-object-name>]
+#      [format $dlerror_nosuchfile <shared-object-name>]
+#
+# When a shared-object cannot be opened because it consists of the 4
+# characters "blah" only, we expect the error message to be:
+#
+#      [format $dlerror_notadll <shared-object-name>]
 #
 # When a symbol cannot be found within an open shared-object, the error
 # message should be:
 #
 #      [format $dlerror_nosymbol <shared-object-name> <symbol-name>]
 #
-set dlerror_cantopen {%s: file too short}
-set dlerror_nosymbol {%s: undefined symbol: %s}
+# The exact error messages are not important. The important bit is
+# that SQLite is correctly copying the message from xDlError().
+#
+set dlerror_nosuchfile \
+    {%s: cannot open shared object file: No such file or directory}
+set dlerror_notadll    {%s: file too short}
+set dlerror_nosymbol   {%s: undefined symbol: %s}
 
 # Make sure the test extension actually exists.  If it does not
 # exist, try to create it.  If unable to create it, then skip this
@@ -112,11 +122,12 @@ sqlite3_enable_load_extension db 1
 # Try to load an extension for which the file does not exist.
 #
 do_test loadext-2.1 {
+  file delete -force ${testextension}xx
   set rc [catch {
     sqlite3_load_extension db "${testextension}xx"
   } msg]
   list $rc $msg
-} [list 1 [format $dlerror_cantopen ${testextension}xx]]
+} [list 1 [format $dlerror_nosuchfile ${testextension}xx]]
 
 # Try to load an extension for which the file is not a shared object
 #
@@ -128,7 +139,7 @@ do_test loadext-2.2 {
     sqlite3_load_extension db "${testextension}xx"
   } msg]
   list $rc $msg
-} [list 1 [format $dlerror_cantopen ${testextension}xx]]
+} [list 1 [format $dlerror_notadll ${testextension}xx]]
 
 # Try to load an extension for which the file is present but the
 # entry point is not.