summaryrefslogtreecommitdiff
path: root/indra/llcommon/tests/llleap_test.cpp
AgeCommit message (Collapse)Author
2016-07-21MAINT=6585: remove extraneous path manipulation from llleap_testGlenn Glazer
2016-07-21MAINT=6585: fix llleap_test to use llbase not indra.baseGlenn Glazer
2016-03-16merge changes for DRTVWR-417Oz Linden
2015-11-18WOLF-300: Try using a smaller data volume for LLLeap tests on Windows.Nat Goodspeed
2015-11-10remove execute permission from many files that should not have itOz Linden
2015-01-12Experimentally try full-size LLLeap stream test on Windows.Nat Goodspeed
The new toolchain may (!) have fixed a longstanding bug in LLLeap / APR when we try to pump large volumes of data through a Windows named pipe using APR nonblocking I/O. This used to fail pretty consistently because the APR nonblocking write call would sometimes spuriously return "would block" when in fact the data buffer was completely written; the caller would later retry, which of course would duplicate some of the data in the pipe. Preliminary experiments with VS 2013 suggest this may have been resolved. This changeset is to propagate the experiment to a wider range of Windows systems; we may need to revert it if in fact the bug persists.
2014-12-12Eliminate use of boost::lambda with boost::function (Trac #10864).Nat Goodspeed
https://svn.boost.org/trac/boost/ticket/10864 I've used boost::lambda with boost::function in a number of creative ways over the years. But the clang 6 shipped with Xcode 6 seems to have somehow broken lambda + function in Boost 1.57. boost::phoenix is a partial workaround. Sadly, lambda's comma-operator overload doesn't seem to be supported, necessitating a couple ugly workarounds. With real lambdas now supported by current compilers, I'm sure the Boost community has little incentive to repair the lambda + function problem. Presumably we'll be able to use such features ourselves Real Soon Now...
2013-08-23BUILDFIX: fix for crashes in unit tests on mac and linuxRichard Linden
2013-04-25Merge 3.5.1 into MaterialsGraham Madarasz
2013-03-29Update Mac and Windows breakpad builds to latestGraham Madarasz
2013-03-01remove use of system llbase module in integration tests; always use the one ↵Oz Linden
from this tree
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-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-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-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.