You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Arfrever Frehtes Taifersar Arahesis <ar...@gmail.com> on 2008/08/10 20:59:26 UTC
Test failures on the ctypes-python-bindings branch
Some tests fail on the ctypes-python-bindings branch:
$ test/run_all.py
.E...EEEE..E.Segmentation fault
Running tests manually gives more useful information:
$ test/localrepos.py
.E.
======================================================================
ERROR: test_local_get_prop (__main__.LocalRepositoryTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "test/localrepos.py", line 36, in test_local_get_prop
self.repos.get_rev_prop(8, "svn:log")
File "/home/Arfrever/subversion_ctypes-python-bindings/csvn/repos.py", line 428, in get_rev_prop
return _types.SvnStringPtr.from_param(value)
File "/home/Arfrever/subversion_ctypes-python-bindings/csvn/types.py", line 257, in from_param
return string_at(obj[0].data.raw, obj[0].len)
AttributeError: 'str' object has no attribute 'raw'
----------------------------------------------------------------------
Ran 3 tests in 0.528s
FAILED (errors=1)
$ test/remoterepos.py
..EEEE
======================================================================
ERROR: test_revprop_get (__main__.RemoteRepositoryTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "test/remoterepos.py", line 73, in test_revprop_get
self.assertEqual(self.repos.revprop_get("svn:log"),
File "/home/Arfrever/subversion_ctypes-python-bindings/csvn/repos.py", line 273, in revprop_get
return self.revprop_list(revnum)[propname]
File "/home/Arfrever/subversion_ctypes-python-bindings/csvn/types.py", line 62, in __getitem__
value = self.wrapper.from_param(value)
File "/home/Arfrever/subversion_ctypes-python-bindings/csvn/types.py", line 257, in from_param
return string_at(obj[0].data.raw, obj[0].len)
AttributeError: 'str' object has no attribute 'raw'
======================================================================
ERROR: test_revprop_list (__main__.RemoteRepositoryTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "test/remoterepos.py", line 60, in test_revprop_list
self.assertEqual(props["svn:log"],
File "/home/Arfrever/subversion_ctypes-python-bindings/csvn/types.py", line 62, in __getitem__
value = self.wrapper.from_param(value)
File "/home/Arfrever/subversion_ctypes-python-bindings/csvn/types.py", line 257, in from_param
return string_at(obj[0].data.raw, obj[0].len)
AttributeError: 'str' object has no attribute 'raw'
======================================================================
ERROR: test_revprop_set (__main__.RemoteRepositoryTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "test/remoterepos.py", line 102, in test_revprop_set
self.assertEqual(self.repos.revprop_get("svn:log"), "Changed log")
File "/home/Arfrever/subversion_ctypes-python-bindings/csvn/repos.py", line 273, in revprop_get
return self.revprop_list(revnum)[propname]
File "/home/Arfrever/subversion_ctypes-python-bindings/csvn/types.py", line 62, in __getitem__
value = self.wrapper.from_param(value)
File "/home/Arfrever/subversion_ctypes-python-bindings/csvn/types.py", line 257, in from_param
return string_at(obj[0].data.raw, obj[0].len)
AttributeError: 'str' object has no attribute 'raw'
======================================================================
ERROR: test_svnimport (__main__.RemoteRepositoryTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "test/remoterepos.py", line 119, in test_svnimport
commit_info = self.repos.svnimport(newfile, "%s/newfile.txt" % repos_url, log_func=self._log_func)
File "/home/Arfrever/subversion_ctypes-python-bindings/csvn/repos.py", line 338, in svnimport
no_ignore, self.client, self.iterpool)
File "/home/Arfrever/subversion_ctypes-python-bindings/csvn/core/functions.py", line 47, in SVN_ERR
raise SubversionException(err)
SubversionException: Valid UTF-8 data
(hex:)
followed by invalid UTF-8 sequence
(hex: d8 4b c1 4c)
----------------------------------------------------------------------
Ran 6 tests in 1.163s
FAILED (errors=4)
$ test/svntypes.py
E.
======================================================================
ERROR: test_array (__main__.TypesTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "test/svntypes.py", line 23, in test_array
self.svnarray = _types.Array(c_char_p, self.pyarray)
File "/home/Arfrever/subversion_ctypes-python-bindings/csvn/types.py", line 120, in __init__
self.extend(items)
File "/home/Arfrever/subversion_ctypes-python-bindings/csvn/ext/listmixin.py", line 196, in extend
self[len(self):len(self)] = other
File "/home/Arfrever/subversion_ctypes-python-bindings/csvn/ext/listmixin.py", line 133, in __setitem__
self._set_element(start + j, assign_val)
File "/home/Arfrever/subversion_ctypes-python-bindings/csvn/types.py", line 130, in _set_element
self.elts[i] = value
File "/home/Arfrever/subversion_ctypes-python-bindings/csvn/types.py", line 123, in <lambda>
elts = property(fget=lambda self: cast(self.header[0].elts.raw,
AttributeError: 'str' object has no attribute 'raw'
----------------------------------------------------------------------
Ran 2 tests in 0.002s
FAILED (errors=1)
$ test/wc.py
test_add (__main__.WCTestCase) ... ok
test_copy (__main__.WCTestCase) ... ok
test_delete (__main__.WCTestCase) ... ERROR
test_diff (__main__.WCTestCase) ... ok
test_export (__main__.WCTestCase) ... Segmentation fault
--
Arfrever Frehtes Taifersar Arahesis
Re: Test failures on the ctypes-python-bindings branch
Posted by David James <ja...@cs.toronto.edu>.
On Sun, Aug 10, 2008 at 1:59 PM, Arfrever Frehtes Taifersar Arahesis
<ar...@gmail.com> wrote:
> Some tests fail on the ctypes-python-bindings branch:
>
> $ test/run_all.py
> .E...EEEE..E.Segmentation fault
>
> Running tests manually gives more useful information:
>
> $ test/localrepos.py
> .E.
> ======================================================================
> ERROR: test_local_get_prop (__main__.LocalRepositoryTestCase)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "test/localrepos.py", line 36, in test_local_get_prop
> self.repos.get_rev_prop(8, "svn:log")
> File "/home/Arfrever/subversion_ctypes-python-bindings/csvn/repos.py", line 428, in get_rev_prop
> return _types.SvnStringPtr.from_param(value)
> File "/home/Arfrever/subversion_ctypes-python-bindings/csvn/types.py", line 257, in from_param
> return string_at(obj[0].data.raw, obj[0].len)
> AttributeError: 'str' object has no attribute 'raw'
> [...]
Hi Arfrever,
It looks like this is a bug in ctypesgen. Revision 51 of ctypesgen
works fine, but revision 52 and 53 produce the errors you mentioned.
Tim, could you look into this? The bug in ctypesgen seems to be that
ctypesgen now outputs "c_char_p" and "Pointer(char) instead of String.
r53 seems to be better than r52 but still forgets to output String in
a bunch of places.
By the way, the reason why we use String instead of c_char_p is
because c_char_p assumes that the string is null terminated -- this
may be a bad assumption. There is no way to get at the internals of
the string if it returns c_char_p. On the other hand, if you return
POINTER(char), you are forced to convert between strings and pointers
manually. The String class makes both the POINTER(char) and the String
interface available, and therefore is always safe to use in place of a
c_char_p or POINTER(char).
Cheers,
David
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org