Joe Swatosh wrote:
> Hi Brane,
> On 1/9/07, Branko Čibej <firstname.lastname@example.org> wrote:
>> Joe Swatosh wrote:
>>> Hi All,
>>> As I've been trying to get the Ruby bindings tests to pass on windows,
>>> I ran into a failing test. If I changed from BDB to FSFS the Ruby
>>> version of the test passes.
>>> I rewrote it as a C test, just to make sure that Ruby wasn't involved
>>> at all and sure enough the test below fails, but if the fs_type is
>>> changed to fsfs it passes.
>>> Perhaps I've screwed up the build somehow? Screwed up somehow that
>>> wasn't detected by the existing tests?
>> You don't say how the test fails, but I'm pretty sure you can't delete a
>> BDB filesystem while it's still open.
>> -- Brane
> I realized this morning that this was a pretty boneheaded report.
> Let's see if I can do better.
> With this patch:
> Index: svn-trunk-wc/subversion/tests/libsvn_fs/fs-test.c
> --- svn-trunk-wc/subversion/tests/libsvn_fs/fs-test.c (revision 22939)
> +++ svn-trunk-wc/subversion/tests/libsvn_fs/fs-test.c (working copy)
> @@ -4501,6 +4501,28 @@
> +static svn_error_t *
> +test_delete_fs(const char **msg,
> + svn_boolean_t msg_only,
> + svn_test_opts_t *opts,
> + apr_pool_t *pool)
> + svn_fs_t *fs;
> + const char *name = "test-fs-deletion";
> + apr_hash_t *fs_config = apr_hash_make(pool);
> + apr_hash_set(fs_config, SVN_FS_CONFIG_BDB_TXN_NOSYNC,
> + APR_HASH_KEY_STRING, "1");
> + apr_hash_set(fs_config, SVN_FS_CONFIG_FS_TYPE,
> + APR_HASH_KEY_STRING,
> + opts->fs_type);
> + *msg = "create a file system then destroy it";
> + if (msg_only)
> + return SVN_NO_ERROR;
> + SVN_ERR(svn_fs_create(&fs, name, fs_config, pool));
> + SVN_ERR(svn_fs_delete_fs(name, pool));
You can't delete the filesystem path while the filesystem is still open,
because BDB only closes its databases at pool cleanup time. It seems the
Ruby bindings aren't following these rules, but I don't know enough
about SWIG or Ruby to help solve this problem.
On a side note, Joe's patch revealed that we're leaking an error in the
BDB code somewhere, which I'm currently tracking down.
To unsubscribe, e-mail: email@example.com
For additional commands, e-mail: firstname.lastname@example.org
Received on Wed Jan 10 23:45:46 2007