diff options
author | Marc Laukien <marc@zeroc.com> | 2006-03-15 21:57:38 +0000 |
---|---|---|
committer | Marc Laukien <marc@zeroc.com> | 2006-03-15 21:57:38 +0000 |
commit | d38ec01e3797bb54f997b4308c25d62dbcce2685 (patch) | |
tree | 4b6445f4c61ad81f5efaa1b5a581261ac3951795 /cpp | |
parent | more attack test (diff) | |
download | ice-d38ec01e3797bb54f997b4308c25d62dbcce2685.tar.bz2 ice-d38ec01e3797bb54f997b4308c25d62dbcce2685.tar.xz ice-d38ec01e3797bb54f997b4308c25d62dbcce2685.zip |
more attack test
Diffstat (limited to 'cpp')
-rw-r--r-- | cpp/test/Glacier2/attack/Client.cpp | 6 | ||||
-rwxr-xr-x | cpp/test/Glacier2/attack/run.py | 1 |
2 files changed, 4 insertions, 3 deletions
diff --git a/cpp/test/Glacier2/attack/Client.cpp b/cpp/test/Glacier2/attack/Client.cpp index bab536a2ae1..1ec77bad244 100644 --- a/cpp/test/Glacier2/attack/Client.cpp +++ b/cpp/test/Glacier2/attack/Client.cpp @@ -60,7 +60,7 @@ CallbackClient::run(int argc, char* argv[]) string msg; for(int i = 1; i <= 100000; ++i) { - if(1 || i % 100 == 0) + if(i % 100 == 0) { if(!msg.empty()) { @@ -75,13 +75,13 @@ CallbackClient::run(int argc, char* argv[]) Identity ident; string::iterator p; - ident.name.resize(rand() % 100); + ident.name.resize(1 + rand() % 100); for(p = ident.name.begin(); p != ident.name.end(); ++p) { *p = static_cast<char>(33 + rand() % (127-33)); } - ident.category.resize(rand() % 100); + ident.category.resize(rand() % 101); for(p = ident.category.begin(); p != ident.category.end(); ++p) { *p = static_cast<char>(33 + rand() % (127-33)); diff --git a/cpp/test/Glacier2/attack/run.py b/cpp/test/Glacier2/attack/run.py index 7b61ca71178..af2b6d41be9 100755 --- a/cpp/test/Glacier2/attack/run.py +++ b/cpp/test/Glacier2/attack/run.py @@ -28,6 +28,7 @@ command = router + TestUtil.clientServerOptions + \ r' --Glacier2.CryptPasswords="' + toplevel + r'/test/Glacier2/attack/passwords"' print "starting router...", +print command starterPipe = os.popen(command) TestUtil.getServerPid(starterPipe) TestUtil.getAdapterReady(starterPipe) |