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_dwarf failures on s390x #105

Closed
davide125 opened this issue Jun 8, 2021 · 1 comment
Closed

test_dwarf failures on s390x #105

davide125 opened this issue Jun 8, 2021 · 1 comment

Comments

@davide125
Copy link
Contributor

While building 0.0.13 for s390x there are some new test failures:

=================================== FAILURES ===================================
___________________ TestObjects.test_variable_expr_op_deref ____________________
self = <tests.test_dwarf.TestObjects testMethod=test_variable_expr_op_deref>
    def test_variable_expr_op_deref(self):
        for bits in (64, 32):
            for little_endian in (True, False):
                with self.subTest(bits=bits, little_endian=little_endian):
>                   self._assert_dwarf_expr_eval(
                        [
                            assembler.U8(DW_OP.addr),
                            (assembler.U64 if bits == 64 else assembler.U32)(
                                0xFFFF0000
                            ),
                            assembler.U8(DW_OP.deref),
                        ],
                        0x12345678,
                        bits=bits,
                        little_endian=little_endian,
                        segments=[
                            MockMemorySegment(
                                (0x12345678).to_bytes(
                                    bits // 8, "little" if little_endian else "big"
                                ),
                                0xFFFF0000,
                            )
                        ],
                    )
tests/test_dwarf.py:4801: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_dwarf.py:4640: in _assert_dwarf_expr_eval
    self.assertEqual(self._eval_dwarf_expr(ops, **kwds), expected)
E   AssertionError: 4294901760 != 305419896
_________________ TestObjects.test_variable_expr_op_deref_size _________________
self = <tests.test_dwarf.TestObjects testMethod=test_variable_expr_op_deref_size>
    def test_variable_expr_op_deref_size(self):
        for bits in (64, 32):
            for little_endian in (True, False):
                with self.subTest(bits=bits, little_endian=little_endian):
>                   self._assert_dwarf_expr_eval(
                        [
                            assembler.U8(DW_OP.addr),
                            (assembler.U64 if bits == 64 else assembler.U32)(
                                0xFFFF0000
                            ),
                            assembler.U8(DW_OP.deref_size),
                            assembler.U8(2),
                        ],
                        0x1337,
                        bits=bits,
                        little_endian=little_endian,
                        segments=[
                            MockMemorySegment(
                                (0x1337).to_bytes(
                                    2, "little" if little_endian else "big"
                                ),
                                0xFFFF0000,
                            )
                        ],
                    )
tests/test_dwarf.py:4836: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_dwarf.py:4640: in _assert_dwarf_expr_eval
    self.assertEqual(self._eval_dwarf_expr(ops, **kwds), expected)
E   AssertionError: 0 != 4919
=========================== short test summary info ============================
FAILED tests/test_dwarf.py::TestObjects::test_variable_expr_op_deref - Assert...
FAILED tests/test_dwarf.py::TestObjects::test_variable_expr_op_deref_size - A...
================== 2 failed, 479 passed, 54 skipped in 2.34s ===================

See https://koji.fedoraproject.org/koji/taskinfo?taskID=69592358 for the full log.

@osandov
Copy link
Owner

osandov commented Jun 8, 2021

Thanks, I can reproduce this in my VM. It looks like it only affects big-endian hosts debugging little-endian core dumps, which should be a rare occurrence. I'll fix it up.

(This also shows that I need to get other architectures running in CI, but for now I'll add it to my release runbook to run tests in a VM before cutting a release.)

@osandov osandov closed this as completed in 82ca563 Jun 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants