[Lldb-commits] [PATCH] D31357: Support Unit Testing debugserver

2017-04-12 Thread Phabricator via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL300111: Support Unit Testing debugserver (authored by cbieneman). Changed prior to commit: https://reviews.llvm.org/D31357?vs=94526=95036#toc Repository: rL LLVM https://reviews.llvm.org/D31357

[Lldb-commits] [PATCH] D31357: Support Unit Testing debugserver

2017-04-11 Thread Pavel Labath via Phabricator via lldb-commits
labath accepted this revision. labath added a comment. This revision is now accepted and ready to land. This is fine, as far as i am concerned. Comment at: tools/debugserver/source/CMakeLists.txt:117 +POST_BUILD +# Note: --entitlements option removed (see comment

[Lldb-commits] [PATCH] D31357: Support Unit Testing debugserver

2017-04-10 Thread Chris Bieneman via Phabricator via lldb-commits
beanz updated this revision to Diff 94526. beanz added a comment. Fixing variable naming conventions https://reviews.llvm.org/D31357 Files: tools/debugserver/source/CMakeLists.txt tools/debugserver/source/MacOSX/CMakeLists.txt unittests/CMakeLists.txt

[Lldb-commits] [PATCH] D31357: Support Unit Testing debugserver

2017-04-06 Thread Chris Bieneman via Phabricator via lldb-commits
beanz added a comment. I will fix up the naming conventions. Switching back and forth between LLVM and LLDB conventions has done a number on my brain. The test cases only abort on the child process side of the fork calls. This results in printing a stack trace, but it also will get captured as

[Lldb-commits] [PATCH] D31357: Support Unit Testing debugserver

2017-04-06 Thread Jim Ingham via Phabricator via lldb-commits
jingham added a comment. On the small points side: for lldb code we use lower-case, _ separated names for local variables, the point being that it allow you to tell at a glance what's a local and what's an ivar. Looks like you use a mixture of the two styles? exit_status, result, etc.

[Lldb-commits] [PATCH] D31357: Support Unit Testing debugserver

2017-04-06 Thread Chris Bieneman via Phabricator via lldb-commits
beanz added a reviewer: jingham. beanz added a comment. Adding Jim as a reviewer. Jim, with the added comment about debugserver being Darwin-only, are you happy with this patch? https://reviews.llvm.org/D31357 ___ lldb-commits mailing list

[Lldb-commits] [PATCH] D31357: Support Unit Testing debugserver

2017-04-06 Thread Chris Bieneman via Phabricator via lldb-commits
beanz updated this revision to Diff 94374. beanz added a comment. Some cleanup to the test case: - Auto-select a port, which will make this more reliable - Open listening sockets before the fork() so that the sockets are ready for connection (this avoids a race) - Put test logic into reusable

[Lldb-commits] [PATCH] D31357: Support Unit Testing debugserver

2017-03-28 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment. I am afraid I will be away for two weeks as well.. :( The FileLogCallback thingy seems a bit unfortunate, but I don't see anything too controversial based on a quick scan.. https://reviews.llvm.org/D31357 ___ lldb-commits

[Lldb-commits] [PATCH] D31357: Support Unit Testing debugserver

2017-03-27 Thread Jim Ingham via Phabricator via lldb-commits
jingham added a comment. debugserver only runs on darwin and we have no intentions of using it elsewhere. lldb-server is the way to do debugserver for new platforms. I don't think you need the generality provided by host to test debugserver, OTOH, if using those classes saves you lots of

[Lldb-commits] [PATCH] D31357: Support Unit Testing debugserver

2017-03-27 Thread Chris Bieneman via Phabricator via lldb-commits
beanz added a comment. @jingham I put the unit tests at the top because they depend on LLDB's Host library (at least the current tests do). I'm attempting to write tests which cover the socket communication between LLDB and debugserver by sending data between the two using each side of the

[Lldb-commits] [PATCH] D31357: Support Unit Testing debugserver

2017-03-27 Thread Jim Ingham via Phabricator via lldb-commits
jingham added a comment. It's a little weird to have the unit tests for debugserver in the top-level lldb directory. debugserver really is a stand-alone tool that shares no code with lldb proper. How hard would it be to put the tests under debugserver? https://reviews.llvm.org/D31357

[Lldb-commits] [PATCH] D31357: Support Unit Testing debugserver

2017-03-27 Thread Chris Bieneman via Phabricator via lldb-commits
beanz updated this revision to Diff 93165. beanz added a comment. Fleshed out the unit test logic to be more meaningful. https://reviews.llvm.org/D31357 Files: tools/debugserver/source/CMakeLists.txt tools/debugserver/source/MacOSX/CMakeLists.txt unittests/CMakeLists.txt

Re: [Lldb-commits] [PATCH] D31357: Support Unit Testing debugserver

2017-03-24 Thread Zachary Turner via lldb-commits
I'm ooo for ~2 weeks so I can't really do code reviews unfortunately On Sat, Mar 25, 2017 at 6:23 AM Chris Bieneman via Phabricator < revi...@reviews.llvm.org> wrote: > beanz added a comment. > > Xcode is pretty magic to me. I don't know how to do much of anything in it > other than build. I

[Lldb-commits] [PATCH] D31357: Support Unit Testing debugserver

2017-03-24 Thread Chris Bieneman via Phabricator via lldb-commits
beanz added a comment. Xcode is pretty magic to me. I don't know how to do much of anything in it other than build. I think the right solution would be to take most of the source files out of the debugserver target and generate a static archive from them, then have debugserver and the

[Lldb-commits] [PATCH] D31357: Support Unit Testing debugserver

2017-03-24 Thread Jim Ingham via Phabricator via lldb-commits
jingham added a comment. Todd added a gtest target to the lldb.xcodeproj. Presumably you could use that as a template and do the same thing in the tools/debugserver.xcproj. Then make an aggregate target in the lldb workspace that runs these two targets. https://reviews.llvm.org/D31357

[Lldb-commits] [PATCH] D31357: Support Unit Testing debugserver

2017-03-24 Thread Chris Bieneman via Phabricator via lldb-commits
beanz created this revision. Herald added a subscriber: mgorny. This patch refactors the CMake build system's support for building debugserver to allow us to build the majority of debugserver's sources into the debugserverCommon library which can then be reused by unit tests. The first unit