[Lldb-commits] [PATCH] D32930: New framework for lldb client-server communication tests.

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu May 25 03:04:28 PDT 2017

labath added a comment.

Getting really close now. However, the debug trap issue is still not resolved. And we still have to figure out how to make sure the tests don't blow up on platforms that don't support debugging via lldb-server (i.e., anything except linux, android, netbsd). One option would be to just disable the inclusion of the whole subfolder at cmake level. Another is to stop gtest from running them by prefixing their names with DISABLED_. The usual solution for that is to define a helper macro like

  #if defined(__linux__) || defined(__NetBSD__)
  #define LLGS_TEST(x) x
  #define LLGS_TEST(x) DISABLED_ ## x

I'd tend towards the cmake option.

Comment at: unittests/tools/lldb-server/inferior/thread_inferior.cpp:32
+  delay.store(false);
The debug trap issue is not resolved yet, as it evaluates to nothing on gcc. I believe the consensus was to go with null pointer dereference, at least for now. I am not sure how good of an idea is to use llvm headers in the test inferiors, but we can use LLVM_BUILTIN_TRAP macro for that purpose, at least until it starts causing us problems.

Comment at: unittests/tools/lldb-server/tests/TestClient.cpp:240
+  struct stat info;
+  if (stat(log_directory, &info) != 0 || !(info.st_mode & S_IFDIR)) {
+    GTEST_LOG_(WARNING) << "Cannot access log directory: " << log_directory;
this is very posix-y. Please use `llvm::sys::fs::is_directory` instead. (I may not have gotten the namespace right).


More information about the lldb-commits mailing list