summaryrefslogtreecommitdiffstats
path: root/lldb/unittests/Host/SocketAddressTest.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [lldb] Add a SubsystemRAII that takes care of calling Initialize and ↵Raphael Isemann2019-12-231-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Terminate in the unit tests Summary: Many of our tests need to initialize certain subsystems/plugins of LLDB such as `FileSystem` or `HostInfo` by calling their static `Initialize` functions before the test starts and then calling `::Terminate` after the test is done (in reverse order). This adds a lot of error-prone boilerplate code to our testing code. This patch adds a RAII called SubsystemRAII that ensures that we always call ::Initialize and then call ::Terminate after the test is done (and that the Terminate calls are always in the reverse order of the ::Initialize calls). It also gets rid of all of the boilerplate that we had for these calls. Per-fixture initialization is still not very nice with this approach as it would require some kind of static unique_ptr that gets manually assigned/reseted from the gtest SetUpTestCase/TearDownTestCase functions. Because of that I changed all per-fixture setup to now do per-test setup which can be done by just having the SubsystemRAII as a member of the test fixture. This change doesn't influence our normal test runtime as LIT anyway runs each test case separately (and the Initialize/Terminate calls are anyway not very expensive). It will however make running all tests in a single executable slightly slower. Reviewers: labath, JDevlieghere, martong, espindola, shafik Reviewed By: labath Subscribers: mgorny, rnkovacs, emaste, MaskRay, abidh, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D71630
* [lldb-server] Introduce Socket::Initialize and Terminate to simply WSASocket ↵Aaron Smith2019-04-101-12/+7
| | | | | | | | | | | | | | | | setup Reviewers: zturner, labath Reviewed By: labath Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D60440 llvm-svn: 358044
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* Fix the new SocketAddressTest on WindowsPavel Labath2017-04-241-3/+20
| | | | | | we need to call WSAStartup before we can use getaddrinfo. llvm-svn: 301179
* Add more arguments to SocketAddress::GetAddressInfoPavel Labath2017-04-241-6/+10
| | | | | | | | | | | | | | | | | | | Summary: the reason for this is two-fold: - getaddrinfo without the extra arguments will return the same (network-level) address multiple times, once for each supported transport protocol, which is not what is usually intended (it certainly wasn't in D31823) - it enables us to rewrite the getaddrinfo member function in terms of the static GetAddressInfo function. Reviewers: beanz, tberghammer Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D32357 llvm-svn: 301168
* *** This commit represents a complete reformatting of the LLDB source codeKate Stone2016-09-061-46/+42
| | | | | | | | | | | | | | | | | | | | | | | *** to conform to clang-format’s LLVM style. This kind of mass change has *** two obvious implications: Firstly, merging this particular commit into a downstream fork may be a huge effort. Alternatively, it may be worth merging all changes up to this commit, performing the same reformatting operation locally, and then discarding the merge for this particular commit. The commands used to accomplish this reformatting were as follows (with current working directory as the root of the repository): find . \( -iname "*.c" -or -iname "*.cpp" -or -iname "*.h" -or -iname "*.mm" \) -exec clang-format -i {} + find . -iname "*.py" -exec autopep8 --in-place --aggressive --aggressive {} + ; The version of clang-format used was 3.9.0, and autopep8 was 1.2.4. Secondly, “blame” style tools will generally point to this commit instead of a meaningful prior commit. There are alternatives available that will attempt to look through this change and find the appropriate prior commit. YMMV. llvm-svn: 280751
* Fix SocketAddressTest (again)Pavel Labath2016-03-301-1/+2
| | | | | | | On some versions of Windows, the address is returned as "::1", while on others it's "0:0:...:0:1". Accept both versions, as they represent the same address. llvm-svn: 264850
* Fix SocketTest on Windows.Zachary Turner2016-02-181-4/+0
| | | | | | Differential Revision: http://reviews.llvm.org/D17106 llvm-svn: 261240
* Rework the gtest directory structure.Zachary Turner2015-03-131-0/+77
This makes the directory structure mirror the canonical LLVM directory structure for a gtest suite. Additionally, this patch deletes the xcode project. Nobody is currently depending on this, and it would be better to have gtest unit tests be hand-maintained in the Xcode workspace rather than using this python test runner. Patches to that effect will be submitted as followups. llvm-svn: 232211
OpenPOWER on IntegriCloud