Skip to content
Snippets Groups Projects
  1. Mar 29, 2012
    • Nat Goodspeed's avatar
      IQA-463: fix Linux wrapper.sh (aka secondlife) gridargs.dat handling. · 51018f38
      Nat Goodspeed authored
      Previous change to wrapper.sh naively read $(<etc/gridargs.dat) directly into
      the viewer binary command line. But gridargs.dat contains quoted args as well
      as simple space-separated ones: need bash to scan the file using eval. This
      was why the older logic used eval on the entire command line. However, we must
      use eval only for gridargs.dat so we don't lose individual quoting on
      arguments passed to the secondlife script.
      51018f38
  2. Mar 23, 2012
  3. Mar 21, 2012
  4. Mar 20, 2012
  5. Mar 16, 2012
  6. Mar 15, 2012
  7. Mar 14, 2012
  8. Mar 13, 2012
    • Nat Goodspeed's avatar
      If very-large-message test fails, search for a size that works. · bdc27815
      Nat Goodspeed authored
      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.
      bdc27815
    • Oz Linden's avatar
    • Nat Goodspeed's avatar
      Protect LLProcess destructor when run after APR shutdown. · ab7fb594
      Nat Goodspeed authored
      A static LLProcessPtr variable won't be destroyed until after procedural code
      has shut down APR. The trouble is that LLProcess's destructor unregisters
      itself from APR -- and, for an autokill LLProcess, attempts to kill the child
      process. All that is ill-advised after APR shutdown.
      Disable use of apr_pool_note_subprocess() mechanism. This should be another
      viable way of coping with static autokill LLProcessPtr variables: when the
      designated APR pool is cleaned up, APR promises to kill the child process. But
      whether it's an APR bug or a calling error, the present (now disabled) call in
      LLProcess results in OUR process, the viewer, getting SIGTERM when it asks to
      clean up the global APR pool.
      ab7fb594
    • Nat Goodspeed's avatar
      Increase timeout for very-large-message test. · 1bdc876b
      Nat Goodspeed authored
      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.
      1bdc876b
    • Nat Goodspeed's avatar
      Add timeout functionality to waitfor() helper functions. · 7d3cf544
      Nat Goodspeed authored
      Otherwise, a stuck child process could potentially hang the test, and thus the
      whole viewer build.
      7d3cf544
  9. Mar 12, 2012
  10. Mar 11, 2012
  11. Mar 07, 2012
  12. Mar 06, 2012
  13. Mar 05, 2012
    • Nat Goodspeed's avatar
      Alphabetize cmd_line.xml. · 106bac8e
      Nat Goodspeed authored
      This separate commit is just to order the keys. Data are unchanged, as
      established by:
      $ hg cat -rtip cmd_line.xml >cmd_line.xml.tip
      $ python
      Python 2.7.1 (r271:86832, Jul 31 2011, 19:30:53)
      [GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)] on darwin
      Type "help", "copyright", "credits" or "license" for more information.
      >>> from llbase import llsd
      >>> tipdata = llsd.parse(open("cmd_line.xml.tip").read())
      >>> newdata = llsd.parse(open("cmd_line.xml").read())
      >>> tipdata == newdata
      True
      106bac8e
    • Nat Goodspeed's avatar
      Further reduce the block size that LLProcess writes to child pipe. · e7ceb82e
      Nat Goodspeed authored
      It seems that on Windows, even 32K is too big: one in three load-test runs
      fails with a duplicated block. Empirically, reducing it to 4K makes it much
      more stable -- at least we can run successfully 100 consecutive times, which
      is a step in the right direction.
      e7ceb82e
    • Nat Goodspeed's avatar
      Additional diagnostic code to track down strange Windows pipe error. · 2491e2bd
      Nat Goodspeed authored
      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.
      2491e2bd
    • Nat Goodspeed's avatar
      Introduce (disabled) LLLeap debugging code to validate stdin writes. · 63b393da
      Nat Goodspeed authored
      While debugging mysterious problem on Windows, one potential failure mode to
      rule out was the possibility that streaming std::ostringstream <<
      LLSDNotationStreamer(large_LLSD) might itself cause trouble -- even before
      attempting to write to the LLProcess::WritePipe. The debugging code validated
      that the correct length is being reported, and that deserializing the
      resulting buffer produces equivalent LLSD. This code verified correct
      operation, and so has been disabled, as it's expensive at runtime.
      63b393da
    • Nat Goodspeed's avatar
      Make test.cpp support LOGFAIL env var: only failed tests show log. · f02ded46
      Nat Goodspeed authored
      Set LOGFAIL= one of ALL, DEBUG, INFO, WARN, ERROR, NONE. A passing test will
      run silently, as now; but a failing test will replay log output at the
      specified level or higher.
      While at it, support LOGTEST environment variable, same values. This is like
      setting --debug (or -d), but allows specifying an arbitrary level -- and,
      unlike --debug, can be set for a TeamCity build config without modifying any
      scripts or code.
      Publish LLError::decodeLevel(std::string), previously private to llerror.cpp.
      f02ded46
    • Nat Goodspeed's avatar
      Move std::ostream << CaptureLog logic into CaptureLog::streamto(). · b3b51f01
      Nat Goodspeed authored
      That lets us reliably declare the operator<<() free function inline, which
      permits multiple translation units in the same executable to #include
      "wrapllerrs.h".
      b3b51f01
  14. Mar 04, 2012
    • Nat Goodspeed's avatar
      Simplify llleap_test.cpp plugin by reading individual characters. · 30e8e23d
      Nat Goodspeed authored
      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.
      30e8e23d
    • Nat Goodspeed's avatar
      Make llleap_test.cpp avoid hard limit on MSVC std::ostringstream max. · ca703b2b
      Nat Goodspeed authored
      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.
      ca703b2b
  15. Mar 03, 2012
    • Nat Goodspeed's avatar
      Break large buffer into chunks to write to LLProcess child pipe. · 75f41254
      Nat Goodspeed authored
      On Windows we ran into trouble trying to write a biggish (~1 MB) buffer of
      data to the child process's stdin pipe with a single apr_file_write() call.
      The child actually received corrupted data -- suggesting a possible bug in
      either APR or Windows pipes; the same test driving the same logic worked fine
      on Mac and Linux. Empirically, iterating over chunks of the buffered data is
      more robust.
      75f41254
Loading