mlachwani / google-breakpad

Automatically exported from code.google.com/p/google-breakpad
0 stars 0 forks source link

ContextDeathTest.X86BadFlags unit test fails on Mac OS X #424

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. ./configure; make followed by make check or 
src/processor/synth_minidump_unittest

What is the expected output? What do you see instead?
Expected unittests to complete without errors. Instead the 
ContextDeathTest.X86BadFlags fails with the following output:

[ RUN      ] ContextDeathTest.X86BadFlags
src/processor/synth_minidump_unittest.cc:142: Failure
Death test: Context context(dump, raw);
    Result: died but not with expected error.
  Expected: context\.context_flags & 0x[0-9a-f]+
Actual msg: src/processor/synth_minidump.cc:129: failed assertion 
`context.context_flags & MD_CONTEXT_X86'

[  FAILED  ] ContextDeathTest.X86BadFlags (38 ms)

What version of the product are you using? On what operating system?
Trunk revision 782 on Mac OS X 10.6.6 using gcc 4.2.1.

Please provide any additional information below.
Suggested fix is to update the unit test from 

  ASSERT_DEATH(Context context(dump, raw);,
    "context\\.context_flags & 0x[0-9a-f]+");

to

  ASSERT_DEATH(Context context(dump, raw);,
        "context\\.context_flags & (0x[0-9a-f]+|[0-9a-zA-Z_]+)");

i.e. accept identifiers like "MD_CONTEXT_X86" in addition to hex flags in the 
assert.

Original issue reported on code.google.com by villinte...@gmail.com on 22 Mar 2011 at 1:49

GoogleCodeExporter commented 9 years ago
got the same problem on Mac OS X 10.6.7 using gcc 4.2.1

[ RUN      ] ContextDeathTest.X86BadFlags
src/processor/synth_minidump_unittest.cc:141: Failure
Death test: Context context(dump, raw);
    Result: died but not with expected error.
  Expected: context\.context_flags & 0x[0-9a-f]+
Actual msg: Assertion failed: (context.context_flags & MD_CONTEXT_X86), 
function Context, file src/processor/synth_minidump.cc, line 129.

[  FAILED  ] ContextDeathTest.X86BadFlags (42 ms)

Original comment by thierry....@gmail.com on 20 Apr 2011 at 9:45

GoogleCodeExporter commented 9 years ago
Fixed in r894.

Original comment by benc...@chromium.org on 16 Dec 2011 at 5:23