Skip to content

Disable parts of tests that fail on MinGW - #28

Merged
slipher merged 2 commits into
DaemonEngine:masterfrom
slipher:mingw-test
Jul 27, 2026
Merged

Disable parts of tests that fail on MinGW#28
slipher merged 2 commits into
DaemonEngine:masterfrom
slipher:mingw-test

Conversation

@slipher

@slipher slipher commented Jul 27, 2026

Copy link
Copy Markdown
Member

So that all tests pass.


namespace {

// It seems a few bells and whistles aren't availble with MinGW.

@illwieckz illwieckz Jul 27, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

- availble
+ available

@illwieckz

Copy link
Copy Markdown
Member

I rebased this over my wine-check branch (containing the bits from my nuke-gyp branch) and I got this on Windows 11:

C:\Users\illwieckz>client_tests.exe
Running main() from src/testing/googletest/src/gtest_main.cc
[==========] Running 32 tests from 7 test suites.
[----------] Global test environment set-up.
[----------] 6 tests from ExceptionHandlerDeathTest
[ RUN      ] ExceptionHandlerDeathTest.InProcTest
Running main() from src/testing/googletest/src/gtest_main.cc
[       OK ] ExceptionHandlerDeathTest.InProcTest (58 ms)
[ RUN      ] ExceptionHandlerDeathTest.OutOfProcTest
Running main() from src/testing/googletest/src/gtest_main.cc
[       OK ] ExceptionHandlerDeathTest.OutOfProcTest (51 ms)
[ RUN      ] ExceptionHandlerDeathTest.OutOfProcGuaranteedTest
Running main() from src/testing/googletest/src/gtest_main.cc
[       OK ] ExceptionHandlerDeathTest.OutOfProcGuaranteedTest (58 ms)
[ RUN      ] ExceptionHandlerDeathTest.InstructionPointerMemory
Running main() from src/testing/googletest/src/gtest_main.cc
2026-07-27 13:57:27: minidump.cc:5137: INFO: Minidump opened minidump C:\msys64\tmp\InstructionPointerMemory\c96bece6-96ee-4424-ab25-e4791d1c3b5b.dmp
2026-07-27 13:57:27: minidump.cc:5267: INFO: Minidump not byte-swapping minidump
2026-07-27 13:57:27: minidump.cc:474: INFO: MinidumpContext: looks like AMD64 context
2026-07-27 13:57:27: minidump.cc:5109: INFO: Minidump closing minidump
[       OK ] ExceptionHandlerDeathTest.InstructionPointerMemory (50 ms)
[ RUN      ] ExceptionHandlerDeathTest.InstructionPointerMemoryMinBound
Running main() from src/testing/googletest/src/gtest_main.cc
2026-07-27 13:57:27: minidump.cc:5137: INFO: Minidump opened minidump C:\msys64\tmp\InstructionPointerMemoryMinBound\062deffb-f9d8-4ab7-be5d-6568b6e9e4b3.dmp
2026-07-27 13:57:27: minidump.cc:5267: INFO: Minidump not byte-swapping minidump
2026-07-27 13:57:27: minidump.cc:474: INFO: MinidumpContext: looks like AMD64 context
2026-07-27 13:57:27: minidump.cc:5109: INFO: Minidump closing minidump
[       OK ] ExceptionHandlerDeathTest.InstructionPointerMemoryMinBound (52 ms)
[ RUN      ] ExceptionHandlerDeathTest.InstructionPointerMemoryMaxBound
Running main() from src/testing/googletest/src/gtest_main.cc
2026-07-27 13:57:28: minidump.cc:5137: INFO: Minidump opened minidump C:\msys64\tmp\InstructionPointerMemoryMaxBound\9ed1e115-5efc-4f3c-bd29-868bc6c887f0.dmp
2026-07-27 13:57:28: minidump.cc:5267: INFO: Minidump not byte-swapping minidump
2026-07-27 13:57:28: minidump.cc:474: INFO: MinidumpContext: looks like AMD64 context
2026-07-27 13:57:28: minidump.cc:5109: INFO: Minidump closing minidump
[       OK ] ExceptionHandlerDeathTest.InstructionPointerMemoryMaxBound (50 ms)
[----------] 6 tests from ExceptionHandlerDeathTest (340 ms total)

[----------] 7 tests from CrashGenerationServerTest
[ RUN      ] CrashGenerationServerTest.PingServerTest
[       OK ] CrashGenerationServerTest.PingServerTest (1 ms)
[ RUN      ] CrashGenerationServerTest.InvalidRegistration
[       OK ] CrashGenerationServerTest.InvalidRegistration (0 ms)
[ RUN      ] CrashGenerationServerTest.TruncateRegistration
[       OK ] CrashGenerationServerTest.TruncateRegistration (0 ms)
[ RUN      ] CrashGenerationServerTest.CloseAfterRegistration
[       OK ] CrashGenerationServerTest.CloseAfterRegistration (1 ms)
[ RUN      ] CrashGenerationServerTest.ResponseBufferTooSmall
[       OK ] CrashGenerationServerTest.ResponseBufferTooSmall (1 ms)
[ RUN      ] CrashGenerationServerTest.CloseAfterResponse
[       OK ] CrashGenerationServerTest.CloseAfterResponse (1 ms)
[ RUN      ] CrashGenerationServerTest.SendInvalidAck
[       OK ] CrashGenerationServerTest.SendInvalidAck (1 ms)
[----------] 7 tests from CrashGenerationServerTest (28 ms total)

[----------] 5 tests from MinidumpTest
[ RUN      ] MinidumpTest.Version
[       OK ] MinidumpTest.Version (4 ms)
[ RUN      ] MinidumpTest.Normal
src/client/windows/unittests/minidump_test.cc:203: Failure
Value of: mini.HasStream(FunctionTableStream)
  Actual: true
Expected: false
[  FAILED  ] MinidumpTest.Normal (40 ms)
[ RUN      ] MinidumpTest.SmallDump
src/client/windows/unittests/minidump_test.cc:239: Failure
Value of: mini.HasStream(FunctionTableStream)
  Actual: true
Expected: false
[  FAILED  ] MinidumpTest.SmallDump (43 ms)
[ RUN      ] MinidumpTest.LargerDump
src/client/windows/unittests/minidump_test.cc:274: Failure
Value of: mini.HasStream(FunctionTableStream)
  Actual: true
Expected: false
[  FAILED  ] MinidumpTest.LargerDump (44 ms)
[ RUN      ] MinidumpTest.FullDump
src/client/windows/unittests/minidump_test.cc:327: Failure
Value of: mini.HasStream(FunctionTableStream)
  Actual: true
Expected: false
src/client/windows/unittests/minidump_test.cc:328: Failure
Value of: full.HasStream(FunctionTableStream)
  Actual: true
Expected: false
[  FAILED  ] MinidumpTest.FullDump (123 ms)
[----------] 5 tests from MinidumpTest (268 ms total)

[----------] 2 tests from AssertDeathSanity
[ RUN      ] AssertDeathSanity.Simple
Running main() from src/testing/googletest/src/gtest_main.cc
[       OK ] AssertDeathSanity.Simple (14 ms)
[ RUN      ] AssertDeathSanity.Regex
Running main() from src/testing/googletest/src/gtest_main.cc
Running main() from src/testing/googletest/src/gtest_main.cc
[       OK ] AssertDeathSanity.Regex (27 ms)
[----------] 2 tests from AssertDeathSanity (46 ms total)

[----------] 6 tests from ExceptionHandlerCallbacks
[ RUN      ] ExceptionHandlerCallbacks.FilterTrue_No_Callback
Running main() from src/testing/googletest/src/gtest_main.cc
[       OK ] ExceptionHandlerCallbacks.FilterTrue_No_Callback (52 ms)
[ RUN      ] ExceptionHandlerCallbacks.FilterTrue_Callback
Running main() from src/testing/googletest/src/gtest_main.cc
[       OK ] ExceptionHandlerCallbacks.FilterTrue_Callback (51 ms)
[ RUN      ] ExceptionHandlerCallbacks.FilterFalse_No_Callback
Running main() from src/testing/googletest/src/gtest_main.cc
[       OK ] ExceptionHandlerCallbacks.FilterFalse_No_Callback (22 ms)
[ RUN      ] ExceptionHandlerCallbacks.FilterFalse_Callback
Running main() from src/testing/googletest/src/gtest_main.cc
[       OK ] ExceptionHandlerCallbacks.FilterFalse_Callback (15 ms)
[ RUN      ] ExceptionHandlerCallbacks.No_Filter_No_Callback
Running main() from src/testing/googletest/src/gtest_main.cc
[       OK ] ExceptionHandlerCallbacks.No_Filter_No_Callback (44 ms)
[ RUN      ] ExceptionHandlerCallbacks.No_Filter_Callback
Running main() from src/testing/googletest/src/gtest_main.cc
[       OK ] ExceptionHandlerCallbacks.No_Filter_Callback (51 ms)
[----------] 6 tests from ExceptionHandlerCallbacks (258 ms total)

[----------] 3 tests from ExceptionHandlerNesting
[ RUN      ] ExceptionHandlerNesting.Skip_From_Inner_Filter
Running main() from src/testing/googletest/src/gtest_main.cc
[       OK ] ExceptionHandlerNesting.Skip_From_Inner_Filter (50 ms)
[ RUN      ] ExceptionHandlerNesting.Skip_From_Inner_Callback
Running main() from src/testing/googletest/src/gtest_main.cc
[       OK ] ExceptionHandlerNesting.Skip_From_Inner_Callback (78 ms)
[ RUN      ] ExceptionHandlerNesting.Handled_By_Inner_Handler
Running main() from src/testing/googletest/src/gtest_main.cc
[       OK ] ExceptionHandlerNesting.Handled_By_Inner_Handler (50 ms)
[----------] 3 tests from ExceptionHandlerNesting (190 ms total)

[----------] 3 tests from ExceptionHandlerTest
[ RUN      ] ExceptionHandlerTest.WriteMinidumpTest
2026-07-27 13:57:28: minidump.cc:5137: INFO: Minidump opened minidump C:\msys64\tmp\WriteMinidumpTest\b5e54a28-22ee-404d-9e1f-36fcc196f0ab.dmp
2026-07-27 13:57:28: minidump.cc:5267: INFO: Minidump not byte-swapping minidump
2026-07-27 13:57:28: minidump.cc:5109: INFO: Minidump closing minidump
[       OK ] ExceptionHandlerTest.WriteMinidumpTest (37 ms)
[ RUN      ] ExceptionHandlerTest.AdditionalMemory
2026-07-27 13:57:28: minidump.cc:5137: INFO: Minidump opened minidump C:\msys64\tmp\AdditionalMemory\cdc63bb9-4a36-4434-9f83-441554d74b2b.dmp
2026-07-27 13:57:28: minidump.cc:5267: INFO: Minidump not byte-swapping minidump
2026-07-27 13:57:28: minidump.cc:5109: INFO: Minidump closing minidump
[       OK ] ExceptionHandlerTest.AdditionalMemory (39 ms)
[ RUN      ] ExceptionHandlerTest.AdditionalMemoryRemove
2026-07-27 13:57:28: minidump.cc:5137: INFO: Minidump opened minidump C:\msys64\tmp\AdditionalMemoryRemove\bf5e3ea5-1b8a-438a-874d-ff0a623a82a7.dmp
2026-07-27 13:57:28: minidump.cc:5267: INFO: Minidump not byte-swapping minidump
2026-07-27 13:57:28: minidump.cc:3166: INFO: MinidumpMemoryList has no memory region at 0x1bc140e8fa0
2026-07-27 13:57:28: minidump.cc:5109: INFO: Minidump closing minidump
[       OK ] ExceptionHandlerTest.AdditionalMemoryRemove (40 ms)
[----------] 3 tests from ExceptionHandlerTest (125 ms total)

[----------] Global test environment tear-down
[==========] 32 tests from 7 test suites ran. (1284 ms total)
[  PASSED  ] 28 tests.
[  FAILED  ] 4 tests, listed below:
[  FAILED  ] MinidumpTest.Normal
[  FAILED  ] MinidumpTest.SmallDump
[  FAILED  ] MinidumpTest.LargerDump
[  FAILED  ] MinidumpTest.FullDump

 4 FAILED TESTS

That's a progress anyway!

@illwieckz

illwieckz commented Jul 27, 2026

Copy link
Copy Markdown
Member

Just for knowledge, here is the status on Wine, but that may be Wine limitations (we may send them the test so they can use it to track down differences with Windows):

[0;32m[----------] [mGlobal test environment tear-down
[0;32m[==========] [m32 tests from 7 test suites ran. (77726 ms total)
[0;32m[  PASSED  ] [m17 tests.
[0;31m[  FAILED  ] [m15 tests, listed below:
[0;31m[  FAILED  ] [mExceptionHandlerDeathTest.InstructionPointerMemory
[0;31m[  FAILED  ] [mExceptionHandlerDeathTest.InstructionPointerMemoryMinBound
[0;31m[  FAILED  ] [mExceptionHandlerDeathTest.InstructionPointerMemoryMaxBound
[0;31m[  FAILED  ] [mCrashGenerationServerTest.PingServerTest
[0;31m[  FAILED  ] [mMinidumpTest.SmallDump
[0;31m[  FAILED  ] [mMinidumpTest.LargerDump
[0;31m[  FAILED  ] [mMinidumpTest.FullDump
[0;31m[  FAILED  ] [mExceptionHandlerCallbacks.FilterTrue_Callback
[0;31m[  FAILED  ] [mExceptionHandlerCallbacks.FilterFalse_No_Callback
[0;31m[  FAILED  ] [mExceptionHandlerCallbacks.FilterFalse_Callback
[0;31m[  FAILED  ] [mExceptionHandlerCallbacks.No_Filter_Callback
[0;31m[  FAILED  ] [mExceptionHandlerNesting.Skip_From_Inner_Filter
[0;31m[  FAILED  ] [mExceptionHandlerNesting.Skip_From_Inner_Callback
[0;31m[  FAILED  ] [mExceptionHandlerTest.AdditionalMemory
[0;31m[  FAILED  ] [mExceptionHandlerTest.AdditionalMemoryRemove

15 FAILED TESTS

This is also a progress since it went from 17 failed tests to 15 (I'm aware that lest test are running 🫣️).

@illwieckz illwieckz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM if:

  • the comment typo is fixed
  • the remaining fails aren't regressions introduced by this

@illwieckz

illwieckz commented Jul 27, 2026

Copy link
Copy Markdown
Member

Hmm, I just noticed that MinidumpTest.Normal passes on Wine but not on real Windows.

I just tested a non-static build of client_tests.exe, also removed the -fexceptions flag, and this didn't change the outcome of this branch (hence the remaining fails are not regressions from these different builds).

@illwieckz

Copy link
Copy Markdown
Member

I wouldn't exclude the remaining fails may be related to the MinGW version I'm using (13.2.0).

@illwieckz

illwieckz commented Jul 27, 2026

Copy link
Copy Markdown
Member

I did more runs, here with a more recent MinGW (14.2.0 from Debian Trixie) and some more recent Wine, dynamic link:

Wine 10.0:

[0;32m[----------] [mGlobal test environment tear-down
[0;32m[==========] [m32 tests from 7 test suites ran. (17148 ms total)
[0;32m[  PASSED  ] [m24 tests.
[0;31m[  FAILED  ] [m8 tests, listed below:
[0;31m[  FAILED  ] [mExceptionHandlerDeathTest.InstructionPointerMemory
[0;31m[  FAILED  ] [mExceptionHandlerDeathTest.InstructionPointerMemoryMinBound
[0;31m[  FAILED  ] [mExceptionHandlerDeathTest.InstructionPointerMemoryMaxBound
[0;31m[  FAILED  ] [mMinidumpTest.SmallDump
[0;31m[  FAILED  ] [mMinidumpTest.LargerDump
[0;31m[  FAILED  ] [mMinidumpTest.FullDump
[0;31m[  FAILED  ] [mExceptionHandlerTest.AdditionalMemory
[0;31m[  FAILED  ] [mExceptionHandlerTest.AdditionalMemoryRemove

 8 FAILED TESTS

Wine 11.13:

[0;32m[----------] [mGlobal test environment tear-down
[0;32m[==========] [m32 tests from 7 test suites ran. (7841 ms total)
[0;32m[  PASSED  ] [m24 tests.
[0;31m[  FAILED  ] [m8 tests, listed below:
[0;31m[  FAILED  ] [mExceptionHandlerDeathTest.InstructionPointerMemory
[0;31m[  FAILED  ] [mExceptionHandlerDeathTest.InstructionPointerMemoryMinBound
[0;31m[  FAILED  ] [mExceptionHandlerDeathTest.InstructionPointerMemoryMaxBound
[0;31m[  FAILED  ] [mMinidumpTest.SmallDump
[0;31m[  FAILED  ] [mMinidumpTest.LargerDump
[0;31m[  FAILED  ] [mMinidumpTest.FullDump
[0;31m[  FAILED  ] [mExceptionHandlerTest.AdditionalMemory
[0;31m[  FAILED  ] [mExceptionHandlerTest.AdditionalMemoryRemove

 8 FAILED TESTS

Windows 11:

[----------] Global test environment tear-down
[==========] 32 tests from 7 test suites ran. (1315 ms total)
[  PASSED  ] 28 tests.
[  FAILED  ] 4 tests, listed below:
[  FAILED  ] MinidumpTest.Normal
[  FAILED  ] MinidumpTest.SmallDump
[  FAILED  ] MinidumpTest.LargerDump
[  FAILED  ] MinidumpTest.FullDump

 4 FAILED TESTS

So a newer MinGW helped on Wine, but not on Windows (at least up to MinGW 14.2.0).

@slipher

slipher commented Jul 27, 2026

Copy link
Copy Markdown
Member Author

I developed this against #24 excluding the -fexceptions commit. With those commits plus this PR, on the 64-bit/posix threads/SEH/MSVCRT flavored toolchain from MSYS2, running on Windows 11 is my environment where everything passes.

@slipher
slipher merged commit af533fc into DaemonEngine:master Jul 27, 2026
@slipher
slipher deleted the mingw-test branch July 27, 2026 23:19
@illwieckz

Copy link
Copy Markdown
Member

I developed this against #24 excluding the -fexceptions commit. With those commits plus this PR, on the 64-bit/posix threads/SEH/MSVCRT flavored toolchain from MSYS2, running on Windows 11 is my environment where everything passes.

Nice! So it's basically a matter of MinGW updates to get everything passing on Windows!

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

Successfully merging this pull request may close these issues.

2 participants