This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Michael.Felt
Recipients Michael.Felt, martin.panter
Date 2016-09-27.19:17:34
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1475003854.42.0.995299330094.issue28276@psf.upfronthosting.co.za>
In-reply-to
Content
Actually, what may be needed are more "@skip" blocks - as ctypes has always been platform dependent.

OR - have a counter or boolean that starts as zero or false and increase each time find_library() returns a value - and the test fails if the counter is still zero, or boolean is still false.

Further, perhaps a separate test_load() that is platform specific - with the correct - read expected - result from find_library(). I say expected because python has always been testing for libc.so.6 while I see in cloud-init that that are calls hard-coded to CDLL("libc.so.7") - but maybe that is something specific for Canonical aka ubuntu.

However, it seems that expecting libc.so.6 to ALWAYS be present is not safe.

FYI:

michael@x071:[/data/prj/python/cloud-init]grep CDLL cloud-init-0*/cloudinit/*.py
cloud-init-0.7.5/cloudinit/util.py:            libc = ctypes.CDLL('/lib/libc.so.7')
cloud-init-0.7.8/cloudinit/util.py:            libc = ctypes.CDLL('/lib/libc.so.7')
History
Date User Action Args
2016-09-27 19:17:34Michael.Feltsetrecipients: + Michael.Felt, martin.panter
2016-09-27 19:17:34Michael.Feltsetmessageid: <1475003854.42.0.995299330094.issue28276@psf.upfronthosting.co.za>
2016-09-27 19:17:34Michael.Feltlinkissue28276 messages
2016-09-27 19:17:34Michael.Feltcreate