summaryrefslogtreecommitdiff
path: root/indra/llcorehttp/tests/llcorehttp_test.cpp
AgeCommit message (Collapse)Author
2020-03-25DRTVWR-476: Disable test_httprequest.hpp on Mac Release builds.Nat Goodspeed
For reasons not yet diagnosed, specifically in Mac Release builds, the tests in test_httprequest.hpp consistently crash with a backtrace suggesting that the worker thread is calling LLCore::HttpLibcurl::completeRequest() after the foreground thread calls HttpRequest::destroyService(). Weirdly, even executing a tut::skip() call in every test<n>() function up to the point of the crash does not eliminate the crash.
2020-03-25DRTVWR-476: pthread_self() also needs CRYPTO_THREADID_set_pointer()Nat Goodspeed
2020-03-25DRTVWR-476: Use OpenSSL API suitable for 64-bit pointers.Nat Goodspeed
In three different places we use the same pattern: an ssl_thread_id_callback() function (a static member of LLCrashLogger, in that case) that used to be passed to CRYPTO_set_id_callback() and therefore returned an unsigned long representing the ID of the current thread. But GetCurrentThread() is a HANDLE, an alias for a pointer, and you can't uniquely cram a 64-bit pointer into an unsigned long. Fortunately OpenSSL has a more modern API for retrieving thread ID. Pass each ssl_thread_id_callback() function to CRYPTO_THREADID_set_callback() instead, converting it to accept CRYPTO_THREADID* and call CRYPTO_THREADID_set_pointer() or CRYPTO_THREADID_set_numeric() as appropriate().
2016-08-30Automated merge with ssh://bitbucket.org/lindenlab/viewer-releaseNat Goodspeed
2016-04-04merge with 4.0.3-releaseOz Linden
2015-11-10remove execute permission from many files that should not have itOz Linden
2015-10-15Another fix for unit tests. Missed on Windows.Rider Linden
2015-05-20MAINT-5232: Introduce SUBSYSTEM_CLEANUP() macroNat Goodspeed
and use it for existing LLSomeClass::cleanupClass() calls. This logs the fact of making the call, as well as making it.
2013-03-29Update Mac and Windows breakpad builds to latestGraham Madarasz
2012-06-21SH-3177 Add streambuf/iostream adapters to BufferArray object.Monty Brandenberg
Initial version that should have enough of the plumbing to produce a working adapter. Memory test is showing 8 bytes held after one of the tests so I'm going to revisit that later. But basic functionality is there going by the unit tests.
2012-06-12HTTP Proxy, PUT & POST, unit tests and refactoring.Monty Brandenberg
Implemented/modified PUT & POST to not used chunked encoding for the request. Made the unit test much happier and probably a better thing for the pipeline. Have a cheesy static & dynamic proxy capability using both local options and a way to wire into LLProxy in llmessages. Not a clean thing but it will get the proxy path working with both socks5 & http proxies. Refactoring to get rid of unneeded library handler and unified an HttpStatus return for all requests. Big batch of code removed as a result of that and more is possible as well as some syscall avoidance with a bit more work. Boosted the unit tests for simple PUT & POST test which revealed the test harness does *not* like chunked encoding so we'll avoid it for now (and don't really need it in any of our schemes).
2012-06-11Bring in the testrunner/http server scaffold for better integration testing.Monty Brandenberg
This brings in a copy of llmessage's llsdmessage testing server. We run a mocked HTTP service to handle requests and the integration tests run against it by picking up the LL_TEST_PORT environment variable when running. Add some checks and output to produce useful info when run in the wrong environment and when bad status is received. Later will add a dead port as well so we can test that rather than use 'localhost:2'.
2012-06-11Unit test fixups. Mac/Linux detect memory leak due to llwarns, try/catch ↵Monty Brandenberg
cleanup. Our logging holds on to a changing bit of memory between operations and the memory leak detection I'm using senses this and complains. So, for now, disable the final memory check on Mac & Linux, leave it active on Windows. Solve this for real some other day. Add try/catch blocks to do cleanup in unit tests that go wrong so that we don't get a cascade of assertion failures when subsequent tests find singletons still alive.
2012-05-09Added correct libcurl initialization to the unit tests which makes Windows ↵Monty Brandenberg
builds reliable. It's the right thing to do and introduced a scoped version for convenience in tests.
2012-05-09Try to get some more correct curl init into the unit testing.Monty Brandenberg
2012-05-08Okay, got Mac building with Boost 1.48. Unit tests needed NULL pointerMonty Brandenberg
defenses in the delete functions of the allocation support. General boost library renaming again. Linux builds in TC though it shouldn't based on what Boost.cmake lookes like...
2012-05-07Build llcorehttp as part of a viewer dependency with unit tests. This requiredMonty Brandenberg
boost::thread and the easiest path to that was to go with the 1.48 Boost release in the 3P tree (eliminating a fork for a modified 1.45 packaging). One unit test, the most important one, is failing in test_httprequest but that can be attended to later. This test issues a GET to http://localhost:2/ and that is hitting the wire but the libcurl plumbing isn't delivering the failure, only the eventual timeout. An unexpected change in behavior.