summaryrefslogtreecommitdiff
path: root/indra/llcommon/tests
AgeCommit message (Collapse)Author
2013-06-29MAINT-2302: Make llprocess test<6> output less like a build error.Nat Goodspeed
build.sh LogScan greps for "error:" (among other things) so removing the colon from the test name "syntax_error" should help.
2013-06-29MAINT-2302: Re-enable previously-disabled LLProcess tests for diagnosis.Nat Goodspeed
2013-05-24merge changes for maint-2724Oz Linden
2013-05-23MAINT-2724: Make viewer explicitly set coroutine stack size.Nat Goodspeed
Introduce LLCoros::setStackSize(), with a compile-time default value we hope we never have to use. Make LLAppViewer call it with the value of the new settings variable CoroutineStackSize as soon as we've read settings files. (While we're at it, notify interested parties that we've read settings files.) Give CoroutineStackSize a default value four times the previous default stack size. Make LLCoros::launch() pass the saved stack size to each new coroutine instance. Re-enable lleventcoro integration test. Use LLSDMap() construct rather than LLSD::insert(), which used to return the modified object but is now void.
2013-05-10merge changes for 3.5.2-beta4Oz Linden
2013-05-07merge changes for DRTVWR-299Oz Linden
2013-04-30Merge 3.5.1 into MaterialsGraham Madarasz
2013-04-19merge up to latest viewer-development for merge to 3.5.2Oz Linden
2013-04-19merge changes for DRTVWR-294Oz Linden
2013-04-16merge up to 3.5.2 developmentOz Linden
2013-04-09fix? race condition that occasionally fails in unit testOz Linden
2013-03-29Update Mac and Windows breakpad builds to latestGraham Madarasz
2013-03-01merge fix for unit test problem with some python configurationsOz Linden
2013-03-01remove use of system llbase module in integration tests; always use the one ↵Oz Linden
from this tree
2013-02-21MAINT-2389: Change viewer to Boost package without ucontext.h.Nat Goodspeed
In autobuild.xml, specify today's build of the Boost package that includes the Boost.Context library, and whose boost::dcoroutines library uses Boost.Context exclusively instead of its previous context-switching underpinnings (source of the ucontext.h dependency). Add BOOST_CONTEXT_LIBRARY to Boost.cmake and Copy3rdPartyLibs.cmake. Link it with the viewer and with the lllogin.cpp test executable. Track new Boost package convention that our (early, unofficial) Boost.Coroutine library is now accessed as boost/dcoroutine/etc.h and boost::dcoroutines::etc. Remove #include <boost/coroutine/coroutine.hpp> from llviewerprecompiledheaders.h and lllogin.cpp: old rule that Boost.Coroutine header must be #included before anything else that might use ucontext.h is gone now that we no longer depend on ucontext.h. In fact remove -D_XOPEN_SOURCE in 00-Common.cmake because that was inserted specifically to work around a known problem with the ucontext.h facilities.
2013-01-31workaround by skipping llprocess tests that frequently fail on WindowsOz Linden
2012-12-05Linux Viewer build fixes.Logan Dethrow
* Removed no longer used unpack_bufsize from bitpack_test.cpp * Added llviewertexture_stub.cpp to the newview tests directory to fix llworldmap_test.cpp and llworldmipmap_test.cpp linker errors.
2012-11-28SH-3563. Pull and merge from viewer-development. Modest code changes to fix ↵prep
alignment issue in llAppearance.
2013-03-04import fix for python sys.path in integration testsOz Linden
2012-10-11Updating linux build to gcc4.6Don Kjer
2012-11-13Automated merge with http://hg.secondlife.com/viewer-developmentNat Goodspeed
2012-08-31Fix longstanding LLURI::buildHTTP() bug when passing string path.Nat Goodspeed
The LLURI::buildHTTP() overloads that take an LLSD 'path' accept 'undefined', LLSD::String and (LLSD::Array of LLSD::String). A sequence of path components passed in an Array is constructed into a slash-separated path. There are unit tests in lluri_test.cpp to exercise that case. To my amazement, there were NO unit tests covering the case of an LLSD::String path. The code for that case escaped and appended the entire passed string. While that might be fine for a 'path' consisting of a single undecorated path component, the available documentation does not forbid one from passing a path containing slashes as well. But this had the dubious effect of replacing every slash with %2F. In particular, decomposing a URL string with one LLURI instance and constructing another like it using LLURI::buildHTTP() was not symmetrical. Having consulted with Richard, I made the string-path logic a bit more nuanced: - The passed path string is split on slashes. Every path component is individually escaped, then recombined with slashes into the final path. - Duplicate slashes are eliminated. - The presence or absence of a trailing slash in the original path string is carefully respected. Now that we've nailed down how it ought to behave -- added unit tests to ensure that it DOES behave that way!!
2012-07-02Merge 3.3.3 release with Drano HTTP library at 3.3.0Monty Brandenberg
Big delta was converting the new texture debugger support code to the new library. Viewer manifest should probably get an eyeball before release.
2012-06-01Platform fixups Linux: unused variables, make error strings constant.Monty Brandenberg
2012-04-23IQA-463: LLError::addRecorder() claims ownership of passed Recorder*.Nat Goodspeed
That is, when the underlying LLError::Settings object is destroyed -- possibly at termination, possibly on LLError::restoreSettings() -- the passed Recorder* is deleted. There was much existing code that seemed as unaware of this alarming fact as I was myself. Passing to addRecorder() a pointer to a stack object, or to a member of some other object, is just Bad. It might be preferable to make addRecorder() accept std::auto_ptr<Recorder> to make the ownership transfer more explicit -- or even boost::shared_ptr<Recorder> instead, which would allow the caller to either forget or retain the passed Recorder. This preliminary pass retains the Recorder* dumb pointer API, but documents the ownership issue, and eliminates known instances of passing pointers to anything but a standalone heap Recorder subclass object.
2012-03-15On Windows, make "very large message" test ridiculously small.Nat Goodspeed
This test must not be subject to spurious environmental failures, else some kind soul will disable it entirely. We observe that APR specifies a hard-coded buffer size of 64Kbytes for pipe creation -- use that and cross fingers.
2012-03-14Backed out changeset 22664c76b59e (reinstate Windows pipe workaround)Nat Goodspeed
Sigh, the rejoicing was premature.
2012-03-14Backed out changeset 51205a909e2c (Windows APR pipe bug workaround)Nat Goodspeed
If in fact we've managed to fix the APR bug writing to a Windows named pipe, it should no longer be necessary to try to work around it by testing with a much smaller data volume on Windows!
2012-03-14On Windows, try cutting down the size of a "very large message."Nat Goodspeed
Ideally we'd love to be able to nail the underlying bug, but log output suggests it may actually go all the way down to the OS level. To move forward, try to bypass it.
2012-03-13If very-large-message test fails, search for a size that works.Nat Goodspeed
We want to write a robust test that consistently works. On Windows, that appears to require constraining the max message size. I, the coder, could try submitting test runs of varying sizes to TC until I found a size that works... but that could take quite a while. If I were clever, I might even use a manual binary search. But computers are good at binary searching; there are even prepackaged algorithms in the STL. If I were cleverer still, I could make the test program itself search for size that works.
2012-03-13Increase timeout for very-large-message test.Nat Goodspeed
Apparently, at least on Mac, there are circumstances in which the very-large- message test can take several times longer than normal, yet still complete successfully. This is always the problem with timeouts: does timeout expiration mean that the code in question is actually hung, or would it complete if given a bit longer? If very-large-message test fails, retry a few times with smaller sizes to try to find a size at which the test runs reliably. The default size, ca 1MB, is intended to be substantially larger than anything we'll encounter in the wild. Is that "unreasonably" large? Is there a "reasonable" size at which the test could consistently pass? Is that "reasonable" size still larger than what we expect to encounter in practice? Need more information, hence this code.
2012-03-13Add timeout functionality to waitfor() helper functions.Nat Goodspeed
Otherwise, a stuck child process could potentially hang the test, and thus the whole viewer build.
2012-03-05Additional diagnostic code to track down strange Windows pipe error.Nat Goodspeed
It seems that under certain circumstances, write logic was duplicating a chunk of the data being streamed down our pipe. But as this condition is only driven with a very large data stream, eyeballing that data stream is tedious. Add code to compare the raw received data with the expected stream, reporting where and how they first differ.
2012-03-05Move std::ostream << CaptureLog logic into CaptureLog::streamto().Nat Goodspeed
That lets us reliably declare the operator<<() free function inline, which permits multiple translation units in the same executable to #include "wrapllerrs.h".
2012-03-04Simplify llleap_test.cpp plugin by reading individual characters.Nat Goodspeed
While we're accumulating the 'length:' prefix, the present socket-based logic reads 20 characters, then reads 'length' more, then discards any excess (in case the whole 'length:data' packet ends up being less than 20 characters). That's probably a bug: whatever characters follow that packet, however short it may be, are probably the 'length:' prefix of the next packet. We probably only get away with it because we probably never send packets that short. Earlier llleap_test.cpp plugin logic still read 20 characters, then, if there were any left after the present packet, cached them as the start of the next packet. This is probably more correct, but complicated. Easier just to read individual characters until we've seen 'length:', then try for exactly the specified length over however many reads that requires.
2012-03-04Make llleap_test.cpp avoid hard limit on MSVC std::ostringstream max.Nat Goodspeed
In load testing, we have observed intermittent failures on Windows in which LLSDNotationStreamer into std::ostringstream seems to bump into a hard limit of 1048590 bytes. ostringstream reports that much buffered data and returns that much -- even though, on examination, the notation-serialized stream is incomplete at that point. It's our intention to load-test LLLeap and LLProcess, not the local iostream implementation; we hope that this kind of data volume is comfortably greater than actual usage. Back off the load-testing max size a bit.
2012-03-03Add debugging output in case LLLeap writes corrupt data to plugin.Nat Goodspeed
New llleap_test.cpp load testing turned up Windows issue in which plugin process received corrupt packet, producing LLSDParseError. Add code to dump the bad packet in that case -- but if LLSDParseError is willing to state the offset of the problem, not ALL of the packet. Quiet MSVC warning about little internal base class needing virtual destructor.
2012-03-02Add LLLeap unit test for invalid length prefix from child stdout.Nat Goodspeed
2012-03-02Add LLLeap unit tests for strange data on child stdout.Nat Goodspeed
2012-03-02Add "load test" LLLeap unit tests: many small messages, one large.Nat Goodspeed
These tests rule out corruption as we cross buffer boundaries in OS pipes and the LLLeap implementation itself.
2012-03-02Drag in Python llsd module, which greatly simplifies tests.Nat Goodspeed
It only took a few examples of trying to wrangle notation LLSD as string data to illustrate how clumsy that is. I'd forgotten that a couple other TUT tests already invoke Python code that depends on the llsd module. The trick is to recognize that at least as of now, there's still an obsolete version of the module in the viewer's own source tree. Python code is careful to try importing llbase.llsd before indra.base.llsd, so that if/when we finally do clear indra/lib/python from the viewer repo, we need only require that llbase be installed on every build machine.
2012-03-01Refactor llleap_test.cpp to streamline adding more unit tests.Nat Goodspeed
Migrate logic from specific test to common reader module, notably parsing the wakeup message containing the reply-pump name. Make test script post to Result struct to communicate success/failure to C++ TUT test, rather than just writing to log. Make test script insensitive to key order in serialized LLSD::Map.
2012-03-01Break out std::ostream << CaptureLog routine for general use.Nat Goodspeed
2012-03-01Add LLLeap class, initial implementation, initial unit tests.Nat Goodspeed
Instantiating LLLeap with a command to execute a particular child process sets up machinery to speak LLSD Event API Plugin protocol with that child process. LLLeap is an LLInstanceTracker subclass, so the code that instantiates need not hold the pointer. LLLeap monitors child-process termination and deletes itself when done.
2012-03-01Allow CaptureLog's consumer to specify desired log level.Nat Goodspeed
Of course, given the way the log machinery works, it's really "everything at that level or stronger."
2012-03-01Make CaptureLog::withMessage() raise tut::failure if not found.Nat Goodspeed
All known callers were using ensure(! withMessage(...).empty()). Centralize that logic. Make failure message report the string being sought and the log messages in which it wasn't found. In case someone does want to permit the search to fail, add an optional 'required' parameter, default true. Leverage new functionality in llprocess_test.cpp.
2012-03-01Break out TestRecorder class as CaptureLog into wrapllerrs.h.Nat Goodspeed
Giving more unit tests the ability to capture and examine log output is generally useful. Renaming the class just makes it less ambiguous: what's a TestRecorder? Something that records tests?
2012-02-29Guarantee LLProcess::Params::postend listener any ReadPipe data.Nat Goodspeed
Previously one might get process-terminated notification but still have to wait for the child process's final data to arrive on one or more ReadPipes. That required complex consumer timing logic to handle incomplete pending ReadPipe data, e.g. a partial last line with no terminating newline. New code guarantees that by the time LLProcess sends process-terminated notification, all pending pipe data will have been buffered in ReadPipes. Document LLProcess::ReadPipe::getPump() notification event; add "eof" key. Add LLProcess::ReadPipe::getline() and read() convenience methods. Add static LLProcess::getline() and basename() convenience methods, publishing logic already present elsewhere. Use ReadPipe::getline() and read() in unit tests. Add unit test for "eof" event on ReadPipe::getPump(). Add unit test verifying that final data have been buffered by termination notification event.
2012-02-27Reduce redundancy in llprocess_test.cpp using get_test_name().Nat Goodspeed
2012-02-27Automated merge with file:///Users/nat/linden/viewer-leap-daggyNat Goodspeed