diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2012-03-02 14:56:00 -0500 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2012-03-02 14:56:00 -0500 |
commit | 674f9fb111919f9dffaddf8c0732267f6dbfdf2a (patch) | |
tree | 77b387b8212832e47ac518ce1d52f6072af1aa3c /indra | |
parent | e8f463ef7a9cddda3813d20935957708d3b4aa3b (diff) |
Add LLLeap unit test for invalid length prefix from child stdout.
Diffstat (limited to 'indra')
-rw-r--r-- | indra/llcommon/tests/llleap_test.cpp | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/indra/llcommon/tests/llleap_test.cpp b/indra/llcommon/tests/llleap_test.cpp index 053a6cea80..328b9c3562 100644 --- a/indra/llcommon/tests/llleap_test.cpp +++ b/indra/llcommon/tests/llleap_test.cpp @@ -236,6 +236,20 @@ namespace tut template<> template<> void object::test<5>() { + set_test_name("bad stdout len prefix"); + NamedTempFile script("py", + "import sys\n" + "sys.stdout.write('5a2:something')\n"); + CaptureLog log(LLError::LEVEL_WARN); + waitfor(LLLeap::create(get_test_name(), + sv(list_of(PYTHON)(script.getName())))); + ensure_contains("error log line", + log.messageWith("invalid protocol"), "5a2:"); + } + + template<> template<> + void object::test<6>() + { set_test_name("empty plugin vector"); std::string threw; try @@ -249,7 +263,7 @@ namespace tut } template<> template<> - void object::test<6>() + void object::test<7>() { set_test_name("bad launch"); // Synthesize bogus executable name @@ -329,7 +343,7 @@ namespace tut }; template<> template<> - void object::test<7>() + void object::test<8>() { set_test_name("round trip"); AckAPI api; @@ -361,7 +375,7 @@ namespace tut }; template<> template<> - void object::test<8>() + void object::test<9>() { set_test_name("many small messages"); // It's not clear to me whether there's value in iterating many times @@ -409,7 +423,7 @@ namespace tut } template<> template<> - void object::test<9>() + void object::test<10>() { set_test_name("very large message"); ReqIDAPI api; |