[llvm] [test] Align behavior of interrupts.test on different platforms (PR #68556)

via llvm-commits llvm-commits at lists.llvm.org
Sun Oct 8 23:05:36 PDT 2023


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-llvm-support

<details>
<summary>Changes</summary>

The test llvm/Support/interrupts.test behaves differently on Linux and Windows. On Linux the function 'run_wrapper' runs process with stderr connected to pipe, while on Windows stderr is mapped to stderr of the running script.

When no output was made to stderr, this difference was not observable. The new version of llvm-symbolizer (https://reviews.llvm.org/D149759) complains about missing binary file, so stderr is not empty anymore and the test fails on Windows and passes on Linux.

With this change pipes are used on all operating systems.

---
Full diff: https://github.com/llvm/llvm-project/pull/68556.diff


1 Files Affected:

- (modified) llvm/test/Support/interrupts.test (+1-1) 


``````````diff
diff --git a/llvm/test/Support/interrupts.test b/llvm/test/Support/interrupts.test
index 86730f5139c042d..6e5dd5ea71f9b07 100644
--- a/llvm/test/Support/interrupts.test
+++ b/llvm/test/Support/interrupts.test
@@ -30,7 +30,7 @@ def run_wrapper():
         startupinfo = subprocess.STARTUPINFO()
         startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW
         proc = subprocess.Popen(args,
-                                stderr=sys.stderr,
+                                stderr=subprocess.PIPE,
                                 startupinfo=startupinfo,
                                 creationflags=subprocess.CREATE_NEW_CONSOLE)
     else:

``````````

</details>


https://github.com/llvm/llvm-project/pull/68556


More information about the llvm-commits mailing list