Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test_ctypes failure on AIX 5.3 #51906

Closed
mallayya mannequin opened this issue Jan 8, 2010 · 2 comments
Closed

test_ctypes failure on AIX 5.3 #51906

mallayya mannequin opened this issue Jan 8, 2010 · 2 comments
Assignees
Labels
topic-ctypes type-bug An unexpected behavior, bug, or error

Comments

@mallayya
Copy link
Mannequin

mallayya mannequin commented Jan 8, 2010

BPO 7657
Nosy @theller
Files
  • ctype-tests.txt: test cases result
  • bitfield.patch
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/theller'
    closed_at = <Date 2010-01-12.08:50:54.121>
    created_at = <Date 2010-01-08.07:02:32.042>
    labels = ['ctypes', 'type-bug']
    title = 'test_ctypes failure on AIX 5.3'
    updated_at = <Date 2010-09-14.13:07:11.954>
    user = 'https://bugs.python.org/mallayya'

    bugs.python.org fields:

    activity = <Date 2010-09-14.13:07:11.954>
    actor = 'sable'
    assignee = 'theller'
    closed = True
    closed_date = <Date 2010-01-12.08:50:54.121>
    closer = 'mallayya'
    components = ['ctypes']
    creation = <Date 2010-01-08.07:02:32.042>
    creator = 'mallayya'
    dependencies = []
    files = ['15784', '15791']
    hgrepos = []
    issue_num = 7657
    keywords = ['patch']
    message_count = 2.0
    messages = ['97395', '97625']
    nosy_count = 3.0
    nosy_names = ['theller', 'sable', 'mallayya']
    pr_nums = []
    priority = 'normal'
    resolution = None
    stage = 'needs patch'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue7657'
    versions = ['Python 2.6']

    @mallayya
    Copy link
    Mannequin Author

    mallayya mannequin commented Jan 8, 2010

    I built the python-2.6.2 with the latest libffi-3.0.9 in AIX 5.3 using xlc compiler.
    When i try to run the ctypes test cases, two failures are seen in test_bitfields.

    test_ints (ctypes.test.test_bitfields.C_Test) ... FAIL
    test_shorts (ctypes.test.test_bitfields.C_Test) ... FAIL

    It seems that interpreting type c_int and c_short is wrong in bit field for AIX. If i change the type c_int and c_short
    to c_unit and c_ushort of class "BITS(Structure)" in file test_bitfields.py then no failures are seen and all the test
    cases got passed

    This issue is common for both 32 and 64-bit versions

    Attaching the complete test case result for reference.

    @mallayya mallayya mannequin assigned theller Jan 8, 2010
    @mallayya mallayya mannequin added topic-ctypes type-bug An unexpected behavior, bug, or error labels Jan 8, 2010
    @mallayya
    Copy link
    Mannequin Author

    mallayya mannequin commented Jan 12, 2010

    These failures are specific to xlc compiler
    In xlc signed bit fields will be mapped to unsigned by default as opposed to gcc where the value stored in the bit field is of type declared.
    so the the value returned by "func(byref(b), name)" positive in some cases as it expected to be of type declared.

    Their is an xlc compiler option "-qbitfields=signed" to make the bit fields of type signed.
    After this all the ctypes test cases got passed.

    @mallayya mallayya mannequin closed this as completed Jan 12, 2010
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    topic-ctypes type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant