diff options
author | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-05-13 03:51:45 +0000 |
---|---|---|
committer | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-05-13 03:51:45 +0000 |
commit | d37bf2ab487ce185bc3b05f1707f0f49b703c726 (patch) | |
tree | 751a23d8c0a271e37bffefea47bd0ee2cc1c2a5e | |
parent | c9561bf4b659e7949a784a2438d7fedbcb6a5fc1 (diff) | |
download | ATCD-d37bf2ab487ce185bc3b05f1707f0f49b703c726.tar.gz |
ChangeLogTag:Fri May 12 20:35:25 2000 Carlos O'Ryan <coryan@uci.edu>
34 files changed, 418 insertions, 214 deletions
diff --git a/TAO/ChangeLogs/ChangeLog-02a b/TAO/ChangeLogs/ChangeLog-02a index c50e9c7cf41..9ff6c3a94de 100644 --- a/TAO/ChangeLogs/ChangeLog-02a +++ b/TAO/ChangeLogs/ChangeLog-02a @@ -1,3 +1,43 @@ +Fri May 12 20:35:25 2000 Carlos O'Ryan <coryan@uci.edu> + + * examples/Buffered_Oneways/client.cpp: + * examples/Buffered_Oneways/test_i.cpp: + * examples/POA/On_Demand_Loading/Servant_Manager.cpp: + * orbsvcs/orbsvcs/Event/EC_Default_Factory.cpp: + * orbsvcs/orbsvcs/Event/EC_ProxySupplier.cpp: + * orbsvcs/tests/EC_Throughput/ECT_Consumer_Driver.cpp: + * orbsvcs/tests/EC_Throughput/ECT_Supplier_Driver.cpp: + * orbsvcs/tests/EC_Throughput/ECT_Throughput.cpp: + * orbsvcs/tests/Event/Basic/Observer.cpp: + * orbsvcs/tests/Event/Basic/Random.cpp: + * orbsvcs/tests/Event/Basic/Random.h: + * orbsvcs/tests/Event/Basic/Shutdown.cpp: + * orbsvcs/tests/Event/Basic/Shutdown.h: + * orbsvcs/tests/Event/Basic/run_test.pl: + * orbsvcs/tests/Trading/TT_Info.cpp: + * orbsvcs/tests/Trading/run_test.pl: + * performance-tests/Cubit/TAO/IDL_Cubit/Cubit_Client.cpp: + * performance-tests/Cubit/TAO/IDL_Cubit/Cubit_Client.h: + * performance-tests/Cubit/TAO/IDL_Cubit/run_test.pl: + * tests/CDR/alignment.cpp: + * tests/CDR/allocator.cpp: + * tests/CDR/basic_types.cpp: + * tests/CDR/growth.cpp: + * tests/CDR/run_test.pl: + * tests/CDR/tc.cpp: + * tests/DSI_Gateway/client.cpp: + * tests/DSI_Gateway/test_i.cpp: + * tests/Faults/ping_i.cpp: + * tests/Faults/pong.cpp: + * tests/MT_Server/test_i.cpp: + * tests/POA/Identity/Identity.cpp: + * tests/Timed_Buffered_Oneways/client.cpp: + * tests/Timed_Buffered_Oneways/test_i.cpp: + Many tests were too noisy for the auto_compile builds, making it + hard to find real errors. + Cleaned up their output and limited to just enough information + to know what failed when something actually does. + Fri May 12 16:33:42 2000 Carlos O'Ryan <coryan@uci.edu> * tests/Policies/Manipulation.dsp: diff --git a/TAO/examples/Buffered_Oneways/client.cpp b/TAO/examples/Buffered_Oneways/client.cpp index c5deb262ced..69365a19e46 100644 --- a/TAO/examples/Buffered_Oneways/client.cpp +++ b/TAO/examples/Buffered_Oneways/client.cpp @@ -13,9 +13,10 @@ // // ================================================================ +#include "testC.h" +#include "tao/debug.h" #include "ace/Get_Opt.h" #include "ace/Read_Buffer.h" -#include "testC.h" ACE_RCSID(Buffered_Oneways, client, "$Id$") @@ -285,10 +286,14 @@ main (int argc, char **argv) ACE_TRY_ENV); ACE_TRY_CHECK; + if (TAO_debug_level > 0) + { + ACE_DEBUG ((LM_DEBUG, + "client: Iteration %d @ %T\n", + i)); + } + // Invoke the oneway method. - ACE_DEBUG ((LM_DEBUG, - "client: Iteration %d @ %T\n", - i)); test_object->method (i, ACE_TRY_ENV); ACE_TRY_CHECK; @@ -301,9 +306,12 @@ main (int argc, char **argv) } else { - ACE_DEBUG ((LM_DEBUG, - "client: Iteration %d @ %T\n", - i)); + if (TAO_debug_level > 0) + { + ACE_DEBUG ((LM_DEBUG, + "client: Iteration %d @ %T\n", + i)); + } // Invoke the oneway method. test_object->method (i, diff --git a/TAO/examples/Buffered_Oneways/test_i.cpp b/TAO/examples/Buffered_Oneways/test_i.cpp index 6e4e1ac1fe6..309927f16a5 100644 --- a/TAO/examples/Buffered_Oneways/test_i.cpp +++ b/TAO/examples/Buffered_Oneways/test_i.cpp @@ -14,9 +14,10 @@ test_i::method (CORBA::ULong request_number, CORBA::Environment &) ACE_THROW_SPEC (()) { - ACE_DEBUG ((LM_DEBUG, - "server: Iteration %d @ %T\n", - request_number)); + if (TAO_debug_level > 0) + ACE_DEBUG ((LM_DEBUG, + "server: Iteration %d @ %T\n", + request_number)); } void diff --git a/TAO/examples/POA/On_Demand_Loading/Servant_Manager.cpp b/TAO/examples/POA/On_Demand_Loading/Servant_Manager.cpp index 85876ce40eb..91d595fa7a3 100644 --- a/TAO/examples/POA/On_Demand_Loading/Servant_Manager.cpp +++ b/TAO/examples/POA/On_Demand_Loading/Servant_Manager.cpp @@ -57,8 +57,9 @@ ServantManager_i::obtain_servant (const char *str, PortableServer::ObjectId_var oid = PortableServer::string_to_ObjectId (str); - ACE_DEBUG ((LM_DEBUG, - "before bind\n")); + if (TAO_debug_level > 0) + ACE_DEBUG ((LM_DEBUG, + "before bind\n")); // Make an HASH_MAP entry by binding the object_id and the DLL // object associated with it together. if (this->servant_map_.bind (oid.in (), @@ -125,10 +126,11 @@ ServantManager_i::parse_string (const char *s) // the location of ':'. this->create_symbol_ = str.substr (index + 1); - ACE_DEBUG ((LM_DEBUG, - "the servant dll:%s\n the factory_function:%s\n ", - this->dllname_.c_str (), - this->create_symbol_.c_str ())); + if (TAO_debug_level > 0) + ACE_DEBUG ((LM_DEBUG, + "the servant dll:%s\n the factory_function:%s\n ", + this->dllname_.c_str (), + this->create_symbol_.c_str ())); } // This method returns an ObjectId when given a DLL name and the diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Default_Factory.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_Default_Factory.cpp index 19b76136131..3b98e6f983d 100644 --- a/TAO/orbsvcs/orbsvcs/Event/EC_Default_Factory.cpp +++ b/TAO/orbsvcs/orbsvcs/Event/EC_Default_Factory.cpp @@ -494,6 +494,14 @@ TAO_EC_Default_Factory::init (int argc, char* argv[]) "unknown option <%s>\n", arg)); } + else + { + arg_shifter.consume_arg (); + ACE_DEBUG ((LM_DEBUG, + "EC_Default_Factory - " + "ignoring option <%s>\n", + arg)); + } } return 0; } diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_ProxySupplier.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_ProxySupplier.cpp index 597448f8baf..4bef08a72bb 100644 --- a/TAO/orbsvcs/orbsvcs/Event/EC_ProxySupplier.cpp +++ b/TAO/orbsvcs/orbsvcs/Event/EC_ProxySupplier.cpp @@ -253,7 +253,7 @@ TAO_EC_ProxyPushSupplier::connect_push_consumer ( ACE_CHECK; } - // A separate thread could have connected siomultaneously, + // A separate thread could have connected simultaneously, // this is probably an application error, handle it as // gracefully as possible if (this->is_connected_i ()) diff --git a/TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer_Driver.cpp b/TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer_Driver.cpp index c4cae1533d3..210e39c1421 100644 --- a/TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer_Driver.cpp +++ b/TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer_Driver.cpp @@ -65,20 +65,23 @@ ECT_Consumer_Driver::run (int argc, char* argv[]) if (this->parse_args (argc, argv)) return 1; - ACE_DEBUG ((LM_DEBUG, - "Execution parameters:\n" - " consumers = <%d>\n" - " suppliers = <%d>\n" - " type_start = <%d>\n" - " type count = <%d>\n" - " pid file name = <%s>\n", - - this->n_consumers_, - this->n_suppliers_, - this->type_start_, - this->type_start_, - - this->pid_file_name_?this->pid_file_name_:"nil") ); + if (TAO_debug_level > 0) + { + ACE_DEBUG ((LM_DEBUG, + "Execution parameters:\n" + " consumers = <%d>\n" + " suppliers = <%d>\n" + " type_start = <%d>\n" + " type count = <%d>\n" + " pid file name = <%s>\n", + + this->n_consumers_, + this->n_suppliers_, + this->type_start_, + this->type_start_, + + this->pid_file_name_?this->pid_file_name_:"nil") ); + } if (this->pid_file_name_ != 0) { diff --git a/TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier_Driver.cpp b/TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier_Driver.cpp index 018f2a10421..5e1f375215d 100644 --- a/TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier_Driver.cpp +++ b/TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier_Driver.cpp @@ -72,26 +72,29 @@ ECT_Supplier_Driver::run (int argc, char* argv[]) if (this->parse_args (argc, argv)) return 1; - ACE_DEBUG ((LM_DEBUG, - "Execution parameters:\n" - " suppliers = <%d>\n" - " burst count = <%d>\n" - " burst size = <%d>\n" - " event size = <%d>\n" - " burst pause = <%d>\n" - " type start = <%d>\n" - " type count = <%d>\n" - " pid file name = <%s>\n", - - this->n_suppliers_, - this->burst_count_, - this->burst_size_, - this->event_size_, - this->burst_pause_, - this->type_start_, - this->type_count_, - - this->pid_file_name_?this->pid_file_name_:"nil") ); + if (TAO_debug_level > 0) + { + ACE_DEBUG ((LM_DEBUG, + "Execution parameters:\n" + " suppliers = <%d>\n" + " burst count = <%d>\n" + " burst size = <%d>\n" + " event size = <%d>\n" + " burst pause = <%d>\n" + " type start = <%d>\n" + " type count = <%d>\n" + " pid file name = <%s>\n", + + this->n_suppliers_, + this->burst_count_, + this->burst_size_, + this->event_size_, + this->burst_pause_, + this->type_start_, + this->type_count_, + + this->pid_file_name_?this->pid_file_name_:"nil") ); + } if (this->pid_file_name_ != 0) { diff --git a/TAO/orbsvcs/tests/EC_Throughput/ECT_Throughput.cpp b/TAO/orbsvcs/tests/EC_Throughput/ECT_Throughput.cpp index d96d602e3e2..72a4f93314c 100644 --- a/TAO/orbsvcs/tests/EC_Throughput/ECT_Throughput.cpp +++ b/TAO/orbsvcs/tests/EC_Throughput/ECT_Throughput.cpp @@ -91,43 +91,46 @@ ECT_Throughput::run (int argc, char* argv[]) if (this->parse_args (argc, argv)) return 1; - ACE_DEBUG ((LM_DEBUG, - "Execution parameters:\n" - " consumers = <%d>\n" - " suppliers = <%d>\n" - " burst count = <%d>\n" - " burst size = <%d>\n" - " event size = <%d>\n" - " burst pause = <%d>\n" - " consumer type start = <%d>\n" - " consumer type count = <%d>\n" - " consumer type shift = <%d>\n" - " supplier type start = <%d>\n" - " supplier type count = <%d>\n" - " supplier type shift = <%d>\n" - " pid file name = <%s>\n" - " reactive EC = <%d>\n" - " new EC = <%d>\n" - " concurrency HWM = <%d>\n", - - this->n_consumers_, - this->n_suppliers_, - this->burst_count_, - this->burst_size_, - this->event_size_, - this->burst_pause_, - this->consumer_type_start_, - this->consumer_type_count_, - this->consumer_type_shift_, - this->supplier_type_start_, - this->supplier_type_count_, - this->supplier_type_shift_, - - this->pid_file_name_?this->pid_file_name_:"nil", - this->reactive_ec_, - this->new_ec_, - this->ec_concurrency_hwm_ - ) ); + if (TAO_debug_level > 0) + { + ACE_DEBUG ((LM_DEBUG, + "Execution parameters:\n" + " consumers = <%d>\n" + " suppliers = <%d>\n" + " burst count = <%d>\n" + " burst size = <%d>\n" + " event size = <%d>\n" + " burst pause = <%d>\n" + " consumer type start = <%d>\n" + " consumer type count = <%d>\n" + " consumer type shift = <%d>\n" + " supplier type start = <%d>\n" + " supplier type count = <%d>\n" + " supplier type shift = <%d>\n" + " pid file name = <%s>\n" + " reactive EC = <%d>\n" + " new EC = <%d>\n" + " concurrency HWM = <%d>\n", + + this->n_consumers_, + this->n_suppliers_, + this->burst_count_, + this->burst_size_, + this->event_size_, + this->burst_pause_, + this->consumer_type_start_, + this->consumer_type_count_, + this->consumer_type_shift_, + this->supplier_type_start_, + this->supplier_type_count_, + this->supplier_type_shift_, + + this->pid_file_name_?this->pid_file_name_:"nil", + this->reactive_ec_, + this->new_ec_, + this->ec_concurrency_hwm_ + ) ); + } if (this->pid_file_name_ != 0) { diff --git a/TAO/orbsvcs/tests/Event/Basic/Observer.cpp b/TAO/orbsvcs/tests/Event/Basic/Observer.cpp index 7a300f84ee0..24ece495ece 100644 --- a/TAO/orbsvcs/tests/Event/Basic/Observer.cpp +++ b/TAO/orbsvcs/tests/Event/Basic/Observer.cpp @@ -335,7 +335,27 @@ void EC_Observer::dump_results (void) { ACE_DEBUG ((LM_DEBUG, "===== Results for %d =====\n", this->id_)); - this->EC_Driver::dump_results (); + + ACE_Throughput_Stats throughput; + ACE_UINT32 gsf = ACE_High_Res_Timer::global_scale_factor (); + char buf[BUFSIZ]; + for (int j = 0; j < this->n_consumers_; ++j) + { + this->consumers_[j]->accumulate (throughput); + } + ACE_DEBUG ((LM_DEBUG, "\n")); + + ACE_Throughput_Stats suppliers; + for (int i = 0; i < this->n_suppliers_; ++i) + { + this->suppliers_[i]->accumulate (suppliers); + } + + ACE_DEBUG ((LM_DEBUG, "\nTotals:\n")); + throughput.dump_results ("EC_Consumer/totals", gsf); + + ACE_DEBUG ((LM_DEBUG, "\n")); + suppliers.dump_results ("EC_Supplier/totals", gsf); } void diff --git a/TAO/orbsvcs/tests/Event/Basic/Random.cpp b/TAO/orbsvcs/tests/Event/Basic/Random.cpp index 9b677aa14b5..b5498615ca0 100644 --- a/TAO/orbsvcs/tests/Event/Basic/Random.cpp +++ b/TAO/orbsvcs/tests/Event/Basic/Random.cpp @@ -37,9 +37,11 @@ deactivate_servant (PortableServer::Servant servant, RND_Driver::RND_Driver (void) : timer_ (this), + supplier_ (0), nsuppliers_ (4), nconsumers_ (4), - max_recursion_ (1) + max_recursion_ (1), + verbose_ (0) { TAO_EC_Default_Factory::init_svcs (); } @@ -101,6 +103,12 @@ RND_Driver::run (int argc, char *argv[]) arg_shifter.consume_arg (); } } + else if (ACE_OS::strcasecmp (arg, "-verbose") == 0) + { + arg_shifter.consume_arg (); + + this->verbose_ = 1; + } else arg_shifter.ignore_arg (); } @@ -205,7 +213,7 @@ RND_Driver::run (int argc, char *argv[]) for (int j = 0; j != this->nsuppliers_; ++j) { ACE_NEW_RETURN (this->suppliers_[j], - RND_Supplier, + RND_Supplier (this->verbose_), 1); this->suppliers_[j]->activate (); @@ -553,7 +561,8 @@ RND_Supplier::svc (void) { } ACE_ENDTRY; - if (i * 100 / niterations >= percent) + if (this->verbose_ + && i * 100 / niterations >= percent) { ACE_DEBUG ((LM_DEBUG, "Thread %t %d%%\n", percent)); percent += 10; diff --git a/TAO/orbsvcs/tests/Event/Basic/Random.h b/TAO/orbsvcs/tests/Event/Basic/Random.h index 54fb8518cfe..ee3b72d351d 100644 --- a/TAO/orbsvcs/tests/Event/Basic/Random.h +++ b/TAO/orbsvcs/tests/Event/Basic/Random.h @@ -106,7 +106,7 @@ class RND_Supplier // = DESCRIPTION // public: - RND_Supplier (void); + RND_Supplier (int verbose); // Constructor void connect (RtecEventChannelAdmin::SupplierAdmin_ptr admin, @@ -131,10 +131,14 @@ private: ACE_SYNCH_MUTEX lock_; // Synch + + int verbose_; + // Be verbose about the progress of the test }; inline -RND_Supplier::RND_Supplier (void) +RND_Supplier::RND_Supplier (int verbose) + : verbose_ (verbose) { } @@ -182,6 +186,9 @@ private: int max_recursion_; // Maximum recursion + int verbose_; + // Be verbose about the progress of the test + RtecEventChannelAdmin::ConsumerAdmin_var consumer_admin_; RtecEventChannelAdmin::SupplierAdmin_var supplier_admin_; }; diff --git a/TAO/orbsvcs/tests/Event/Basic/Shutdown.cpp b/TAO/orbsvcs/tests/Event/Basic/Shutdown.cpp index a48b369219d..d61b2bdc526 100644 --- a/TAO/orbsvcs/tests/Event/Basic/Shutdown.cpp +++ b/TAO/orbsvcs/tests/Event/Basic/Shutdown.cpp @@ -16,6 +16,8 @@ main (int argc, char *argv []) // **************************************************************** EC_Shutdown::EC_Shutdown (void) + : consumer_disconnects_ (0), + supplier_disconnects_ (0) { } @@ -57,20 +59,33 @@ EC_Shutdown::execute_test (CORBA::Environment& ACE_TRY_ENV) void EC_Shutdown::dump_results (void) { + if (this->consumer_disconnects_ != this->n_consumers_) + ACE_ERROR ((LM_ERROR, + "Unexpected number (%d) of consumers disconnected\n", + this->consumer_disconnects_)); + + if (this->supplier_disconnects_ != this->n_suppliers_) + ACE_ERROR ((LM_ERROR, + "Unexpected number (%d) of suppliers disconnected\n", + this->supplier_disconnects_)); } void EC_Shutdown::consumer_disconnect (void* cookie, CORBA::Environment&) { - ACE_DEBUG ((LM_DEBUG, "Consumer %x has been disconnected\n", cookie)); + this->consumer_disconnects_++; + if (this->verbose ()) + ACE_DEBUG ((LM_DEBUG, "Consumer %x has been disconnected\n", cookie)); } void EC_Shutdown::supplier_disconnect (void* cookie, CORBA::Environment&) { - ACE_DEBUG ((LM_DEBUG, "Supplier %x has been disconnected\n", cookie)); + this->supplier_disconnects_++; + if (this->verbose ()) + ACE_DEBUG ((LM_DEBUG, "Supplier %x has been disconnected\n", cookie)); } diff --git a/TAO/orbsvcs/tests/Event/Basic/Shutdown.h b/TAO/orbsvcs/tests/Event/Basic/Shutdown.h index 0da5b0b5a38..b7d1e573d3f 100644 --- a/TAO/orbsvcs/tests/Event/Basic/Shutdown.h +++ b/TAO/orbsvcs/tests/Event/Basic/Shutdown.h @@ -55,6 +55,9 @@ public: private: + int consumer_disconnects_; + int supplier_disconnects_; + // Number of consumer and supplier disconnect messages. }; #endif /* EC_SHUTDOWN_H */ diff --git a/TAO/orbsvcs/tests/Event/Basic/run_test.pl b/TAO/orbsvcs/tests/Event/Basic/run_test.pl index 7be2c926b05..591cb5a51fd 100755 --- a/TAO/orbsvcs/tests/Event/Basic/run_test.pl +++ b/TAO/orbsvcs/tests/Event/Basic/run_test.pl @@ -39,7 +39,7 @@ if ($T->TimedWait (60) == -1) { print STDERR "\n\nShutdown EC with clients still attached\n"; $T = Process::Create ($EXEPREFIX . "Shutdown".$EXE_EXT, - " -verbose -suppliers 5 -consumers 5"); + " -suppliers 5 -consumers 5"); if ($T->TimedWait (60) == -1) { print STDERR "ERROR: Test timedout\n"; $status = 1; diff --git a/TAO/orbsvcs/tests/Trading/TT_Info.cpp b/TAO/orbsvcs/tests/Trading/TT_Info.cpp index 6a7bbb1d893..5429f5dd272 100644 --- a/TAO/orbsvcs/tests/Trading/TT_Info.cpp +++ b/TAO/orbsvcs/tests/Trading/TT_Info.cpp @@ -318,7 +318,11 @@ TT_Parse_Args::TT_Parse_Args (int& argc, char** argv) ACE_ERROR ((LM_ERROR, "Couldn't load ior.\n")); } else - arg_shifter.ignore_arg (); + { + ACE_DEBUG ((LM_DEBUG, "Ignoring argument <%s>\n", + current_arg)); + arg_shifter.consume_arg (); + } } } diff --git a/TAO/orbsvcs/tests/Trading/run_test.pl b/TAO/orbsvcs/tests/Trading/run_test.pl index 9558f2fa6ca..e557bdb3ddc 100755 --- a/TAO/orbsvcs/tests/Trading/run_test.pl +++ b/TAO/orbsvcs/tests/Trading/run_test.pl @@ -34,7 +34,8 @@ if (ACE::waitforfile_timed ($ior, $sleeptime) == -1) { } $E = Process::Create ($EXEPREFIX."export_test".$EXE_EXT, - "-ORBInitRef TradingService=file://$ior"); + "-ORBInitRef TradingService=file://$ior" + . " -quiet"); if (ACE::waitforfile_timed ($ready_file, 120) == -1) { print STDERR "ERROR: waiting for the export test to finish\n"; @@ -44,7 +45,8 @@ if (ACE::waitforfile_timed ($ready_file, 120) == -1) { } $I = Process::Create ($EXEPREFIX."import_test".$EXE_EXT, - "-ORBInitRef TradingService=file://$ior"); + "-ORBInitRef TradingService=file://$ior" + . " -quiet"); if ($I->TimedWait (60) == -1) { $status = 1; diff --git a/TAO/performance-tests/Cubit/TAO/IDL_Cubit/Cubit_Client.cpp b/TAO/performance-tests/Cubit/TAO/IDL_Cubit/Cubit_Client.cpp index b6a5d888505..bf6d56b8a6d 100644 --- a/TAO/performance-tests/Cubit/TAO/IDL_Cubit/Cubit_Client.cpp +++ b/TAO/performance-tests/Cubit/TAO/IDL_Cubit/Cubit_Client.cpp @@ -147,6 +147,7 @@ Cubit_Client::Cubit_Client (int shutdown) : cubit_factory_key_ (0), loop_count_ (250), shutdown_ (shutdown), + quiet_ (0), cubit_ (Cubit::_nil ()), call_count_ (0), error_count_ (0), @@ -206,7 +207,7 @@ Cubit_Client::read_ior (const char *filename) int Cubit_Client::parse_args (void) { - ACE_Get_Opt get_opts (argc_, argv_, "b:t:z:ovdn:f:k:xs"); + ACE_Get_Opt get_opts (argc_, argv_, "b:t:z:ovdn:f:k:xsq"); int c = 0; int result = 0; unsigned int test_mask = 0; @@ -283,6 +284,9 @@ Cubit_Client::parse_args (void) ACE_DEBUG ((LM_DEBUG, "We will shutdown the server\n")); this->shutdown_ = 1; break; + case 'q': + this->quiet_ = 1; + break; case '?': default: ACE_ERROR_RETURN ((LM_ERROR, @@ -1149,39 +1153,51 @@ Cubit_Client::print_stats (const char *call_name, "%s:\n", call_name)); - if (this->call_count_ > 0 && this->error_count_ == 0) + if (this->quiet_) + { + return; + } + + if (!this->quiet_) { + if (this->call_count_ > 0 && this->error_count_ == 0) + { #if defined (ACE_LACKS_FLOATING_POINT) - // elapsed_time.real_time is in units of microseconds. - const u_int calls_per_sec = - this->call_count_ * 1000000u / elapsed_time.real_time; + // elapsed_time.real_time is in units of microseconds. + const u_int calls_per_sec = + this->call_count_ * 1000000u / elapsed_time.real_time; - ACE_DEBUG ((LM_DEBUG, - "\treal_time\t= %u ms,\n" - "\t%u calls/second\n", - elapsed_time.real_time / 1000u, - calls_per_sec)); + ACE_DEBUG ((LM_DEBUG, + "\treal_time\t= %u ms,\n" + "\t%u calls/second\n", + elapsed_time.real_time / 1000u, + calls_per_sec)); #else /* ! ACE_LACKS_FLOATING_POINT */ - // elapsed_time.real_time is in units of seconds. - double calls_per_sec = this->call_count_ / elapsed_time.real_time; + // elapsed_time.real_time is in units of seconds. + double calls_per_sec = + this->call_count_ / elapsed_time.real_time; - ACE_DEBUG ((LM_DEBUG, - "\treal_time\t= %0.06f ms, \n\t" - "user_time\t= %0.06f ms, \n\t" - "system_time\t= %0.06f ms\n" - "\t%0.00f calls/second\n", - elapsed_time.real_time < 0.0 ? 0.0 - : elapsed_time.real_time * ACE_ONE_SECOND_IN_MSECS, - elapsed_time.user_time < 0.0 ? 0.0 - : elapsed_time.user_time * ACE_ONE_SECOND_IN_MSECS, - elapsed_time.system_time < 0.0 ? 0.0 - : elapsed_time.system_time * ACE_ONE_SECOND_IN_MSECS, - calls_per_sec < 0.0 ? 0.0 : calls_per_sec)); + ACE_DEBUG ((LM_DEBUG, + "\treal_time\t= %0.06f ms, \n\t" + "user_time\t= %0.06f ms, \n\t" + "system_time\t= %0.06f ms\n" + "\t%0.00f calls/second\n", + elapsed_time.real_time < 0.0 ? 0.0 + : elapsed_time.real_time * ACE_ONE_SECOND_IN_MSECS, + elapsed_time.user_time < 0.0 ? 0.0 + : elapsed_time.user_time * ACE_ONE_SECOND_IN_MSECS, + elapsed_time.system_time < 0.0 ? 0.0 + : elapsed_time.system_time * ACE_ONE_SECOND_IN_MSECS, + calls_per_sec < 0.0 ? 0.0 : calls_per_sec)); #endif /* ! ACE_LACKS_FLOATING_POINT */ + } + else + { + ACE_ERROR ((LM_ERROR, + "\tNo time stats printed." + " Call count zero or error ocurred.\n")); + } } - else - ACE_ERROR ((LM_ERROR, - "\tNo time stats printed. Call count zero or error ocurred.\n")); ACE_DEBUG ((LM_DEBUG, "\t%d calls, %d errors\n", diff --git a/TAO/performance-tests/Cubit/TAO/IDL_Cubit/Cubit_Client.h b/TAO/performance-tests/Cubit/TAO/IDL_Cubit/Cubit_Client.h index c62d26fa5e4..5899ad7c74d 100644 --- a/TAO/performance-tests/Cubit/TAO/IDL_Cubit/Cubit_Client.h +++ b/TAO/performance-tests/Cubit/TAO/IDL_Cubit/Cubit_Client.h @@ -152,6 +152,9 @@ private: int shutdown_; // Flag to tell server to shutdown. + int quiet_; + // If set the test goes into quiet mode + CORBA::ORB_var orb_; // Remember our orb, must show up before the other objects to // shutdown in the proper order. diff --git a/TAO/performance-tests/Cubit/TAO/IDL_Cubit/run_test.pl b/TAO/performance-tests/Cubit/TAO/IDL_Cubit/run_test.pl index 822fb5d6482..3a7388e5fd2 100755 --- a/TAO/performance-tests/Cubit/TAO/IDL_Cubit/run_test.pl +++ b/TAO/performance-tests/Cubit/TAO/IDL_Cubit/run_test.pl @@ -22,6 +22,7 @@ $svnsflags = " -f $iorfile"; $clnsflags = " -f $iorfile"; $clflags = ""; $svflags = ""; +$quietflag = "-q"; $liteflag = ""; $svliteflag = ""; $clliteflag = ""; @@ -33,7 +34,8 @@ for ($i = 0; $i <= $#ARGV; $i++) { if ($ARGV[$i] eq "-h" || $ARGV[$i] eq "-?") { - print "run_test [-h] [-n num] [-sleeptime t] [-debug] [-release] [-orblite]\n"; + print "run_test [-h] [-n num] [-sleeptime t]", + " [-debug] [-release] [-orblite] [-verbose]\n"; print "\n"; print "-h -- prints this information\n"; print "-n num -- client uses <num> iterations\n"; @@ -72,6 +74,11 @@ for ($i = 0; $i <= $#ARGV; $i++) $liteflag = "uselite"; last SWITCH; } + if ($ARGV[$i] eq "-verbose") + { + $quietflag = ""; + last SWITCH; + } print "run_test: Unknown Option: ".$ARGV[$i]."\n"; } } @@ -105,7 +112,7 @@ if (ACE::waitforfile_timed ($iorfile, 10) == -1) { } $CL = Process::Create ($exepref . "client".$EXE_EXT, - " $clflags $clnsflags $clliteflag -x"); + " $quietflag $clflags $clnsflags $clliteflag -x"); $client = $CL->TimedWait (120); if ($client == -1) { @@ -169,7 +176,7 @@ if ($OSNAME ne "MSWin32") } $CL = Process::Create ($exepref . "client".$EXE_EXT, - " $clflags $clnsflags $clliteflag -x"); + " $quietflag $clflags $clnsflags $clliteflag -x"); $client = $CL->TimedWait (120); if ($client == -1) { @@ -228,7 +235,7 @@ if (ACE::waitforfile_timed ($iorfile, 10) == -1) { } $CL = Process::Create ($exepref . "client".$EXE_EXT, - " $clflags $clnsflags -x"); + " $quietflag $clflags $clnsflags -x"); $client = $CL->TimedWait (120); if ($client == -1) { diff --git a/TAO/tests/CDR/alignment.cpp b/TAO/tests/CDR/alignment.cpp index c7b0a6059e2..4ded313e558 100644 --- a/TAO/tests/CDR/alignment.cpp +++ b/TAO/tests/CDR/alignment.cpp @@ -43,7 +43,7 @@ int main(int, char*[]) CORBA::ULong len; input.read_ulong (len); - + if (len != i) { ACE_DEBUG ((LM_DEBUG, @@ -51,7 +51,7 @@ int main(int, char*[]) " got %d, expected %d\n", len, i)); } - + ACE_Message_Block read_mb (len + ACE_CDR::MAX_ALIGNMENT); ACE_CDR::mb_align (&mb); mb.wr_ptr (len); diff --git a/TAO/tests/CDR/allocator.cpp b/TAO/tests/CDR/allocator.cpp index aebfd317fb4..94a8fb759e8 100644 --- a/TAO/tests/CDR/allocator.cpp +++ b/TAO/tests/CDR/allocator.cpp @@ -76,9 +76,10 @@ main (int argc, char *argv[]) int max_fragment_size = 1024; int max_arguments = 16; int max_argument_size = 1024; + int quiet = 0; ACE_RANDR_TYPE seed = time(0); - ACE_Get_Opt get_opt (argc, argv, "tn:f:m:s:a:b:r:"); + ACE_Get_Opt get_opt (argc, argv, "tn:f:m:s:a:b:r:q"); int opt; while ((opt = get_opt ()) != EOF) @@ -109,6 +110,9 @@ main (int argc, char *argv[]) case 'b': max_argument_size = ACE_OS::atoi (get_opt.optarg); break; + case 'q': + quiet = 1; + break; case '?': default: ACE_DEBUG ((LM_DEBUG, @@ -183,8 +187,10 @@ main (int argc, char *argv[]) usecs *= ACE_static_cast (ACE_UINT32, ACE_ONE_SECOND_IN_USECS); usecs += tv.usec (); double average = ACE_U64_TO_U32(usecs) / repeat; - ACE_OS::printf ("AVE: %d %f\n", - i, average); + + if (!quiet) + ACE_OS::printf ("AVE: %d %f\n", + i, average); } return 0; diff --git a/TAO/tests/CDR/basic_types.cpp b/TAO/tests/CDR/basic_types.cpp index 340152b1098..5e7e790cc7a 100644 --- a/TAO/tests/CDR/basic_types.cpp +++ b/TAO/tests/CDR/basic_types.cpp @@ -94,7 +94,7 @@ test_put (TAO_OutputCDR &cdr, CDR_Test_Types &test_types) i), 1); #endif - if (cdr << test_types.any) + if (!(cdr << test_types.any)) ACE_ERROR_RETURN ((LM_ERROR, "encode Any [%d] failed\n", i), diff --git a/TAO/tests/CDR/growth.cpp b/TAO/tests/CDR/growth.cpp index 80dd5518eef..ee95907335b 100644 --- a/TAO/tests/CDR/growth.cpp +++ b/TAO/tests/CDR/growth.cpp @@ -66,8 +66,9 @@ main (int argc, char *argv[]) int low = 64; int hi = 4096; int s = 4; + int quiet = 0; - ACE_Get_Opt get_opt (argc, argv, "dn:l:h:s:"); + ACE_Get_Opt get_opt (argc, argv, "dn:l:h:s:q"); int opt; while ((opt = get_opt ()) != EOF) @@ -89,6 +90,9 @@ main (int argc, char *argv[]) case 's': s = ACE_OS::atoi (get_opt.optarg); break; + case 'q': + quiet = 1; + break; case '?': default: ACE_DEBUG ((LM_DEBUG, @@ -151,8 +155,9 @@ main (int argc, char *argv[]) double write_average = ACE_U64_TO_U32(wusecs) / m; double read_average = ACE_U64_TO_U32(rusecs) / m; - ACE_OS::printf ("AVE: %d %f %f\n", - x, write_average, read_average); + if (!quiet) + ACE_OS::printf ("AVE: %d %f %f\n", + x, write_average, read_average); } return 0; } diff --git a/TAO/tests/CDR/run_test.pl b/TAO/tests/CDR/run_test.pl index 12472be6ec6..0e5ff81a79c 100755 --- a/TAO/tests/CDR/run_test.pl +++ b/TAO/tests/CDR/run_test.pl @@ -12,9 +12,9 @@ use Cwd; $brace="\#\#\#\#\#"; %tests = ("basic_types" => "-n 256 -l 10", "tc" => "", - "growth" => "-l 64 -h 256 -s 4 -n 10", + "growth" => "-l 64 -h 256 -s 4 -n 10 -q", "alignment" => "", - "allocator" => ""); + "allocator" => "-q"); $test = ""; $args = ""; $| = 1; @@ -25,7 +25,7 @@ ACE::checkForTarget(getcwd()); sub run_test { #my $test = shift (@tests); - my $args = shift (@argslist); + #my $args = shift (@argslist); print STDERR "\n$brace $test $args test BEGUN\n"; $TST = Process::Create ($EXEPREFIX."$test".$EXE_EXT, diff --git a/TAO/tests/CDR/tc.cpp b/TAO/tests/CDR/tc.cpp index 942994a94f6..6a286d714af 100644 --- a/TAO/tests/CDR/tc.cpp +++ b/TAO/tests/CDR/tc.cpp @@ -123,24 +123,30 @@ main (int argc, char *argv[]) CORBA::ULong length = 0; // tc->length (TAO_TRY_ENV); - // ACE_TRY_CHECK; + // ACE_TRY_CHECK; - ACE_DEBUG ((LM_DEBUG, - "ID = '%s'\n" - "%{%{ NAME = %s%$" - " KIND = %d%$" - " LENGTH = %d" - "%}%}\n", - (id?id:"empty ID"), - (name?name:"empty name"), - k, - length)); + if (TAO_debug_level > 0) + { + ACE_DEBUG ((LM_DEBUG, + "ID = '%s'\n" + "%{%{ NAME = %s%$" + " KIND = %d%$" + " LENGTH = %d" + "%}%}\n", + (id?id:"empty ID"), + (name?name:"empty name"), + k, + length)); + } break; } default: - ACE_DEBUG ((LM_DEBUG, - "basic type: %d\n", - k)); + if (TAO_debug_level > 0) + { + ACE_DEBUG ((LM_DEBUG, + "basic type: %d\n", + k)); + } break; } } diff --git a/TAO/tests/DSI_Gateway/client.cpp b/TAO/tests/DSI_Gateway/client.cpp index ad69b0eb914..a002aea05af 100644 --- a/TAO/tests/DSI_Gateway/client.cpp +++ b/TAO/tests/DSI_Gateway/client.cpp @@ -75,7 +75,7 @@ main (int argc, char *argv[]) Structure the_in_structure; the_in_structure.seq.length (10); - + for (int i = 0; i != niterations; ++i) { the_in_structure.i = i; @@ -91,16 +91,19 @@ main (int argc, char *argv[]) ACE_TRY_ENV); ACE_TRY_CHECK; - ACE_DEBUG ((LM_DEBUG, - "DSI_Simpler_Server ====\n" - " x = %d\n" - " i = %d\n" - " length = %d\n" - " name = <%s>\n", - r, - the_out_structure->i, - the_out_structure->seq.length (), - name.in ())); + if (TAO_debug_level > 0) + { + ACE_DEBUG ((LM_DEBUG, + "DSI_Simpler_Server ====\n" + " x = %d\n" + " i = %d\n" + " length = %d\n" + " name = <%s>\n", + r, + the_out_structure->i, + the_out_structure->seq.length (), + name.in ())); + } if (r != i) { diff --git a/TAO/tests/DSI_Gateway/test_i.cpp b/TAO/tests/DSI_Gateway/test_i.cpp index 520cd3c79de..1597da38608 100644 --- a/TAO/tests/DSI_Gateway/test_i.cpp +++ b/TAO/tests/DSI_Gateway/test_i.cpp @@ -20,16 +20,19 @@ Simple_Server_i::test_method (CORBA::Long x, ACE_NEW_RETURN (tmp, Structure (the_in_structure), -1); the_out_structure = tmp; - ACE_DEBUG ((LM_DEBUG, - "Simpler_Server_i ====\n" - " x = %d\n" - " i = %d\n" - " length = %d\n" - " name = <%s>\n", - x, - the_in_structure.i, - the_in_structure.seq.length (), - name)); + if (TAO_debug_level > 0) + { + ACE_DEBUG ((LM_DEBUG, + "Simpler_Server_i ====\n" + " x = %d\n" + " i = %d\n" + " length = %d\n" + " name = <%s>\n", + x, + the_in_structure.i, + the_in_structure.seq.length (), + name)); + } return x; } diff --git a/TAO/tests/Faults/ping_i.cpp b/TAO/tests/Faults/ping_i.cpp index e5654905e4f..ec8e6b64105 100644 --- a/TAO/tests/Faults/ping_i.cpp +++ b/TAO/tests/Faults/ping_i.cpp @@ -13,7 +13,6 @@ PingObject_i::ping (PingObject_ptr callback, CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { - ACE_DEBUG ((LM_DEBUG, "PingObject_i::ping (%P|%t)\n")); callback->pong (ACE_TRY_ENV); } @@ -21,7 +20,6 @@ void PingObject_i::pong (CORBA::Environment &) ACE_THROW_SPEC ((CORBA::SystemException)) { - ACE_DEBUG ((LM_DEBUG, "PingObject_i::pong (%P|%t)\n")); } void diff --git a/TAO/tests/Faults/pong.cpp b/TAO/tests/Faults/pong.cpp index 18fbafd2d52..c6a77b4a2c4 100644 --- a/TAO/tests/Faults/pong.cpp +++ b/TAO/tests/Faults/pong.cpp @@ -87,7 +87,8 @@ run_client (CORBA::ORB_ptr orb, } ACE_CATCH (CORBA::TRANSIENT, t) { - ACE_DEBUG ((LM_DEBUG, "Ignoring transient exception\n")); + if (TAO_debug_level > 0) + ACE_DEBUG ((LM_DEBUG, "Ignoring transient exception\n")); // ACE_PRINT_EXCEPTION (t, reason); ACE_OS::sleep (tv); } diff --git a/TAO/tests/MT_Server/test_i.cpp b/TAO/tests/MT_Server/test_i.cpp index 862c316b5dc..b0a607fdafe 100644 --- a/TAO/tests/MT_Server/test_i.cpp +++ b/TAO/tests/MT_Server/test_i.cpp @@ -12,7 +12,8 @@ CORBA::Long Simple_Server_i::test_method (CORBA::Long x, CORBA::Environment&) ACE_THROW_SPEC (()) { - ACE_DEBUG ((LM_DEBUG, "Request in thread %t\n")); + if (TAO_debug_level > 0) + ACE_DEBUG ((LM_DEBUG, "Request in thread %t\n")); ACE_Time_Value tv (0, 15000); ACE_OS::sleep (tv); return x; diff --git a/TAO/tests/POA/Identity/Identity.cpp b/TAO/tests/POA/Identity/Identity.cpp index 57913c03d45..a0492b10b97 100644 --- a/TAO/tests/POA/Identity/Identity.cpp +++ b/TAO/tests/POA/Identity/Identity.cpp @@ -147,7 +147,8 @@ test_poas (CORBA::ORB_ptr orb, ACE_TRY_ENV); ACE_CHECK; - ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ())); + if (TAO_debug_level > 0) + ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ())); PortableServer::ObjectId_var id = root_poa->reference_to_id (obj.in (), ACE_TRY_ENV); @@ -166,7 +167,8 @@ test_poas (CORBA::ORB_ptr orb, ACE_TRY_ENV); ACE_CHECK; - ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ())); + if (TAO_debug_level > 0) + ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ())); PortableServer::Servant servant_from_reference = root_poa->reference_to_servant (obj.in (), ACE_TRY_ENV); @@ -188,7 +190,8 @@ test_poas (CORBA::ORB_ptr orb, ACE_TRY_ENV); ACE_CHECK; - ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ())); + if (TAO_debug_level > 0) + ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ())); obj = servant._this (ACE_TRY_ENV); ACE_CHECK; @@ -197,7 +200,8 @@ test_poas (CORBA::ORB_ptr orb, ACE_TRY_ENV); ACE_CHECK; - ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ())); + if (TAO_debug_level > 0) + ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ())); PortableServer::ObjectId_var id_from_servant = root_poa->servant_to_id (&servant, ACE_TRY_ENV); @@ -243,7 +247,8 @@ test_poas (CORBA::ORB_ptr orb, ACE_TRY_ENV); ACE_CHECK; - ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ())); + if (TAO_debug_level > 0) + ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ())); obj = root_poa->create_reference_with_id (id.in (), "IDL:test:1.0", @@ -254,7 +259,8 @@ test_poas (CORBA::ORB_ptr orb, ACE_TRY_ENV); ACE_CHECK; - ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ())); + if (TAO_debug_level > 0) + ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ())); root_poa->deactivate_object (id.in (), ACE_TRY_ENV); @@ -272,7 +278,8 @@ test_poas (CORBA::ORB_ptr orb, ACE_TRY_ENV); ACE_CHECK; - ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ())); + if (TAO_debug_level > 0) + ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ())); PortableServer::ObjectId_var id = first_poa->reference_to_id (obj.in (), ACE_TRY_ENV); @@ -291,7 +298,8 @@ test_poas (CORBA::ORB_ptr orb, ACE_TRY_ENV); ACE_CHECK; - ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ())); + if (TAO_debug_level > 0) + ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ())); PortableServer::Servant servant_from_reference = first_poa->reference_to_servant (obj.in (), ACE_TRY_ENV); @@ -343,7 +351,8 @@ test_poas (CORBA::ORB_ptr orb, ACE_TRY_ENV); ACE_CHECK; - ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ())); + if (TAO_debug_level > 0) + ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ())); obj = first_poa->create_reference_with_id (id.in (), "IDL:test:1.0", @@ -354,7 +363,8 @@ test_poas (CORBA::ORB_ptr orb, ACE_TRY_ENV); ACE_CHECK; - ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ())); + if (TAO_debug_level > 0) + ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ())); first_poa->deactivate_object (id.in (), ACE_TRY_ENV); @@ -372,7 +382,8 @@ test_poas (CORBA::ORB_ptr orb, ACE_TRY_ENV); ACE_CHECK; - ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ())); + if (TAO_debug_level > 0) + ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ())); PortableServer::ObjectId_var id = second_poa->reference_to_id (obj.in (), ACE_TRY_ENV); @@ -391,7 +402,8 @@ test_poas (CORBA::ORB_ptr orb, ACE_TRY_ENV); ACE_CHECK; - ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ())); + if (TAO_debug_level > 0) + ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ())); PortableServer::Servant servant_from_reference = second_poa->reference_to_servant (obj.in (), ACE_TRY_ENV); @@ -413,7 +425,8 @@ test_poas (CORBA::ORB_ptr orb, ACE_TRY_ENV); ACE_CHECK; - ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ())); + if (TAO_debug_level > 0) + ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ())); obj = servant._this (ACE_TRY_ENV); ACE_CHECK; @@ -422,7 +435,8 @@ test_poas (CORBA::ORB_ptr orb, ACE_TRY_ENV); ACE_CHECK; - ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ())); + if (TAO_debug_level > 0) + ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ())); PortableServer::ObjectId_var id_from_servant = second_poa->servant_to_id (&servant, ACE_TRY_ENV); @@ -468,7 +482,8 @@ test_poas (CORBA::ORB_ptr orb, ACE_TRY_ENV); ACE_CHECK; - ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ())); + if (TAO_debug_level > 0) + ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ())); obj = second_poa->create_reference_with_id (id.in (), "IDL:test:1.0", @@ -479,7 +494,8 @@ test_poas (CORBA::ORB_ptr orb, ACE_TRY_ENV); ACE_CHECK; - ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ())); + if (TAO_debug_level > 0) + ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ())); second_poa->deactivate_object (id.in (), ACE_TRY_ENV); @@ -499,14 +515,16 @@ test_poas (CORBA::ORB_ptr orb, ACE_TRY_ENV); ACE_CHECK; - ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ())); + if (TAO_debug_level > 0) + ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ())); PortableServer::ObjectId_var id_from_reference = third_poa->reference_to_id (obj.in (), ACE_TRY_ENV); ACE_CHECK; string = PortableServer::ObjectId_to_string (id_from_reference.in ()); - ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ())); + if (TAO_debug_level > 0) + ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ())); ACE_ASSERT (id_from_reference.in () == id.in ()); @@ -523,7 +541,8 @@ test_poas (CORBA::ORB_ptr orb, ACE_TRY_ENV); ACE_CHECK; - ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ())); + if (TAO_debug_level > 0) + ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ())); PortableServer::Servant servant_from_reference = third_poa->reference_to_servant (obj.in (), ACE_TRY_ENV); @@ -545,7 +564,8 @@ test_poas (CORBA::ORB_ptr orb, ACE_TRY_ENV); ACE_CHECK; - ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ())); + if (TAO_debug_level > 0) + ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ())); obj = servant._this (ACE_TRY_ENV); ACE_CHECK; @@ -554,14 +574,16 @@ test_poas (CORBA::ORB_ptr orb, ACE_TRY_ENV); ACE_CHECK; - ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ())); + if (TAO_debug_level > 0) + ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ())); PortableServer::ObjectId_var id_from_servant = third_poa->servant_to_id (&servant, ACE_TRY_ENV); ACE_CHECK; string = PortableServer::ObjectId_to_string (id_from_servant.in ()); - ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ())); + if (TAO_debug_level > 0) + ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ())); ACE_ASSERT (id_from_servant.in () == id.in ()); @@ -601,14 +623,16 @@ test_poas (CORBA::ORB_ptr orb, ACE_TRY_ENV); ACE_CHECK; - ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ())); + if (TAO_debug_level > 0) + ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ())); PortableServer::ObjectId_var id_from_reference = forth_poa->reference_to_id (obj.in (), ACE_TRY_ENV); ACE_CHECK; string = PortableServer::ObjectId_to_string (id_from_reference.in ()); - ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ())); + if (TAO_debug_level > 0) + ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ())); ACE_ASSERT (id_from_reference.in () == id.in ()); @@ -625,7 +649,8 @@ test_poas (CORBA::ORB_ptr orb, ACE_TRY_ENV); ACE_CHECK; - ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ())); + if (TAO_debug_level > 0) + ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ())); PortableServer::Servant servant_from_reference = forth_poa->reference_to_servant (obj.in (), ACE_TRY_ENV); diff --git a/TAO/tests/Timed_Buffered_Oneways/client.cpp b/TAO/tests/Timed_Buffered_Oneways/client.cpp index 5408e344779..1a0958266c6 100644 --- a/TAO/tests/Timed_Buffered_Oneways/client.cpp +++ b/TAO/tests/Timed_Buffered_Oneways/client.cpp @@ -285,11 +285,12 @@ main (int argc, char **argv) for (CORBA::ULong i = 1; i <= iterations; ++i) { - // Invoke the oneway method. - ACE_DEBUG ((LM_DEBUG, - "client: Iteration %d @ %T\n", - i)); + if (TAO_debug_level > 0) + ACE_DEBUG ((LM_DEBUG, + "client: Iteration %d @ %T\n", + i)); + // Invoke the oneway method. test_object->method (i, data, work, diff --git a/TAO/tests/Timed_Buffered_Oneways/test_i.cpp b/TAO/tests/Timed_Buffered_Oneways/test_i.cpp index 8e7b52af773..48914b823c0 100644 --- a/TAO/tests/Timed_Buffered_Oneways/test_i.cpp +++ b/TAO/tests/Timed_Buffered_Oneways/test_i.cpp @@ -16,9 +16,10 @@ test_i::method (CORBA::ULong request_number, CORBA::Environment &) ACE_THROW_SPEC (()) { - ACE_DEBUG ((LM_DEBUG, - "server: Iteration %d @ %T\n", - request_number)); + if (TAO_debug_level > 0) + ACE_DEBUG ((LM_DEBUG, + "server: Iteration %d @ %T\n", + request_number)); // Time required to process this request. <work> is time units in // milli seconds. |