From 57ac037347ce7a2bdc559ea33f35d15e57a1200f Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Wed, 21 Jul 2021 11:21:24 +0200 Subject: %C is for logging ascii strings * TAO/tests/Param_Test/any.cpp: * TAO/tests/Param_Test/except.cpp: * TAO/tests/Param_Test/var_struct.cpp: --- TAO/tests/Param_Test/any.cpp | 2 +- TAO/tests/Param_Test/except.cpp | 2 +- TAO/tests/Param_Test/var_struct.cpp | 24 ++++++++++++------------ 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/TAO/tests/Param_Test/any.cpp b/TAO/tests/Param_Test/any.cpp index 3fd3c35123a..5b596b6eb96 100644 --- a/TAO/tests/Param_Test/any.cpp +++ b/TAO/tests/Param_Test/any.cpp @@ -130,7 +130,7 @@ Test_Any::reset_parameters (void) char *str = gen->gen_string (); if (TAO_debug_level > 0) - ACE_DEBUG ((LM_DEBUG, "setting string = %s\n", str)); + ACE_DEBUG ((LM_DEBUG, "setting string = %C\n", str)); this->in_ <<= str; this->inout_ <<= str; CORBA::string_free (str); diff --git a/TAO/tests/Param_Test/except.cpp b/TAO/tests/Param_Test/except.cpp index 451633b679e..f18ccba2219 100644 --- a/TAO/tests/Param_Test/except.cpp +++ b/TAO/tests/Param_Test/except.cpp @@ -272,7 +272,7 @@ Test_Exception::run_sii_test (Param_Test_ptr objref) ACE_DEBUG ((LM_DEBUG, "Test_Exception::run_sii_test - " "expected user exception" - " (%s,%d)\n", + " (%C,%d)\n", reason, mod_value)); } diff --git a/TAO/tests/Param_Test/var_struct.cpp b/TAO/tests/Param_Test/var_struct.cpp index 87ceee7b536..5ff52e1d467 100644 --- a/TAO/tests/Param_Test/var_struct.cpp +++ b/TAO/tests/Param_Test/var_struct.cpp @@ -187,10 +187,10 @@ Test_Var_Struct::print_values (void) { ACE_DEBUG ((LM_DEBUG, "\n*=*=*=*=*=*=*=*=*=*=\n" - "in_.dummy1 = %s\n" - "inout_.dummy1 = %s\n" - "out_.dummy1 = %s\n" - "ret_.dummy1 = %s\n", + "in_.dummy1 = %C\n" + "inout_.dummy1 = %C\n" + "out_.dummy1 = %C\n" + "ret_.dummy1 = %C\n", this->in_.dummy1.in (), this->inout_->dummy1.in (), this->out_->dummy1.in (), @@ -198,10 +198,10 @@ Test_Var_Struct::print_values (void) ACE_DEBUG ((LM_DEBUG, "\n*=*=*=*=*=*=*=*=*=*=\n" - "in_.dummy2 = %s\n" - "inout_.dummy2 = %s\n" - "out_.dummy2 = %s\n" - "ret_.dummy2 = %s\n", + "in_.dummy2 = %C\n" + "inout_.dummy2 = %C\n" + "out_.dummy2 = %C\n" + "ret_.dummy2 = %C\n", this->in_.dummy2.in (), this->inout_->dummy2.in (), this->out_->dummy2.in (), @@ -213,7 +213,7 @@ Test_Var_Struct::print_values (void) { ACE_DEBUG ((LM_DEBUG, "Element #%d\n" - "in.seq : %s\n", + "in.seq : %C\n", i, (this->in_.seq[i]? (const char *)this->in_.seq[i]:""))); } @@ -222,7 +222,7 @@ Test_Var_Struct::print_values (void) { ACE_DEBUG ((LM_DEBUG, "Element #%d\n" - "inout : %s\n", + "inout : %C\n", i, (this->inout_->seq[i]? (const char *)this->inout_->seq[i]:""))); } @@ -233,7 +233,7 @@ Test_Var_Struct::print_values (void) { ACE_DEBUG ((LM_DEBUG, "Element #%d\n" - "in : %s\n", + "in : %C\n", i, (this->out_->seq[i]? (const char *)this->out_->seq[i]:""))); } @@ -244,7 +244,7 @@ Test_Var_Struct::print_values (void) { ACE_DEBUG ((LM_DEBUG, "Element #%d\n" - "in : %s\n", + "in : %C\n", i, (this->ret_->seq[i]? (const char *)this->ret_->seq[i]:""))); } -- cgit v1.2.1 From 5dff5cebea9fab9737204ce549635ea4081fa2f9 Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Wed, 21 Jul 2021 11:23:48 +0200 Subject: %C is for logging ascii strings * TAO/tests/Param_Test/bd_str_seq.cpp: * TAO/tests/Param_Test/bd_string.cpp: * TAO/tests/Param_Test/client.cpp: * TAO/tests/Param_Test/complex_any.cpp: * TAO/tests/Param_Test/nested_struct.cpp: * TAO/tests/Param_Test/objref.cpp: * TAO/tests/Param_Test/objref_struct.cpp: * TAO/tests/Param_Test/param_test_i.cpp: * TAO/tests/Param_Test/ub_any_seq.cpp: * TAO/tests/Param_Test/ub_objref_seq.cpp: * TAO/tests/Param_Test/ub_str_seq.cpp: * TAO/tests/Param_Test/ub_string.cpp: * TAO/tests/Param_Test/ub_struct_seq.cpp: * TAO/tests/Param_Test/var_array.cpp: --- TAO/tests/Param_Test/bd_str_seq.cpp | 8 ++++---- TAO/tests/Param_Test/bd_string.cpp | 8 ++++---- TAO/tests/Param_Test/client.cpp | 18 +++++++++--------- TAO/tests/Param_Test/complex_any.cpp | 4 ++-- TAO/tests/Param_Test/nested_struct.cpp | 8 ++++---- TAO/tests/Param_Test/objref.cpp | 8 ++++---- TAO/tests/Param_Test/objref_struct.cpp | 8 ++++---- TAO/tests/Param_Test/param_test_i.cpp | 4 ++-- TAO/tests/Param_Test/ub_any_seq.cpp | 2 +- TAO/tests/Param_Test/ub_objref_seq.cpp | 2 +- TAO/tests/Param_Test/ub_str_seq.cpp | 8 ++++---- TAO/tests/Param_Test/ub_string.cpp | 8 ++++---- TAO/tests/Param_Test/ub_struct_seq.cpp | 4 ++-- TAO/tests/Param_Test/var_array.cpp | 2 +- 14 files changed, 46 insertions(+), 46 deletions(-) diff --git a/TAO/tests/Param_Test/bd_str_seq.cpp b/TAO/tests/Param_Test/bd_str_seq.cpp index a7a4f410df2..a8f73b80538 100644 --- a/TAO/tests/Param_Test/bd_str_seq.cpp +++ b/TAO/tests/Param_Test/bd_str_seq.cpp @@ -156,7 +156,7 @@ Test_Bounded_String_Sequence::print_values (void) { ACE_DEBUG ((LM_DEBUG, "Element #%d\n" - "in : %s\n", + "in : %C\n", i, this->in_[i]? (const char *)this->in_[i]:"")); } @@ -167,7 +167,7 @@ Test_Bounded_String_Sequence::print_values (void) { ACE_DEBUG ((LM_DEBUG, "Element #%d\n" - "in : %s\n", + "in : %C\n", i, (this->inout_[i]? (const char *)this->inout_[i]:""))); } @@ -178,7 +178,7 @@ Test_Bounded_String_Sequence::print_values (void) { ACE_DEBUG ((LM_DEBUG, "Element #%d\n" - "in : %s\n", + "in : %C\n", i, (this->out_[i]? (const char *)this->out_[i]:""))); } @@ -189,7 +189,7 @@ Test_Bounded_String_Sequence::print_values (void) { ACE_DEBUG ((LM_DEBUG, "Element #%d\n" - "in : %s\n", + "in : %C\n", i, (this->ret_[i]? (const char *)this->ret_[i]:""))); } diff --git a/TAO/tests/Param_Test/bd_string.cpp b/TAO/tests/Param_Test/bd_string.cpp index 66f62ecaf4f..4295ab113cb 100644 --- a/TAO/tests/Param_Test/bd_string.cpp +++ b/TAO/tests/Param_Test/bd_string.cpp @@ -159,10 +159,10 @@ Test_Bounded_String::print_values (void) { ACE_DEBUG ((LM_DEBUG, "\n=*=*=*=*=*=*\n" - "in with len (%d) = %s\n" - "inout with len (%d) = %s\n" - "out with len (%d) = %s\n" - "ret with len (%d) = %s\n" + "in with len (%d) = %C\n" + "inout with len (%d) = %C\n" + "out with len (%d) = %C\n" + "ret with len (%d) = %C\n" "\n=*=*=*=*=*=*\n", (this->in_ ? ACE_OS::strlen (this->in_):0), (this->in_ ? this->in_:""), diff --git a/TAO/tests/Param_Test/client.cpp b/TAO/tests/Param_Test/client.cpp index b8ae5b4cd9f..08f1dd6303b 100644 --- a/TAO/tests/Param_Test/client.cpp +++ b/TAO/tests/Param_Test/client.cpp @@ -46,7 +46,7 @@ Param_Test_Client::run_sii_test (void) if (opt->debug ()) ACE_DEBUG ((LM_DEBUG, - "********** %s SII *********\n", + "********** %C SII *********\n", opname)); // Initialize call count and error count. @@ -62,7 +62,7 @@ Param_Test_Client::run_sii_test (void) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) client.cpp - run_sii_test:" - "init_parameters failed for opname - %s", + "init_parameters failed for opname - %C", opname), -1); } @@ -122,7 +122,7 @@ Param_Test_Client::run_sii_test (void) if (this->test_object_->reset_parameters () == -1) ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) client.cpp - run_sii_test:" - "init_parameters failed for opname - %s", + "init_parameters failed for opname - %C", opname), -1); loop_around: continue; } @@ -132,13 +132,13 @@ Param_Test_Client::run_sii_test (void) if (this->results_.error_count () != 0) { ACE_DEBUG ((LM_DEBUG, - "********** Error running %s SII *********\n", + "********** Error running %C SII *********\n", opname)); } else if (opt->debug ()) { ACE_DEBUG ((LM_DEBUG, - "********** Finished running %s SII *********\n", + "********** Finished running %C SII *********\n", opname)); } return this->results_.error_count ()? -1:0; @@ -153,7 +153,7 @@ Param_Test_Client::run_dii_test (void) if (opt->debug ()) ACE_DEBUG ((LM_DEBUG, - "********** %s DII *********\n", + "********** %C DII *********\n", opname)); // initialize call count and error count @@ -169,7 +169,7 @@ Param_Test_Client::run_dii_test (void) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) client.cpp - run_dii_test:" - "init_parameters failed for opname - %s", + "init_parameters failed for opname - %C", opname), -1); } @@ -238,13 +238,13 @@ Param_Test_Client::run_dii_test (void) if (this->results_.error_count () != 0) { ACE_DEBUG ((LM_DEBUG, - "********** Error running %s DII *********\n", + "********** Error running %C DII *********\n", opname)); } else if (opt->debug ()) { ACE_DEBUG ((LM_DEBUG, - "********** Finished running %s DII *********\n", + "********** Finished running %C DII *********\n", opname)); } return this->results_.error_count () ? -1 : 0; diff --git a/TAO/tests/Param_Test/complex_any.cpp b/TAO/tests/Param_Test/complex_any.cpp index 7696218e2e5..29a9ca724d3 100644 --- a/TAO/tests/Param_Test/complex_any.cpp +++ b/TAO/tests/Param_Test/complex_any.cpp @@ -102,7 +102,7 @@ Test_Complex_Any::reset_parameters (void) if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - "setting level 5 string = %s\n", + "setting level 5 string = %C\n", l5_str)); level4_struct.level5_string = l5_str; @@ -115,7 +115,7 @@ Test_Complex_Any::reset_parameters (void) if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - "setting level 9 string = %s\n", + "setting level 9 string = %C\n", l9_str)); level8_struct.level9_string = l9_str; diff --git a/TAO/tests/Param_Test/nested_struct.cpp b/TAO/tests/Param_Test/nested_struct.cpp index 1424ce43835..77402115ff3 100644 --- a/TAO/tests/Param_Test/nested_struct.cpp +++ b/TAO/tests/Param_Test/nested_struct.cpp @@ -174,10 +174,10 @@ Test_Nested_Struct::print_values (void) ACE_DEBUG ((LM_DEBUG, "\n*=*=*=*=*=*=*=*=*=*=\n" "Element # %d\n" - "in (len = %d): %s\n" - "inout (len = %d): %s\n" - "out (len = %d): %s\n" - "ret (len = %d): %s\n", + "in (len = %d): %C\n" + "inout (len = %d): %C\n" + "out (len = %d): %C\n" + "ret (len = %d): %C\n", i, this->in_.vs.seq.length (), (this->in_.vs.seq.length ()? (const char *)this->in_.vs.seq[i]:""), diff --git a/TAO/tests/Param_Test/objref.cpp b/TAO/tests/Param_Test/objref.cpp index e879993797b..469c812224a 100644 --- a/TAO/tests/Param_Test/objref.cpp +++ b/TAO/tests/Param_Test/objref.cpp @@ -262,10 +262,10 @@ Test_ObjRef::print_values (void) ACE_DEBUG ((LM_DEBUG, "\n=*=*=*=*=*=*" - "in = %s, " - "inout = %s, " - "out = %s, " - "ret = %s*=*=*=*=*=\n", + "in = %C, " + "inout = %C, " + "out = %C, " + "ret = %C*=*=*=*=*=\n", in?in:"ERROR(null string)", inout?inout:"ERROR(null string)", out?out:"ERROR(null string)", diff --git a/TAO/tests/Param_Test/objref_struct.cpp b/TAO/tests/Param_Test/objref_struct.cpp index 454cfb7b059..7f67712e794 100644 --- a/TAO/tests/Param_Test/objref_struct.cpp +++ b/TAO/tests/Param_Test/objref_struct.cpp @@ -231,10 +231,10 @@ Test_Objref_Struct::print_values (void) ACE_DEBUG ((LM_DEBUG, "\n*=*=*=*=*=*=*=*=*=*=\n" - "in_ name = %s\n" - "inout_ name = %s\n" - "out_ name = %s\n" - "ret_ name = %s\n", + "in_ name = %C\n" + "inout_ name = %C\n" + "out_ name = %C\n" + "ret_ name = %C\n", s_in->name.in (), s_inout->name.in (), s_out->name.in (), diff --git a/TAO/tests/Param_Test/param_test_i.cpp b/TAO/tests/Param_Test/param_test_i.cpp index fa4f6948cc8..4a044735a8b 100644 --- a/TAO/tests/Param_Test/param_test_i.cpp +++ b/TAO/tests/Param_Test/param_test_i.cpp @@ -263,7 +263,7 @@ Param_Test_i::test_strseq (const CORBA::StringSeq &s1, { ACE_DEBUG ((LM_DEBUG, "Element #%d\n" - "in : %s\n", + "in : %C\n", i, (s2[i]? (const char *)s2[i]:""))); } @@ -737,7 +737,7 @@ Param_Test_i::test_any (const CORBA::Any &a1, else if (a1 >>= str_in) { if (TAO_debug_level > 0) - ACE_DEBUG ((LM_DEBUG, "Received unbounded string = %s\n", str_in)); + ACE_DEBUG ((LM_DEBUG, "Received unbounded string = %C\n", str_in)); } else if (a1 >>= coffee) { diff --git a/TAO/tests/Param_Test/ub_any_seq.cpp b/TAO/tests/Param_Test/ub_any_seq.cpp index d922962b7b5..07aab1ddf1c 100644 --- a/TAO/tests/Param_Test/ub_any_seq.cpp +++ b/TAO/tests/Param_Test/ub_any_seq.cpp @@ -99,7 +99,7 @@ Test_AnySeq::init_parameters (Param_Test_ptr objref) CORBA::String_var str = gen->gen_string (); if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - "setting string = %s\n", str.in ())); + "setting string = %C\n", str.in ())); this->in_[i] <<= str.in (); this->inout_[i] <<= 0; // different from in_ } diff --git a/TAO/tests/Param_Test/ub_objref_seq.cpp b/TAO/tests/Param_Test/ub_objref_seq.cpp index d92d3ae9f84..aabd1d7835a 100644 --- a/TAO/tests/Param_Test/ub_objref_seq.cpp +++ b/TAO/tests/Param_Test/ub_objref_seq.cpp @@ -272,7 +272,7 @@ Test_ObjRef_Sequence::print_sequence (const Param_Test::Coffee_Mix &s) } ACE_DEBUG ((LM_DEBUG, "Element #%d\n" - "\ttype = <%s>\n", + "\ttype = <%C>\n", i, c->_interface_repository_id ())); } diff --git a/TAO/tests/Param_Test/ub_str_seq.cpp b/TAO/tests/Param_Test/ub_str_seq.cpp index 8ca94a0121d..918bba998e5 100644 --- a/TAO/tests/Param_Test/ub_str_seq.cpp +++ b/TAO/tests/Param_Test/ub_str_seq.cpp @@ -157,7 +157,7 @@ Test_String_Sequence::print_values (void) { ACE_DEBUG ((LM_DEBUG, "Element #%d\n" - "in : %s\n", + "in : %C\n", i, this->in_[i]? (const char *)this->in_[i]:"")); } @@ -168,7 +168,7 @@ Test_String_Sequence::print_values (void) { ACE_DEBUG ((LM_DEBUG, "Element #%d\n" - "in : %s\n", + "in : %C\n", i, (this->inout_[i]? (const char *)this->inout_[i]:""))); } @@ -179,7 +179,7 @@ Test_String_Sequence::print_values (void) { ACE_DEBUG ((LM_DEBUG, "Element #%d\n" - "in : %s\n", + "in : %C\n", i, (this->out_[i]? (const char *)this->out_[i]:""))); } @@ -190,7 +190,7 @@ Test_String_Sequence::print_values (void) { ACE_DEBUG ((LM_DEBUG, "Element #%d\n" - "in : %s\n", + "in : %C\n", i, (this->ret_[i]? (const char *)this->ret_[i]:""))); } diff --git a/TAO/tests/Param_Test/ub_string.cpp b/TAO/tests/Param_Test/ub_string.cpp index 024c7b6864e..a302f8c7036 100644 --- a/TAO/tests/Param_Test/ub_string.cpp +++ b/TAO/tests/Param_Test/ub_string.cpp @@ -160,10 +160,10 @@ Test_Unbounded_String::print_values (void) { ACE_DEBUG ((LM_DEBUG, "\n=*=*=*=*=*=*\n" - "in with len (%d) = %s\n" - "inout with len (%d) = %s\n" - "out with len (%d) = %s\n" - "ret with len (%d) = %s\n" + "in with len (%d) = %C\n" + "inout with len (%d) = %C\n" + "out with len (%d) = %C\n" + "ret with len (%d) = %C\n" "\n=*=*=*=*=*=*\n", (this->in_ ? ACE_OS::strlen (this->in_):0), (this->in_ ? this->in_:""), diff --git a/TAO/tests/Param_Test/ub_struct_seq.cpp b/TAO/tests/Param_Test/ub_struct_seq.cpp index 274b08dd5af..17d73b4423c 100644 --- a/TAO/tests/Param_Test/ub_struct_seq.cpp +++ b/TAO/tests/Param_Test/ub_struct_seq.cpp @@ -381,8 +381,8 @@ Test_Unbounded_Struct_Sequence::print_sequence (const Param_Test::PathSpec &s) ACE_DEBUG ((LM_DEBUG, "Element #%d\n" - "\tname.id = %s\n" - "\tname.kind = %s\n" + "\tname.id = %C\n" + "\tname.kind = %C\n" "\tprocess = %d\n", i, vs.name.id.in (), vs.name.kind.in (), vs.process)); diff --git a/TAO/tests/Param_Test/var_array.cpp b/TAO/tests/Param_Test/var_array.cpp index ada1500d3c4..845bdeafa58 100644 --- a/TAO/tests/Param_Test/var_array.cpp +++ b/TAO/tests/Param_Test/var_array.cpp @@ -156,6 +156,6 @@ Test_Var_Array::print (const Param_Test::Var_Array_slice *a) { for (CORBA::ULong i = 0; i < Param_Test::DIM2; i++) { - ACE_DEBUG ((LM_DEBUG, "\t\tElement #%d = %s\n",i, a[i].in ())); + ACE_DEBUG ((LM_DEBUG, "\t\tElement #%d = %C\n",i, a[i].in ())); } } -- cgit v1.2.1 From 5eb19d9799db38ba5d58ca36f02b9c87de7e88fd Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Wed, 21 Jul 2021 11:31:37 +0200 Subject: Fixed incorrect logging * TAO/tests/Param_Test/except.cpp: --- TAO/tests/Param_Test/except.cpp | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/TAO/tests/Param_Test/except.cpp b/TAO/tests/Param_Test/except.cpp index f18ccba2219..49084a4b258 100644 --- a/TAO/tests/Param_Test/except.cpp +++ b/TAO/tests/Param_Test/except.cpp @@ -50,9 +50,7 @@ Test_Exception::dii_req_invoke (CORBA::Request_ptr req) req->set_return_type (CORBA::_tc_ulong); - req->exceptions ()->add (CORBA::TypeCode::_duplicate ( - Param_Test::_tc_Ooops - )); + req->exceptions ()->add (CORBA::TypeCode::_duplicate (Param_Test::_tc_Ooops)); req->invoke (); @@ -143,7 +141,7 @@ Test_Exception::dii_req_invoke (CORBA::Request_ptr req) if (TAO_debug_level > 0) { ACE_DEBUG ((LM_DEBUG, - "Test_Exception::run_sii_test - " + "Test_Exception::dii_req_invoke - " "caught NO_MEMORY system exception - " "expected known user exception\n")); } @@ -154,7 +152,7 @@ Test_Exception::dii_req_invoke (CORBA::Request_ptr req) if (TAO_debug_level > 0) { ACE_DEBUG ((LM_DEBUG, - "Test_Exception::run_sii_test - " + "Test_Exception::dii_req_invoke - " "caught NO_MEMORY system exception - " "expected UNKNOWN exception\n")); } @@ -165,8 +163,8 @@ Test_Exception::dii_req_invoke (CORBA::Request_ptr req) if (TAO_debug_level > 0) { ACE_DEBUG ((LM_DEBUG, - "Test_Exception::run_sii_test - " - "caught unexpected uknown exception\n")); + "Test_Exception::dii_req_invoke - " + "caught unexpected unknown exception\n")); } } } @@ -194,7 +192,7 @@ Test_Exception::dii_req_invoke (CORBA::Request_ptr req) if (TAO_debug_level > 0) { ACE_DEBUG ((LM_DEBUG, - "Test_Exception::run_sii_test - " + "Test_Exception::dii_req_invoke - " "caught unknown exception - " "expected known user exception\n")); } @@ -205,7 +203,7 @@ Test_Exception::dii_req_invoke (CORBA::Request_ptr req) if (TAO_debug_level > 0) { ACE_DEBUG ((LM_DEBUG, - "Test_Exception::run_sii_test - " + "Test_Exception::dii_req_invoke - " "caught unknown exception - " "expected NO_MEMORY system exception\n")); } @@ -216,8 +214,8 @@ Test_Exception::dii_req_invoke (CORBA::Request_ptr req) if (TAO_debug_level > 0) { ACE_DEBUG ((LM_DEBUG, - "Test_Exception::run_sii_test - " - "caught unexpected uknown exception\n")); + "Test_Exception::dii_req_invoke - " + "caught unexpected unknown exception\n")); } } } -- cgit v1.2.1