diff options
| author | NotRexed <therealnothingfn@gmail.com> | 2026-11-26 00:05:14 -0500 |
|---|---|---|
| committer | NotRexed <therealnothingfn@gmail.com> | 2026-11-26 00:05:14 -0500 |
| commit | 3cd850d18d819a5c75b00aa00c78de59cc34da99 (patch) | |
| tree | 2315b7a20a8487783491d1075f33db42bbea27ca /runtime/test/loader_test.cpp | |
| parent | 07bb65111b5067063f1d7a0375822ccbbb1dfd77 (diff) | |
loader_test: no Bad Image dialogs for the images it loads to be refused
SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX | SEM_NOOPENFILEERRORBOX) at start: the
deliberately broken compat_bad\testcompat.dll (0xc000012f) showed a dialog on the desktop per load.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'runtime/test/loader_test.cpp')
| -rw-r--r-- | runtime/test/loader_test.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/runtime/test/loader_test.cpp b/runtime/test/loader_test.cpp index a925fa021..3f68604c9 100644 --- a/runtime/test/loader_test.cpp +++ b/runtime/test/loader_test.cpp | |||
| @@ -1427,6 +1427,9 @@ void test_compat_modules() { | |||
| 1427 | } // namespace | 1427 | } // namespace |
| 1428 | 1428 | ||
| 1429 | int main() { | 1429 | int main() { |
| 1430 | // The test loads images Windows refuses on purpose (compat_bad\testcompat.dll, 0xc000012f). Without this the | ||
| 1431 | // loader's hard-error path shows a "Bad Image" dialog for each one on the desktop of whoever runs the suite. | ||
| 1432 | SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX | SEM_NOOPENFILEERRORBOX); | ||
| 1430 | g_dir = work_dir(); | 1433 | g_dir = work_dir(); |
| 1431 | std::error_code ec; | 1434 | std::error_code ec; |
| 1432 | std::filesystem::remove_all(g_dir, ec); | 1435 | std::filesystem::remove_all(g_dir, ec); |