Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 418814 Details for
Bug 567418
dev-lang/python-2.7.10-r1 ctypes module truncates 64-bit pointers
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
Test log
test.log (text/plain), 4.83 KB, created by
Mike Gilbert
on 2015-12-08 22:51:42 UTC
(
hide
)
Description:
Test log
Filename:
MIME Type:
Creator:
Mike Gilbert
Created:
2015-12-08 22:51:42 UTC
Size:
4.83 KB
patch
obsolete
>============================= test session starts ============================== >platform linux2 -- Python 2.7.10, pytest-2.8.3, py-1.4.31, pluggy-0.3.1 >rootdir: /home/floppym/src/python-mbus, inifile: pytest.ini >collected 16 items > >tests/test_MBus_connect.py F >tests/test_MBus_disconnect.py E >tests/test_MBus_init.py ...Fs.......F. > >==================================== ERRORS ==================================== >________________________ ERROR at setup of test_connect ________________________ > > @pytest.fixture > def mbus_tcp_connected(): > tmp = MBus.MBus(libpath="/usr/lib64/libmbus.so", host="127.0.0.1") >> return tmp.connect() > >tests/test_MBus_disconnect.py:10: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >self = <mbus.MBus.MBus instance at 0x7f75ed81f3b0> > > def connect(self): > """ > Connect to MBus. > """ > if self.handle: > if self._libmbus.mbus_connect(self.handle) == -1: >> raise Exception("libmbus.mbus_connect failed") >E Exception: libmbus.mbus_connect failed > >mbus/MBus.py:94: Exception >=================================== FAILURES =================================== >_________________________________ test_connect _________________________________ > >mbus_tcp = <mbus.MBus.MBus instance at 0x7f75ed0ff200> > > def test_connect(mbus_tcp): >> mbus_tcp.connect() > >tests/test_MBus_connect.py:13: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >self = <mbus.MBus.MBus instance at 0x7f75ed0ff200> > > def connect(self): > """ > Connect to MBus. > """ > if self.handle: > if self._libmbus.mbus_connect(self.handle) == -1: >> raise Exception("libmbus.mbus_connect failed") >E Exception: libmbus.mbus_connect failed > >mbus/MBus.py:94: Exception >___________________________ test_device_nonexistent ____________________________ > > @pytest.mark.serial > def test_device_nonexistent(): >> with pytest.raises(FileNotFoundError): >E NameError: global name 'FileNotFoundError' is not defined > >tests/test_MBus_init.py:36: NameError >_______________________ test_libpath_shared_object_only ________________________ > > def test_libpath_shared_object_only(): > with pytest.raises(OSError): >> foo = MBus.MBus(libpath='libmbus.so') > >tests/test_MBus_init.py:86: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >self = <mbus.MBus.MBus instance at 0x7f75ed0c33b0>, args = () >kwargs = {'libpath': 'libmbus.so'} >os = <module 'os' from '/usr/lib64/python2.7/os.pyc'> >cdll = <ctypes.LibraryLoader object at 0x7f75ed14e0d0> >validargs = ('device', 'host', 'libpath', 'port'), arg = 'libpath' >device = None, host = None, port = 8888, libpath = 'libmbus.so' > > def __init__(self, *args, **kwargs): > """ > Constructor for MBus class. > > possible arguments are > * device > * host > * libpath: path to libmbus (shared object or dll) > * port: default 8888 > """ > > import os > from ctypes import cdll > > # check all given arguments for validity > validargs = ('device','host','libpath','port') > for arg in kwargs.keys(): > if arg not in validargs: > raise TypeError("invalid argument") > > # set default values > device = None > host = None > port = 8888 > libpath = None > > if 'device' in kwargs.keys(): > device = kwargs['device'] > > if 'libpath' in kwargs.keys(): > libpath = kwargs['libpath'] > > if 'host' in kwargs.keys(): > host = kwargs['host'] > > if 'port' in kwargs.keys(): > if isinstance(kwargs['port'],int): > if 65535 <= kwargs['port']: > raise ValueError("port number too high") > if 0 > kwargs['port']: > raise ValueError("port number too low") > port = kwargs['port'] > else: > raise TypeError("port number not given as integer") > > if None == libpath: > libpath = "/usr/lib64/libmbus.so" > > self._libmbus = cdll.LoadLibrary(libpath) > > try: > self._libmbus.mbus_get_current_version() > except AttributeError: > raise OSError("libmbus not found") > > if (None != device) and (None != host): > raise BaseException("conflicting arguments 'device' and 'host' given") > > if (None == device) and (None == host): >> raise BaseException("Must provide either device or host keyword arguments") >E BaseException: Must provide either device or host keyword arguments > >mbus/MBus.py:76: BaseException >=========== 3 failed, 11 passed, 1 skipped, 1 error in 0.06 seconds ============
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 567418
:
418446
| 418814