[Lldb-commits] [lldb] [lldb] Fixed the TestFdLeak test (PR #92273)

via lldb-commits lldb-commits at lists.llvm.org
Wed May 15 07:40:27 PDT 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-lldb

Author: Dmitry Vasilyev (slydiman)

<details>
<summary>Changes</summary>

Use `NUL` instead of `/dev/null` in case of the Windows host.

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


1 Files Affected:

- (modified) lldb/test/API/functionalities/avoids-fd-leak/TestFdLeak.py (+4-1) 


``````````diff
diff --git a/lldb/test/API/functionalities/avoids-fd-leak/TestFdLeak.py b/lldb/test/API/functionalities/avoids-fd-leak/TestFdLeak.py
index e4f5cd3a03f86..e292885ec390d 100644
--- a/lldb/test/API/functionalities/avoids-fd-leak/TestFdLeak.py
+++ b/lldb/test/API/functionalities/avoids-fd-leak/TestFdLeak.py
@@ -26,7 +26,10 @@ def test_fd_leak_basic(self):
     @skipIfTargetAndroid()  # Android have some other file descriptors open by the shell
     @skipIfDarwinEmbedded  # <rdar://problem/33888742>  # debugserver on ios has an extra fd open on launch
     def test_fd_leak_log(self):
-        self.do_test(["log enable -f '/dev/null' lldb commands"])
+        if lldbplatformutil.getHostPlatform() == "windows":
+            self.do_test(["log enable -f 'NUL' lldb commands"])
+        else:
+            self.do_test(["log enable -f '/dev/null' lldb commands"])
 
     def do_test(self, commands):
         self.build()

``````````

</details>


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


More information about the lldb-commits mailing list