- 
                Notifications
    You must be signed in to change notification settings 
- Fork 13.9k
          compiletest: suppress Windows Error Reporting (WER) for run-make tests
          #132093
        
          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
          
     Merged
      
      
    Conversation
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
    | rustbot has assigned @albertlarsan68. Use  | 
| @bors r+ | 
    
  bors 
      added a commit
        to rust-lang-ci/rust
      that referenced
      this pull request
    
      Oct 25, 2024 
    
    
      
  
    
      
    
  
…kingjubilee Rollup of 6 pull requests Successful merges: - rust-lang#131851 ([musl] use posix_spawn if a directory change was requested) - rust-lang#132048 (AIX: use /dev/urandom for random implementation ) - rust-lang#132093 (compiletest: suppress Windows Error Reporting (WER) for `run-make` tests) - rust-lang#132101 (Avoid using imports in thread_local_inner! in static) - rust-lang#132113 (Provide a default impl for Pattern::as_utf8_pattern) - rust-lang#132115 (rustdoc: Extend fake_variadic to "wrapped" tuples) r? `@ghost` `@rustbot` modify labels: rollup
    
  rust-timer 
      added a commit
        to rust-lang-ci/rust
      that referenced
      this pull request
    
      Oct 25, 2024 
    
    
      
  
    
      
    
  
Rollup merge of rust-lang#132093 - jieyouxu:suppress-wer, r=onur-ozkan compiletest: suppress Windows Error Reporting (WER) for `run-make` tests WER by default will show a *bunch* of error dialogues for missing DLLs on Windows for `run-make` tests. We address that by: 1. Guarding `run-make` test process spawning with `disable_error_reporting`. 2. Fixing `disable_error_reporting` to also add the [`SEM_FAILCRITICALERRORS` flag to `SetErrorMode`][SetErrorMode]. Just `SEM_NOGPFAULTERRORBOX` was not sufficient to suppress error dialogues for e.g. missing DLLs. Fixes rust-lang#132092. In particular, refer to that issue for the necessary conditions to observe these dialogues from popping up in the first place. I was only able to manually test this locally in my "native" Windows msvc environment and it prevents the WER dialogues from popping up, I don't think it's possible to really test this automatically. [SetErrorMode]: https://learn.microsoft.com/en-us/windows/win32/api/errhandlingapi/nf-errhandlingapi-seterrormode?redirectedfrom=MSDN#parameters
| @bors r- (bors pls stop trying to merge what you just merged) | 
| @bors r- retry (stop, really) | 
| @bors r- | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
      Labels
      
    A-compiletest
  Area: The compiletest test runner 
  
    A-testsuite
  Area: The testsuite used to check the correctness of rustc 
  
    merged-by-bors
  This PR was explicitly merged by bors. 
  
    O-windows-msvc
  Toolchain: MSVC, Operating system: Windows 
  
    T-bootstrap
  Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) 
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
WER by default will show a bunch of error dialogues for missing DLLs on Windows for
run-maketests. We address that by:run-maketest process spawning withdisable_error_reporting.disable_error_reportingto also add theSEM_FAILCRITICALERRORSflag toSetErrorMode. JustSEM_NOGPFAULTERRORBOXwas not sufficient to suppress error dialogues for e.g. missing DLLs.Fixes #132092. In particular, refer to that issue for the necessary conditions to observe these dialogues from popping up in the first place.
I was only able to manually test this locally in my "native" Windows msvc environment and it prevents the WER dialogues from popping up, I don't think it's possible to really test this automatically.