On Tue, May 13, 2008 at 4:01 PM, Ian Eslick <[EMAIL PROTECTED]> wrote: > I had just run into this myself too! Anyway, I made some tweaks to the > patch and just pushed the fix. > > You could write a whitebox test for the auxiliary function I created called > elephant-db-path which returns a pathname to probe-file regardless of the > input spec.
Here it is. There's one problem though: for POSIX-like systems, multiple subsequent slashes don't change the meaning of a pathname. This is not the case for CL pathnames. Should we care about it? BTW there are some aspects of the tests system I fail to understand. For example, elephant-tests fails to compile (tests/testconcurrency.lisp wants to use package BT, which cannot be found). -- Richard -- http://szopa.tasak.gda.pl/
New patches: [elephant-db-path-test Ryszard Szopa <[EMAIL PROTECTED]>**20080513213222] { hunk ./tests/testbdb.lisp 46 + +(test elephant-db-path-test + (is (typep (db-bdb::elephant-db-path "/tmp/") 'pathname)) + (is (typep (db-bdb::elephant-db-path #P"/tmp") 'pathname)) + + + ;; if there's no trailing slash, merge-pathname assume that the name + ;; part of the pathname is already filled. + (is (equal (db-bdb::elephant-db-path #P"/tmp") #P "/tmp/%ELEPHANT")) + + ;; I assume that calling elephant-db-path with a string and a + ;; pathname made form that string should yield an EQUAL result. + + ;; multiple subsequent slashes are treated as one by POSIX. I am not + ;; sure whether this is true eg. for Windows. + (is (equal (db-bdb::elephant-db-path #P"/tmp/") (db-bdb::elephant-db-path "/tmp/"))) + + (is (equal (db-bdb::elephant-db-path #P"/tmp/") (db-bdb::elephant-db-path "/tmp/")))) } Context: [Pathname argument to db-bdb open-controller patch [EMAIL PROTECTED] [Add *default-retries* to elephant transaction model; wrap delete pobj in txn [EMAIL PROTECTED] [Fix map-btree failure to check iif first value in a range map is out of range [EMAIL PROTECTED] [Default to non-inherited index, added :inherit slot option - push :elephant onto *featuress** [EMAIL PROTECTED] [cl-sql implementing Ian's major features read at robertlread.net**20080504230520 Although this is all green, it is certainly not perfect. I am checking in it in hopes it will help the postmodern guys, though in hindsight I doubt it will, much. I'm also starting to think the cl-sql backend should be deprecated. ] [Move dependencies on bordeaux threads to elephant-tests [EMAIL PROTECTED] [Code reorg, warning remove, bug fix in change-class [EMAIL PROTECTED] [Add support for bulk reads; fix a few small bugs; transient to persistent change cclass support [EMAIL PROTECTED] [un-disabled tests for SBCL [EMAIL PROTECTED] [db-postmodern: sync-cache type handling fix [EMAIL PROTECTED] [test concurrency extended [EMAIL PROTECTED] [transaction restart support plus extended features [EMAIL PROTECTED] [db-postmodern: transaction retry handling, serializable isolation [EMAIL PROTECTED] [db-postmodern: small sync cache fix [EMAIL PROTECTED] cache was discarded in empty txn ] [Disabling threading tests for SBCL Robert L. Read**20080410015544] [Chun Tian's conditional for lispworks slot-definition-allocation [EMAIL PROTECTED] [spelling errors Robert L. Read**20080408140049] [DB-POSTMODERN: remove DBPM-ERROR; don't attempt to remove an already prepared statement (pointless since the txn is aborted at the time); defer all errors to txn handler (but warn and print the offending statement) [EMAIL PROTECTED] [Changed erroneous statement in tutorial that index comparison uses EQUALP. [EMAIL PROTECTED] [DB-POSTMODERN: support transaction retries; handle deadlock; add savepoint utility functions; add warnings to help debugging problematic conditions. [EMAIL PROTECTED] [added BORDEAUX-THREADS dependency and changed PM controller to use it instead of SB-THREAD stuff. [EMAIL PROTECTED] [added concurrency test cases. [EMAIL PROTECTED] [DB-POSTMODERN: reap old connections when a new one is requested. [EMAIL PROTECTED] [Remove old files [EMAIL PROTECTED] [add slot-unbound test [EMAIL PROTECTED] [Add schema-evolution.lisp [EMAIL PROTECTED] [SBCL compatibility fixes; migration fixes; small bug fixes [EMAIL PROTECTED] [Derived index slots; support migrate/upgrade; fix schema evolution bugs [EMAIL PROTECTED] [Better explicit vs. slot association test [EMAIL PROTECTED] [Fix bug in map oids [EMAIL PROTECTED] [Add to load system [EMAIL PROTECTED] [Add association test file; fix association bugs [EMAIL PROTECTED] [API proposal for association slots [EMAIL PROTECTED] [Implement associations; fix some indexing-related bugs; 2 failing tests left [EMAIL PROTECTED] [Fix metaprotocol errors, some code reorg and fixing the change-class test to match MOP spec [EMAIL PROTECTED] [Finish and add simple query interpreter [EMAIL PROTECTED] [Patch serializer for unbound slot error for now; add :index as valid initarg [EMAIL PROTECTED] [Fixed a myriad of problems in schema evolution [EMAIL PROTECTED] Schema chains are properly maintained Schema ids properly updated in instance-table Indexed slots populated on upgrade (indexes are incoherent if lazy updating!) map-class adjusted to work with and upgrade prior instances ensure proper initialization of values speed up transactions for persistent instance creation ] [Massive upgrade of new schema-evolution functionality; bug fixes [EMAIL PROTECTED] Features: Partially working support for change-class, redefine-class, update-instance-* Support for store synchronization and evolution of db instances and storage Lots of little integration issues and refactoring Bugs: Added unbound slot edits Fixed little bugs hiding in serializer, btree implementation, btree mapping functions, Fixed some little bugs hiding in bdb Added tests for dup-btrees and to test for btree bugs from before ] [More efficient get-con functionality; ensure finalized class when registering a schema [EMAIL PROTECTED] [Various fixes to indexing, set-valued slots, etc and fixes to indexing tests [EMAIL PROTECTED] [Implement cached slots; basic indexed slots; some work on indexed tests [EMAIL PROTECTED] [Fix serializer bugs for lexical eq; bdb default cid bug [EMAIL PROTECTED] [Fix bugs related to indexed classes; drop-instances [EMAIL PROTECTED] [Fix delete in dup btree [EMAIL PROTECTED] [Fix bdb-controller initialization for indexed btrees [EMAIL PROTECTED] [Association edits, dup btree fixes, remove test harness stuff [EMAIL PROTECTED] [Fix BDB comparison fn and add key vs value comparisons [EMAIL PROTECTED] [Added set-valued slots, fixed bug in map-class, handle set-valued slot inits [EMAIL PROTECTED] [Initial reorg to support 0.9.2 feature set; some working features [EMAIL PROTECTED] Hierarchical class indexing Class schemas Duplicate btrees Lazy deserialization support ] [Check for unbound slot; potential fix for a compiler error [EMAIL PROTECTED] [Fix test dependence for ff-index-test [EMAIL PROTECTED] [Improve berkeley DB version agnostic code [EMAIL PROTECTED] Added an error message to configure my-config.sexp and made sure we load it directly from my-config.sexp so that we get it right at load time. Prior patch didn't override default until after load time. ] [Support for multiple BDB versions [EMAIL PROTECTED] [db-bdb updated to BerkeleyDB 4.6 [EMAIL PROTECTED] Changed only BDB constants as upgrade 4.5 -> 4.6 they were changed. A kind of hack perhaps. But it works. The testing was not excessive, but it works well for my project. ] [add test for STRING types (as opposed to SIMPLE-STRING types) [EMAIL PROTECTED] [Refactor UTF{16,32}LE serializers. [EMAIL PROTECTED] [Enable multiple process connections to a BDB data-store via DB_REGISTER option [EMAIL PROTECTED] [Enable multi-store indexed classes [EMAIL PROTECTED] [Change semantics of transaction :retry-count from tries to retries [EMAIL PROTECTED] [Minor edits, fixed a comment, fixed a db-lisp out of date error [EMAIL PROTECTED] [Alex's patch for 8.3 [EMAIL PROTECTED] I entered here the patch from Alex of 2088/02/16 which apparently makes this compatible with Postgres 8.3. It is green for me on all tests on Posgres 8.1, so I am committing it. ] [mtype change in dcm [EMAIL PROTECTED] [moved cache-instance into initial-persistent-setup [EMAIL PROTECTED] because it was bypassed by recreate-instance otherwise ] [accessor name in tests change [EMAIL PROTECTED] [db-postmodern: pm-btree initialization fixed [EMAIL PROTECTED] [recreate-instance stuff improved [EMAIL PROTECTED] [db-postmodern: removed specialized map-index [EMAIL PROTECTED] because pure cursor version works fine and is more robust ] [cursor-duplicate removed from db-postmodern Henrik Hjelte<[EMAIL PROTECTED]>*-20071124163701] [db-postmodern fix map-index optimization bug Henrik Hjelte <[EMAIL PROTECTED]>**20080104151644] [db-postmodern: cursors re-implemented [EMAIL PROTECTED] [controller-doc-improvement [EMAIL PROTECTED] [tutorial [EMAIL PROTECTED] [non-keyword-accessors [EMAIL PROTECTED] allows lispworks to run tests. ] [function-call-key-form [EMAIL PROTECTED] [documentation type fix [EMAIL PROTECTED] [Fix the use of internal symbol of sb-kernel in memutils Leonardo Varuzza <[EMAIL PROTECTED]>**20071230000120 memutil.lisp use the functions sb-kernel::copy-*-from-system-area, which aren't exported in the latest version of sbcl. Fix it adding the :: when appropriate ] [db-bdb bugfix: when bdb key comparison compared only the first half of utf16 strings [EMAIL PROTECTED] [Fix instance deserialization to bypass initialization protocol [EMAIL PROTECTED] [db-postmodern: optimized map-index for -by-value case [EMAIL PROTECTED] [db-postmodern: optimized form-slot-key for persistent-slot-reader [EMAIL PROTECTED] it uses SBCL internal function now, for other implementation it's less optimized. ] [db-postmodern: small example update [EMAIL PROTECTED] [added sh script for flushing logs sample [EMAIL PROTECTED] [db-postmodern removed possiblity of using NIL as a key in btrees Henrik Hjelte<[EMAIL PROTECTED]>**20071124163828] [cursor-duplicate removed from db-postmodern Henrik Hjelte<[EMAIL PROTECTED]>**20071124163701] [removed a little compiler warning (typo) Henrik Hjelte<[EMAIL PROTECTED]>**20071122151929] [remove kind-hints parameter from add-index Henrik Hjelte<[EMAIL PROTECTED]>**20071122151046 Probably a coming feature from Ian, but right now it breaks the generic function add-index and thus postmodern, so I removed it for now. ] [Ensure set-db-synch is defined before pset is loaded [EMAIL PROTECTED] [Fix instance deserialization to bypass initialization protocol [EMAIL PROTECTED] [Fix to from-end traversal of new map-index [EMAIL PROTECTED] [New map-index implementation [EMAIL PROTECTED] [Cheaper get-instance-by-value [EMAIL PROTECTED] [TAG ELEPHANT-0-9-1 [EMAIL PROTECTED] Patch bundle hash: 2945b4a380c9d23ab5250a87b05e8434619c7ee6
_______________________________________________ elephant-devel site list elephant-devel@common-lisp.net http://common-lisp.net/mailman/listinfo/elephant-devel