[Lldb-commits] [PATCH] D70363: [lldb] [test] Fix lldb-server/thread-name test code for NetBSD

Michał Górny via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Sun Nov 17 13:08:51 PST 2019


mgorny created this revision.
mgorny added reviewers: krytarowski, labath.
Herald added a subscriber: jfb.

Fix incorrect type passed to pthread_setname_np() on NetBSD.  This fixes
the test to build fine but the underlying function is still not
implemented.


https://reviews.llvm.org/D70363

Files:
  lldb/packages/Python/lldbsuite/test/tools/lldb-server/thread-name/TestGdbRemoteThreadName.py
  lldb/packages/Python/lldbsuite/test/tools/lldb-server/thread-name/main.cpp


Index: lldb/packages/Python/lldbsuite/test/tools/lldb-server/thread-name/main.cpp
===================================================================
--- lldb/packages/Python/lldbsuite/test/tools/lldb-server/thread-name/main.cpp
+++ lldb/packages/Python/lldbsuite/test/tools/lldb-server/thread-name/main.cpp
@@ -9,7 +9,7 @@
 #elif defined(__linux__)
   ::pthread_setname_np(::pthread_self(), name);
 #elif defined(__NetBSD__)
-  ::pthread_setname_np(::pthread_self(), "%s", name);
+  ::pthread_setname_np(::pthread_self(), "%s", static_cast<void*>(name));
 #endif
 }
 
Index: lldb/packages/Python/lldbsuite/test/tools/lldb-server/thread-name/TestGdbRemoteThreadName.py
===================================================================
--- lldb/packages/Python/lldbsuite/test/tools/lldb-server/thread-name/TestGdbRemoteThreadName.py
+++ lldb/packages/Python/lldbsuite/test/tools/lldb-server/thread-name/TestGdbRemoteThreadName.py
@@ -30,7 +30,7 @@
         self.assertEqual(expected_name, kv_dict.get("name"))
 
     @skipIfWindows # the test is not updated for Windows.
-    @skipIfNetBSD # build failure due to pthread_setname_np prototype
+    @expectedFailureNetBSD
     @llgs_test
     def test(self):
         """ Make sure lldb-server can retrieve inferior thread name"""


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D70363.229728.patch
Type: text/x-patch
Size: 1280 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20191117/6e4fa7fb/attachment.bin>


More information about the lldb-commits mailing list