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
Date 2016-09-26.11:04:43
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1474887883.6.0.275550575314.issue28276@psf.upfronthosting.co.za>
In-reply-to
Content
in Lib/ctypes/test/test_loading.py there is the following test

    def test_find(self):
        for name in ("c", "m"):
            lib = find_library(name)
            if lib:
                cdll.LoadLibrary(lib)
                CDLL(lib)


1. on AIX, the test is "broken" because lib is None for both names because:
a1) find_library is basically broken for AIX (needs ldconfig, gcc, and/or other tools not generally available on AIX (production) servers
a2) "m" will always fail because there is no equivalent to libm.so - AIX libm.a only has static members - none are shared.
2. IMHO - the test is misnamed "test_find" - as None is an acceptable answer - which is why it 'appears' to PASS on AIX

As far as library names to look for I suggest switching "m" to "ssl" - as something that should be everywhere.

And the test should be something more like:

    self.assertEqual(lib not None)

OR is the test actually testing LoadLibrary and CDLL (as well)

Back to my humble opinion: assuming the real test is to test LoadLibrary and CDLL by accepting None as a valid result from find_library - false POSITIVE is the result when find_library() is not working.
History
Date User Action Args
2016-09-26 11:04:43Michael.Feltsetrecipients: + Michael.Felt
2016-09-26 11:04:43Michael.Feltsetmessageid: <1474887883.6.0.275550575314.issue28276@psf.upfronthosting.co.za>
2016-09-26 11:04:43Michael.Feltlinkissue28276 messages
2016-09-26 11:04:43Michael.Feltcreate