diff options
author | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2011-10-03 21:02:32 +0000 |
---|---|---|
committer | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2011-10-03 21:02:32 +0000 |
commit | 4dcca24c609008f9fe8a4e01966702b8f4c08e61 (patch) | |
tree | 6bf00b87749636ef3ea7ec22a9b13d4dd2597378 | |
parent | 8c7cc4d18ddf28a18a01fef53aaea68422b2fff2 (diff) | |
download | ATCD-alt_mapping_SAIC.tar.gz |
Merged version 94552 from main trunk into this branchalt_mapping_SAIC
157 files changed, 3365 insertions, 1819 deletions
diff --git a/ChangeLog b/ChangeLog index 27c860120d9..526cb4d7a21 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,319 @@ +Mon Oct 3 18:23:31 UTC 2011 Jeff Parsons <j.parsons@vanderbilt.edu> + + * Merged main trunk into the alt_mapping_SAIC branch again. + + Wed Sep 28 12:46:14 UTC 2011 Johnny Willemsen <jwillemsen@remedy.nl> + + * tao/BiDir_GIOP/BiDir_GIOP.mpc: + * tao/CodecFactory/CodecFactory.mpc: + Added the generated export files so that they get installed + + Wed Sep 28 12:42:14 UTC 2011 Johnny Willemsen <jwillemsen@remedy.nl> + + * tao/Generic_Sequence_T.h: + * tao/Valuetype/AbstractBase.h: + * tao/Valuetype/Valuetype_Adapter_Impl.h: + Doxygen changes + + * tao/Object.cpp: + * tao/PortableServer/Basic_SArgument_T.h: + * tao/DynamicAny/DynAny_i.h: + Layout changes + + Wed Sep 28 12:39:12 UTC 2011 Johnny Willemsen <jwillemsen@remedy.nl> + + * orbsvcs/orbsvcs/AV/AVStreams_i.h: + * orbsvcs/tests/Notify/lib/Peer_T.cpp: + Layout changes and cleanup + + Wed Sep 28 12:37:05 UTC 2011 Johnny Willemsen <jwillemsen@remedy.nl> + + * examples/Persistent_Grid/Grid_i.h: + * examples/Simple/bank/AccountManager_i.h: + * examples/Simple/echo/Echo_i.h: + * examples/Simple/grid/Grid_i.h: + * examples/Simple/time/Time_i.h: + Layout changes, remove workarounds + + Wed Sep 28 12:35:58 UTC 2011 Johnny Willemsen <jwillemsen@remedy.nl> + + * TAO_IDL/be/be_visitor_array/cdr_op_cs.cpp: + * TAO_IDL/be/be_visitor_interface/cdr_op_cs.cpp: + Layout changes to the generated code + + Wed Sep 28 12:34:31 UTC 2011 Johnny Willemsen <jwillemsen@remedy.nl> + + * tests/Bug_3683_Regression/Echo_i.h: + Remove workaround + + * tests/IDL_Test/typedef.idl: + * tests/Smart_Proxies/Collocation/Smart_Proxy_Impl.h: + Layout changes + + Wed Sep 28 12:31:44 UTC 2011 Johnny Willemsen <jwillemsen@remedy.nl> + + * tests/HandleExhaustion/run_test.pl: + Added missing GetFile + + Wed Sep 28 11:39:31 UTC 2011 Marijke Hengstmengel <mhengstmengel@remedy.nl> + + * tests/Bug_2241_Regression: + * tests/Bug_2241_Regression/Bug_2241_Regression.mpc: + * tests/Bug_2241_Regression/Client_Task.h: + * tests/Bug_2241_Regression/Client_Task.cpp: + * tests/Bug_2241_Regression/Collocated_Test.cpp: + * tests/Bug_2241_Regression/Hello.h: + * tests/Bug_2241_Regression/Hello.cpp: + * tests/Bug_2241_Regression/Server_Task.h: + * tests/Bug_2241_Regression/Server_Task.cpp: + * tests/Bug_2241_Regression/Test.idl: + * tests/Bug_2241_Regression/run_test.pl: + * bin/tao_orb_tests.lst: + New test for '-ORBCollocationStrategy direct' + + Sun Sep 25 17:02:27 UTC 2011 Marcel Smit <msmit@remedy.nl> + + * tests/Parallel_Connect_Strategy/run_test.pl: + Copy only those configuration files that are needed by the targets. + We don't want to solve this in the test framework; the script knows + which configuration files should be copied. + + Wed Sep 21 13:40:30 UTC 2011 Johnny Willemsen <jwillemsen@remedy.nl> + + * tests/MT_Client/run_test.pl: + Removed conf files that are not in the repo at all + + Tue Sep 20 06:43:33 UTC 2011 Marcel Smit <msmit@remedy.nl> + + * tests/AMI/run_mt_noupcall.pl: + * tests/MT_Client/run_test.pl: + Copy only those configuration files that are needed by the targets. + We don't want to solve this in the test framework; the script knows + which configuration files should be copied. + + Tue Sep 20 06:27:42 UTC 2011 Marcel Smit <msmit@remedy.nl> + + * tests/Oneway_Send_Timeouts/run_test.pl: + Fixed runtime issues + + Fri Sep 16 12:01:35 UTC 2011 Marcel Smit <msmit@remedy.nl> + + * DevGuideExamples/Multithreading/ThreadPerConnection/run_test.pl: + * tests/CSD_Collocation/run_test.pl: + * tests/Connection_Purging/run_test.pl: + * tests/Hang_Shutdown/run_test.pl: + * tests/LongUpcalls/run_test.pl: + Copy only those configuration files that are needed by the targets. + We don't want to solve this in the test framework; the script knows + which configuration files should be copied. + + Fri Sep 16 07:55:50 UTC 2011 Marcel Smit <msmit@remedy.nl> + + * tests/Faults/run_test.pl: + * tests/Faults/run_test_pp.pl: + * tests/MT_NoUpcall_Client_Leader/run_test.pl: + * tests/POA/EndpointPolicy/run_test_dh.pl: + Copy only those configuration files that are needed by the targets. + We don't want to solve this in the test framework; the script knows + which configuration files should be copied. + + Fri Sep 16 07:37:12 UTC 2011 Marcel Smit <msmit@remedy.nl> + + * tests/Connect_Strategy_Test/run_test.pl: + * tests/MT_BiDir/run_test.pl: + * tests/MT_Server/run_test.pl: + * tests/No_Server_MT_Connect_Test/run_test.pl: + * tests/RTCORBA/Server_Protocol/run_test.pl: + Copy only those configuration files that are needed by the targets. + We don't want to solve this in the test framework; the script knows + which configuration files should be copied. + + Fri Sep 16 07:02:26 UTC 2011 Marcel Smit <msmit@remedy.nl> + + * tests/Bug_3163_Regression/run_test.pl: + * tests/Bug_3630_Regression/run_test.pl: + * tests/Bug_3683_Regression/run_test.pl: + Copy only those configuration files that are needed by the targets. + We don't want to solve this in the test framework; the script knows + which configuration files should be copied. + + * tests/Bug_3630_Regression/server.cpp: + Added \n + + Thu Sep 15 07:42:01 UTC 2011 Marcel Smit <msmit@remedy.nl> + + * tests/AMI/run_test.pl: + * tests/Bug_2183_Regression/run_test.pl: + * tests/Bug_2186_Regression/run_test.pl: + * tests/Bug_2935_Regression/run_test.pl: + * tests/Bug_3068_Regression/run_test.pl: + * tests/Leader_Followers/run_test.pl: + * tests/Oneway_Send_Timeouts/run_test.pl: + Copy only those configuration files that are needed by the targets. + We don't want to solve this in the test framework; the script knows + which configuration files should be copied. + + Wed Sep 14 07:34:56 UTC 2011 Johnny Willemsen <jwillemsen@remedy.nl> + + * tao/TAO_Internal.cpp: + When we can't find the service config file output a message that + has error in it, so that the scoreboard parser also detects those + errors + + Wed Sep 7 18:07:24 UTC 2011 Johnny Willemsen <jwillemsen@remedy.nl> + + * tao/CodecFactory/CodecFactory.h: + * tao/CodecFactory/CodecFactory.cpp: + * tao/CodecFactory/CodecFactory.mpc: + export file is now generated by tao_idl + + * tao/CodecFactory/codecfactory_export.h: + Removed this file. + + Wed Sep 7 17:31:31 UTC 2011 Johnny Willemsen <jwillemsen@remedy.nl> + + * tao/BiDir_GIOP/BiDirGIOP.h: + * tao/BiDir_GIOP/BiDirGIOP.cpp: + * tao/BiDir_GIOP/BiDirPolicy_Validator.h: + * tao/BiDir_GIOP/BiDir_GIOP.mpc: + export file is now generated by tao_idl + + * tao/BiDir_GIOP/bidirgiop_export.h: + Removed this file. + + Wed Sep 7 17:27:01 UTC 2011 Johnny Willemsen <jwillemsen@remedy.nl> + + * MPC/modules/IDLHelper.pm: + * TAO_IDL/be/be_codegen.cpp: + * TAO_IDL/be/be_global.cpp: + * TAO_IDL/be/be_util.cpp: + * TAO_IDL/be_include/be_global.h: + Added skel_export_file and stub_export_file to define an explicit + filename for these export files that are different than the stub/skel + export_include which could be a full path. This fixes bugzilla 3980 + + Tue Sep 6 11:45:16 UTC 2011 Johnny Willemsen <jwillemsen@remedy.nl> + + * tao/PortableServer/Servant_Base.h: + Fixed problem with versioned namespace support + + Tue Sep 6 08:14:42 UTC 2011 Johnny Willemsen <jwillemsen@remedy.nl> + + * tao/AnyTypeCode/Any.h: + * tao/AnyTypeCode/Any.cpp: + Added support for std::wstring + + Tue Sep 6 08:06:46 UTC 2011 Johnny Willemsen <jwillemsen@remedy.nl> + + * tao/PortableServer/Basic_SArguments.h: + Added support for std::wstring + + Thu Sep 1 09:59:22 UTC 2011 Johnny Willemsen <jwillemsen@remedy.nl> + + * tao/AnyTypeCode/AnyTypeCode_Adapter_Impl.h: + * tao/AnyTypeCode/AnyTypeCode_Adapter_Impl.cpp: + * tao/AnyTypeCode_Adapter.h: + * tao/Basic_Arguments.h: + Added support for std::wstring + + Thu Sep 1 06:31:53 UTC 2011 Johnny Willemsen <jwillemsen@remedy.nl> + + * tao/PortableServer/BD_String_SArgument_T.cpp: + * tao/PortableServer/Basic_SArgument_T.cpp: + * tao/PortableServer/Fixed_Array_SArgument_T.cpp: + * tao/PortableServer/Fixed_Size_SArgument_T.cpp: + * tao/PortableServer/Object_SArgument_T.cpp: + * tao/PortableServer/Special_Basic_SArgument_T.cpp: + * tao/PortableServer/UB_String_SArgument_T.cpp: + * tao/PortableServer/Var_Array_SArgument_T.cpp: + * tao/PortableServer/Var_Size_SArgument_T.cpp: + * tao/PortableServer/Vector_SArgument_T.cpp: + Fixed coverity issues + + Mon Aug 29 07:20:29 UTC 2011 Marcel Smit <msmit@remedy.nl> + + * orbsvcs/orbsvcs/ESF/ESF_Copy_On_Write.cpp: + Fixed runtime issues in orbsvcs. + + * tests/OBV/ValueBox/client.cpp: + Fixed runtime issues. + + Fri Aug 26 11:09:12 UTC 2011 Marcel Smit <msmit@remedy.nl> + + * DevGuideExamples/ValueTypes/Bank/client.cpp: + * examples/AMH/Sink_Server/client.cpp: + * examples/Event_Comm/supplier.cpp: + * examples/Simple/bank/server.cpp: + * examples/Simple/echo/server.cpp: + * examples/Simple/grid/server.cpp: + * examples/Simple/time/server.cpp: + * orbsvcs/orbsvcs/ESF/ESF_Copy_On_Write.cpp: + * orbsvcs/tests/Bug_2112_Regression/client.cpp: + * orbsvcs/tests/InterfaceRepo/Bug_2962_Regression/client.cpp: + * orbsvcs/tests/InterfaceRepo/Bug_3155_Regression/test_idl.cpp: + * orbsvcs/tests/InterfaceRepo/Bug_3174_Regression/test_idl.cpp: + * orbsvcs/tests/InterfaceRepo/Union_Forward_Test/client.cpp: + * performance-tests/Sequence_Latency/Sequence_Operations_Time/test.cpp: + * tests/Bug_1383_Regression/SimpleClient.cpp: + * tests/Bug_3506_Regression/client.cpp: + * tests/Bug_3548_Regression/client.cpp: + * tests/CDR/allocator.cpp: + * tests/Connection_Failure/client.cpp: + * tests/DII_AMI_Forward/client.cpp: + * tests/DynAny_Test/driver.cpp: + * tests/OBV/ValueBox/client.cpp: + * tests/POA/EndpointPolicy/server.cpp: + * tests/POA/Loader/server.cpp: + * tests/Param_Test/driver.cpp: + * tests/Portable_Interceptors/AdvSlot/client.cpp: + * tests/Portable_Interceptors/AdvSlot/server.cpp: + * tests/Portable_Interceptors/AdvSlotDblCpy/client.cpp: + * tests/Portable_Interceptors/AdvSlotExt/client.cpp: + * tests/RTScheduling/Scheduling_Interceptor/test_client.cpp: + * tests/RTScheduling/VoidData/test_client.cpp: + * tests/Sequence_Unit_Tests/bounded_object_reference_sequence_ut.cpp: + * tests/Sequence_Unit_Tests/bounded_sequence_cdr_ut.cpp: + * tests/Sequence_Unit_Tests/bounded_string_sequence_ut.cpp: + * tests/Sequence_Unit_Tests/bounded_value_sequence_ut.cpp: + * tests/Sequence_Unit_Tests/object_reference_sequence_element_ut.cpp: + * tests/Sequence_Unit_Tests/string_sequence_element_ut.cpp: + * tests/Sequence_Unit_Tests/testing_allocation_traits_ut.cpp: + * tests/Sequence_Unit_Tests/unbounded_object_reference_sequence_ut.cpp: + * tests/Sequence_Unit_Tests/unbounded_octet_sequence_nocopy_ut.cpp: + * tests/Sequence_Unit_Tests/unbounded_octet_sequence_ut.cpp: + * tests/Sequence_Unit_Tests/unbounded_sequence_cdr_ut.cpp: + * tests/Sequence_Unit_Tests/unbounded_string_sequence_ut.cpp: + * tests/Sequence_Unit_Tests/unbounded_value_sequence_ut.cpp: + * utils/nslist/nsadd.cpp: + * utils/nslist/nsdel.cpp: + * utils/nslist/nslist.cpp: + Fixed issues regarding exceptions which are not caught. + + Tue Aug 23 18:19:01 UTC 2011 Johnny Willemsen <jwillemsen@remedy.nl> + + * NEWS: + Prepared for next release + + Tue Aug 23 19:01:44 CEST 2011 Johnny Willemsen <jwillemsen@remedy.nl> + + * TAO version 2.0.4 released. + + Mon Aug 22 15:39:52 UTC 2011 Phil Mesnier <mesnier_p@ociweb.com> + + * orbsvcs/tests/Security/BiDirectional/ssl/ca.pem: + * orbsvcs/tests/Security/BiDirectional/ssl/client-cert.pem: + * orbsvcs/tests/Security/BiDirectional/ssl/client-key.pem: + * orbsvcs/tests/Security/BiDirectional/ssl/server-cert.pem: + * orbsvcs/tests/Security/BiDirectional/ssl/server-key.pem: + + Regenerated these certs so the test works. + + Thu Aug 11 18:55:10 UTC 2011 Jeff Parsons <j.parsons@vanderbilt.edu> + + * NEWS: + + Edited existing entry about generation of argument traits. + Thu Aug 11 18:40:36 UTC 2011 Jeff Parsons <j.parsons@vanderbilt.edu> * Merged main trunk into the alt_mapping_SAIC branch again. diff --git a/DevGuideExamples/Multithreading/ThreadPerConnection/run_test.pl b/DevGuideExamples/Multithreading/ThreadPerConnection/run_test.pl index 3c8b6d058ce..67e95fc1752 100755 --- a/DevGuideExamples/Multithreading/ThreadPerConnection/run_test.pl +++ b/DevGuideExamples/Multithreading/ThreadPerConnection/run_test.pl @@ -39,6 +39,12 @@ $client4->DeleteFile($iorbase); my $hostname = $server->HostName (); +# Copy configuration file first +if ($server->PutFile ($svcbase) == -1) { + print STDERR "ERROR: cannot set file <$server_svcfile>\n"; + exit 1; +} + $SV = $server->CreateProcess ("MessengerServer", "-ORBdebuglevel $debug_level " . "-ORBSvcConf $server_svcfile " . diff --git a/DevGuideExamples/ValueTypes/Bank/client.cpp b/DevGuideExamples/ValueTypes/Bank/client.cpp index 9004be236a5..b4f91848e8b 100644 --- a/DevGuideExamples/ValueTypes/Bank/client.cpp +++ b/DevGuideExamples/ValueTypes/Bank/client.cpp @@ -92,6 +92,9 @@ int ACE_TMAIN (int argc, ACE_TCHAR* argv[]) { std::cerr << e << std::endl; return 1; } + catch (const std::runtime_error &e) { + std::cerr << e.what() << std::endl; + } return 0; } diff --git a/MPC/modules/IDLHelper.pm b/MPC/modules/IDLHelper.pm index 21bec3f8ec8..de2ddd8dc3f 100644 --- a/MPC/modules/IDLHelper.pm +++ b/MPC/modules/IDLHelper.pm @@ -11,11 +11,19 @@ sub get_output { if ($flags =~ /-Gxhex/ && $flags =~ /-Wb,exec_export_include=(\S*)/) { push(@out, $1); } - if ($flags =~ /-Gxhst/ && $flags =~ /-Wb,stub_export_include=(\S*)/) { - push(@out, $1); + if ($flags =~ /-Gxhst/) { + if ($flags =~ /-Wb,stub_export_file=(\S*)/) { + push(@out, $1); + } elsif ($flags =~ /-Wb,stub_export_include=(\S*)/) { + push(@out, $1); + } } - if ($flags =~ /-Gxhsk/ && $flags =~ /-Wb,skel_export_include=(\S*)/) { - push(@out, $1); + if ($flags =~ /-Gxhsk/) { + if ($flags =~ /-Wb,skel_export_file=(\S*)/) { + push(@out, $1); + } elsif ($flags =~ /-Wb,skel_export_include=(\S*)/) { + push(@out, $1); + } } if ($flags =~ /-Gxhsv/ && $flags =~ /-Wb,svnt_export_include=(\S*)/) { push(@out, $1); @@ -1,6 +1,14 @@ +USER VISIBLE CHANGES BETWEEN TAO-2.0.4 and TAO-2.0.5 +==================================================== + USER VISIBLE CHANGES BETWEEN TAO-2.0.3 and TAO-2.0.4 ==================================================== +. Added new IFR_Client_skel library that is now used by the IFR_Service + +. Moved TAO_IDL generation of argument traits from the stub and + skeleton .cpp files to the corresponding .h files. + USER VISIBLE CHANGES BETWEEN TAO-2.0.2 and TAO-2.0.3 ==================================================== diff --git a/PROBLEM-REPORT-FORM b/PROBLEM-REPORT-FORM index 14fa8b51ec1..c3db0c35bc7 100644 --- a/PROBLEM-REPORT-FORM +++ b/PROBLEM-REPORT-FORM @@ -40,8 +40,8 @@ To: tao-bugs@list.isis.vanderbilt.edu Subject: [area]: [synopsis] - TAO VERSION: 2.0.3 - ACE VERSION: 6.0.3 + TAO VERSION: 2.0.4 + ACE VERSION: 6.0.4 HOST MACHINE and OPERATING SYSTEM: If on Windows based OS's, which version of WINSOCK do you diff --git a/TAO_IDL/be/be_codegen.cpp b/TAO_IDL/be/be_codegen.cpp index 2f39a2464c0..42be59781cf 100644 --- a/TAO_IDL/be/be_codegen.cpp +++ b/TAO_IDL/be/be_codegen.cpp @@ -1976,11 +1976,11 @@ void TAO_CodeGen::gen_export_files (void) { if (be_global->gen_stub_export_hdr_file () - && be_global->stub_export_macro () != 0 - && be_global->stub_export_include () != 0) + && be_global->stub_export_macro () != 0 + && (be_global->stub_export_include () != 0 || be_global->stub_export_file () != 0)) { this->gen_export_file ( - be_global->stub_export_include (), + (be_global->stub_export_file () != 0) ? be_global->stub_export_file () : be_global->stub_export_include (), be_global->stub_export_macro (), "stub"); } @@ -1990,7 +1990,7 @@ TAO_CodeGen::gen_export_files (void) && be_global->skel_export_include () != 0) { this->gen_export_file ( - be_global->skel_export_include (), + (be_global->skel_export_file () != 0) ? be_global->skel_export_file () : be_global->skel_export_include (), be_global->skel_export_macro (), "skel", true); @@ -2335,8 +2335,6 @@ TAO_CodeGen::gen_stub_hdr_includes (void) this->client_header_ ); - // Conditionally included. - // DDS/DCPS zero-copy read sequence type support. if (idl_global->dcps_support_zero_copy_read ()) { diff --git a/TAO_IDL/be/be_global.cpp b/TAO_IDL/be/be_global.cpp index 2234c0eb162..d24446abc8e 100644 --- a/TAO_IDL/be/be_global.cpp +++ b/TAO_IDL/be/be_global.cpp @@ -39,8 +39,10 @@ BE_GlobalData::BE_GlobalData (void) : changing_standard_include_files_ (1), skel_export_macro_ (0), skel_export_include_ (0), + skel_export_file_ (0), stub_export_macro_ (0), stub_export_include_ (0), + stub_export_file_ (0), anyop_export_macro_ (0), anyop_export_include_ (0), exec_export_macro_ (0), @@ -787,6 +789,19 @@ BE_GlobalData::skel_export_include (const char *s) } const char* +BE_GlobalData::skel_export_file (void) const +{ + return this->skel_export_file_; +} + +void +BE_GlobalData::skel_export_file (const char *s) +{ + ACE::strdelete (this->skel_export_file_); + this->skel_export_file_ = ACE::strnew (s); +} + +const char* BE_GlobalData::stub_export_macro (void) const { if (this->stub_export_macro_ == 0) @@ -818,6 +833,19 @@ BE_GlobalData::stub_export_include (const char *s) } const char* +BE_GlobalData::stub_export_file (void) const +{ + return this->stub_export_file_; +} + +void +BE_GlobalData::stub_export_file (const char *s) +{ + ACE::strdelete (this->stub_export_file_); + this->stub_export_file_ = ACE::strnew (s); +} + +const char* BE_GlobalData::anyop_export_macro (void) const { if (this->anyop_export_macro_ == 0) @@ -1857,12 +1885,18 @@ BE_GlobalData::destroy (void) ACE::strdelete (this->skel_export_include_); this->skel_export_include_ = 0; + ACE::strdelete (this->skel_export_file_); + this->skel_export_file_ = 0; + ACE::strdelete (this->stub_export_macro_); this->stub_export_macro_ = 0; ACE::strdelete (this->stub_export_include_); this->stub_export_include_ = 0; + ACE::strdelete (this->stub_export_file_); + this->stub_export_file_ = 0; + ACE::strdelete (this->anyop_export_macro_); this->anyop_export_macro_ = 0; diff --git a/TAO_IDL/be/be_util.cpp b/TAO_IDL/be/be_util.cpp index 7bce09bc700..a3dd1bf7e12 100644 --- a/TAO_IDL/be/be_util.cpp +++ b/TAO_IDL/be/be_util.cpp @@ -129,8 +129,10 @@ be_util::prep_be_arg (char *s) static const char arg_include[] = "export_include="; static const char skel_arg_macro[] = "skel_export_macro="; static const char skel_arg_include[] = "skel_export_include="; + static const char skel_arg_file[] = "skel_export_file="; static const char stub_arg_macro[] = "stub_export_macro="; static const char stub_arg_include[] = "stub_export_include="; + static const char stub_arg_file[] = "stub_export_file="; static const char anyop_arg_macro[] = "anyop_export_macro="; static const char anyop_arg_include[] = "anyop_export_include="; static const char exec_arg_macro[] = "exec_export_macro="; @@ -180,6 +182,11 @@ be_util::prep_be_arg (char *s) char* val = arg + sizeof (skel_arg_include) - 1; be_global->skel_export_include (val); } + else if (ACE_OS::strstr (arg, skel_arg_file) == arg) + { + char* val = arg + sizeof (skel_arg_file) - 1; + be_global->skel_export_file (val); + } else if (ACE_OS::strstr (arg, stub_arg_macro) == arg) { char* val = arg + sizeof (stub_arg_macro) - 1; @@ -190,6 +197,11 @@ be_util::prep_be_arg (char *s) char* val = arg + sizeof (stub_arg_include) - 1; be_global->stub_export_include (val); } + else if (ACE_OS::strstr (arg, stub_arg_file) == arg) + { + char* val = arg + sizeof (stub_arg_file) - 1; + be_global->stub_export_file (val); + } else if (ACE_OS::strstr (arg, anyop_arg_macro) == arg) { char* val = arg + sizeof (anyop_arg_macro) - 1; @@ -387,6 +399,11 @@ be_util::usage (void) )); ACE_DEBUG (( LM_DEBUG, + ACE_TEXT (" -Wb,stub_export_file=<filename>\t\tsets export ") + ACE_TEXT ("file for client only\n") + )); + ACE_DEBUG (( + LM_DEBUG, ACE_TEXT (" -Wb,skel_export_macro=<macro name>\t\tsets export ") ACE_TEXT ("macro for server files only\n") )); @@ -397,6 +414,11 @@ be_util::usage (void) )); ACE_DEBUG (( LM_DEBUG, + ACE_TEXT (" -Wb,skel_export_file=<include path>\t\tsets export ") + ACE_TEXT ("file for server only\n") + )); + ACE_DEBUG (( + LM_DEBUG, ACE_TEXT (" -Wb,anyop_export_macro=<macro name>\t\tsets export macro ") ACE_TEXT ("for typecode/Any operator files only, when -GA option ") ACE_TEXT ("is used\n") diff --git a/TAO_IDL/be/be_visitor_array/cdr_op_cs.cpp b/TAO_IDL/be/be_visitor_array/cdr_op_cs.cpp index 4f3cf7e2905..f66690d09d2 100644 --- a/TAO_IDL/be/be_visitor_array/cdr_op_cs.cpp +++ b/TAO_IDL/be/be_visitor_array/cdr_op_cs.cpp @@ -176,8 +176,8 @@ be_visitor_array_cdr_op_cs::visit_array (be_array *node) this->ctx_->sub_state (TAO_CodeGen::TAO_CDR_OUTPUT); *os << "::CORBA::Boolean operator<< (" << be_idt << be_idt_nl << "TAO_OutputCDR &strm," << be_nl - << "const " << fname << "_forany &_tao_array" << be_uidt_nl - << ")" << be_uidt_nl + << "const " << fname << "_forany &_tao_array)" << be_uidt + << be_uidt_nl << "{" << be_idt_nl; if (bt->accept (this) == -1) @@ -194,8 +194,8 @@ be_visitor_array_cdr_op_cs::visit_array (be_array *node) this->ctx_->sub_state (TAO_CodeGen::TAO_CDR_INPUT); *os << "::CORBA::Boolean operator>> (" << be_idt << be_idt_nl << "TAO_InputCDR &strm," << be_nl - << fname << "_forany &_tao_array" << be_uidt_nl - << ")" << be_uidt_nl + << fname << "_forany &_tao_array)" << be_uidt + << be_uidt_nl << "{" << be_idt_nl; if (bt->accept (this) == -1) @@ -503,8 +503,8 @@ be_visitor_array_cdr_op_cs::visit_predefined_type ( } } - *os << be_uidt_nl - << ");" << be_uidt << be_uidt << be_uidt_nl; + *os << ");" << be_uidt + << be_uidt << be_uidt << be_uidt_nl; return 0; } diff --git a/TAO_IDL/be/be_visitor_interface/cdr_op_cs.cpp b/TAO_IDL/be/be_visitor_interface/cdr_op_cs.cpp index 73b02626b19..5c81c3159a5 100644 --- a/TAO_IDL/be/be_visitor_interface/cdr_op_cs.cpp +++ b/TAO_IDL/be/be_visitor_interface/cdr_op_cs.cpp @@ -131,14 +131,14 @@ be_visitor_interface_cdr_op_cs::visit_interface (be_interface *node) { *os << node->flat_client_enclosing_scope () << node->base_proxy_broker_name () - << "_Factory_function_pointer" << be_uidt_nl; + << "_Factory_function_pointer"; } else { - *os << "0" << be_uidt_nl; + *os << "0"; } - *os << ");" << be_uidt_nl << be_uidt_nl; + *os << ");" << be_uidt << be_uidt_nl << be_uidt_nl; *os << "return true;" << be_uidt_nl << "}" << be_nl; diff --git a/TAO_IDL/be_include/be_global.h b/TAO_IDL/be_include/be_global.h index a7c0397d4ed..cdb382f7526 100644 --- a/TAO_IDL/be_include/be_global.h +++ b/TAO_IDL/be_include/be_global.h @@ -255,6 +255,14 @@ public: //// export macro definition. void skel_export_include (const char* s); + //// Returns the name of the include file that will be generated for the + //// server side export macro definition. + const char* skel_export_file (void) const; + + //// Set the name of the include file that the will be generated for server + //// side export macro definition. + void skel_export_file (const char* s); + //// Returns the macro name for exporting client side classes in Win32 //// DLL. const char* stub_export_macro (void) const; @@ -270,6 +278,14 @@ public: //// export macro definition. void stub_export_include (const char* s); + //// Returns the name of the include file will be generated for the client + //// side export macro definition. + const char* stub_export_file (void) const; + + //// Set the name of the include file that will be generated for the client + //// side export macro definition. + void stub_export_file (const char* s); + //// Returns the macro name for exporting *A.h file classes in Win32 //// DLL. const char* anyop_export_macro (void) const; @@ -883,8 +899,10 @@ private: // Macros and includes used to export classes from generated code. char* skel_export_macro_; char* skel_export_include_; + char* skel_export_file_; char* stub_export_macro_; char* stub_export_include_; + char* stub_export_file_; // Macro and include used on ORB .pidl files generating to the // AnyTypeCode library. @@ -1,4 +1,4 @@ -This is TAO version 2.0.3, released Thu Jun 23 13:46:08 CEST 2011 +This is TAO version 2.0.4, released Tue Aug 23 19:01:44 CEST 2011 If you have any problems with or questions about TAO, please send e-mail to the TAO mailing list (tao-bugs@list.isis.vanderbilt.edu), diff --git a/bin/tao_orb_tests.lst b/bin/tao_orb_tests.lst index 8fc623c3e5f..9fd01633c5f 100644 --- a/bin/tao_orb_tests.lst +++ b/bin/tao_orb_tests.lst @@ -84,6 +84,7 @@ TAO/tests/Bug_2186_Regression/run_test.pl: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MI TAO/tests/Bug_2188_Regression/run_test.pl: TAO/tests/Bug_2201_Regression/run_test.pl: TAO/tests/Bug_2234_Regression/run_test.pl: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !DISABLE_INTERCEPTORS +TAO/tests/Bug_2241_Regression/run_test.pl: !ST TAO/tests/Bug_2243_Regression/run_test.pl: TAO/tests/Bug_2289_Regression/run_test.pl: TAO/tests/Bug_2319_Regression/run_test.pl: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !FIXED_BUGS_ONLY diff --git a/docs/documentation.html b/docs/documentation.html index 1c4b1781b70..dd1433f43cb 100644 --- a/docs/documentation.html +++ b/docs/documentation.html @@ -25,7 +25,7 @@ bgcolor="#ffffff"> <dt> <img alt="o" src="redball.gif"> <a HREF="http://www.theaceorb.com/product/index.html">OCI TAO Developer's Guide</a> </dt><P> - <dt> <img alt="o" src="redball.gif"> <a HREF="http://www.theaceorb.nl/en/ace-tao-ciao-prod/tpg"">Remedy TAO Programmer's Guide</a> </dt><P> + <dt> <img alt="o" src="redball.gif"> <a HREF="http://www.theaceorb.nl/en/ace-tao-ciao-dance-prod/tpg">Remedy TAO Programmer's Guide</a> </dt><P> <dt> <img alt="o" src="redball.gif"> <a HREF="orbsvcs.html">Online ORB Services Documentation</a> </dt><P> diff --git a/examples/AMH/Sink_Server/client.cpp b/examples/AMH/Sink_Server/client.cpp index 3b8f5af6824..c5d6a00e3f5 100644 --- a/examples/AMH/Sink_Server/client.cpp +++ b/examples/AMH/Sink_Server/client.cpp @@ -7,24 +7,30 @@ int ACE_TMAIN(int argc, ACE_TCHAR *argv[]) { - CORBA::ORB_var orb = CORBA::ORB_init (argc, argv); + try + { + CORBA::ORB_var orb = CORBA::ORB_init (argc, argv); - Client_Task task (argc, argv); + Client_Task task (argc, argv); - if (task.parse_args () != 1) - { + if (task.parse_args () != 1) + { + ACE_OS::exit (1); + } - ACE_OS::exit (1); - } + task.try_RT_scheduling (); - task.try_RT_scheduling (); + if (task.narrow_servant (orb.in()) != 1) + { + ACE_OS::exit (1); + } - if (task.narrow_servant (orb.in()) != 1) + task.run_test(); + } + catch (const ::CORBA::Exception &ex) { - ACE_OS::exit (1); + ex._tao_print_exception ("ERROR : Unexpected CORBA exception caugth :"); } - task.run_test(); - return 0; } diff --git a/examples/Event_Comm/supplier.cpp b/examples/Event_Comm/supplier.cpp index 7991b1e4631..97431ab7973 100644 --- a/examples/Event_Comm/supplier.cpp +++ b/examples/Event_Comm/supplier.cpp @@ -70,14 +70,23 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[]) // Initialize server daemon. Supplier supplier; - if (supplier.init (argc, argv) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "%p\n", - "supplier init failed"), - 1); + try + { + + if (supplier.init (argc, argv) == -1) + ACE_ERROR_RETURN ((LM_ERROR, + "%p\n", + "supplier init failed"), + 1); - // Loop forever handling events. - supplier.run (); + // Loop forever handling events. + supplier.run (); + } + catch (const ::CORBA::Exception &e) + { + e._tao_print_exception ("Caught unexpected CORBA exception : "); + return 1; + } return 0; } diff --git a/examples/Persistent_Grid/Grid_i.h b/examples/Persistent_Grid/Grid_i.h index 31c3a766303..9a52fa905a3 100644 --- a/examples/Persistent_Grid/Grid_i.h +++ b/examples/Persistent_Grid/Grid_i.h @@ -66,8 +66,7 @@ private: /// Hold the pool of name pool_name_ pool_t *pool_t_; - /// Keeping g++2.7.2 - ACE_UNIMPLEMENTED_FUNC (void operator= (const Grid_Factory_i &)) + void operator= (const Grid_Factory_i &); }; @@ -86,11 +85,8 @@ public: /// Constructor Grid_i (void); - Grid_i (CORBA::Short, - CORBA::Short, - pool_t *); - - // Constructor. + /// Constructor. + Grid_i (CORBA::Short, CORBA::Short, pool_t *); /// Destructor ~Grid_i (void); diff --git a/examples/RTCORBA/Activity/svc.conf.client b/examples/RTCORBA/Activity/svc.conf.client index 89ae701d721..89ae701d721 100755..100644 --- a/examples/RTCORBA/Activity/svc.conf.client +++ b/examples/RTCORBA/Activity/svc.conf.client diff --git a/examples/RTCORBA/Activity/svc.conf.server b/examples/RTCORBA/Activity/svc.conf.server index 20de7d0b1d7..20de7d0b1d7 100755..100644 --- a/examples/RTCORBA/Activity/svc.conf.server +++ b/examples/RTCORBA/Activity/svc.conf.server diff --git a/examples/Simple/bank/AccountManager_i.h b/examples/Simple/bank/AccountManager_i.h index ede279c0840..ee2806ccc04 100644 --- a/examples/Simple/bank/AccountManager_i.h +++ b/examples/Simple/bank/AccountManager_i.h @@ -96,8 +96,7 @@ private: */ MAP_MANAGER_TYPE hash_map_; - /// Keeping g++2.7.2 - ACE_UNIMPLEMENTED_FUNC (void operator= (const AccountManager_i &)) + void operator= (const AccountManager_i &); }; #endif /* ACCOUNTMANAGER_I_H */ diff --git a/examples/Simple/bank/server.cpp b/examples/Simple/bank/server.cpp index a1c4987a0dc..63cd167bf87 100644 --- a/examples/Simple/bank/server.cpp +++ b/examples/Simple/bank/server.cpp @@ -32,6 +32,11 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[]) sysex._tao_print_exception ("System Exception"); return -1; } + catch (const ::CORBA::Exception &e) + { + e._tao_print_exception ("CORBA exception"); + return 1; + } return 0; } diff --git a/examples/Simple/echo/Echo_i.h b/examples/Simple/echo/Echo_i.h index 5afd29de0b1..6211b8ed499 100644 --- a/examples/Simple/echo/Echo_i.h +++ b/examples/Simple/echo/Echo_i.h @@ -24,7 +24,7 @@ * * @brief Echo Object Implementation * - * The object implementation performs teh following functions: + * The object implementation performs the following functions: * -- To return the string which needs to be displayed * from the server. * -- shuts down the server @@ -55,8 +55,7 @@ private: /// ORB pointer. CORBA::ORB_var orb_; - /// Keeping g++ 2.7.2 happy.. - ACE_UNIMPLEMENTED_FUNC (void operator= (const Echo_i&)) + void operator= (const Echo_i&); }; #endif /* ECHO_I_H */ diff --git a/examples/Simple/echo/server.cpp b/examples/Simple/echo/server.cpp index 2b8786e5cc2..4c9ab20ae95 100644 --- a/examples/Simple/echo/server.cpp +++ b/examples/Simple/echo/server.cpp @@ -33,6 +33,11 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[]) sysex._tao_print_exception ("System Exception"); return -1; } + catch (const ::CORBA::Exception &e) + { + e._tao_print_exception ("CORBA exception"); + return 1; + } return 0; } diff --git a/examples/Simple/grid/Grid_i.h b/examples/Simple/grid/Grid_i.h index 72166422d8a..7b9f581735a 100644 --- a/examples/Simple/grid/Grid_i.h +++ b/examples/Simple/grid/Grid_i.h @@ -116,8 +116,7 @@ private: /// ORB pointer. CORBA::ORB_var orb_; - /// Keeping g++2.7.2 - ACE_UNIMPLEMENTED_FUNC (void operator= (const Grid_Factory_i &)) + void operator= (const Grid_Factory_i &); }; #endif /* GRID_I_H */ diff --git a/examples/Simple/grid/server.cpp b/examples/Simple/grid/server.cpp index e627e46fc7e..ed349bf0ecd 100644 --- a/examples/Simple/grid/server.cpp +++ b/examples/Simple/grid/server.cpp @@ -35,6 +35,11 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[]) sysex._tao_print_exception ("System Exception in main "); return -1; } + catch (const ::CORBA::Exception &e) + { + e._tao_print_exception ("CORBA exception in main"); + return 1; + } return 0; } diff --git a/examples/Simple/time/Time_i.h b/examples/Simple/time/Time_i.h index 2260d52a185..d97c0937fa0 100644 --- a/examples/Simple/time/Time_i.h +++ b/examples/Simple/time/Time_i.h @@ -51,8 +51,7 @@ private: /// ORB pointer. CORBA::ORB_var orb_; - /// Keeping g++2.7.2 - ACE_UNIMPLEMENTED_FUNC (void operator= (const Time_i &)) + void operator= (const Time_i &); }; #endif /* TIME_I_H */ diff --git a/examples/Simple/time/server.cpp b/examples/Simple/time/server.cpp index ac8368fbdbf..7a19abd727f 100644 --- a/examples/Simple/time/server.cpp +++ b/examples/Simple/time/server.cpp @@ -33,6 +33,11 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[]) sysex._tao_print_exception ("System Exception in main"); return -1; } + catch (const ::CORBA::Exception &e) + { + e._tao_print_exception ("CORBA exception in main"); + return 1; + } return 0; } diff --git a/orbsvcs/orbsvcs/AV/AVStreams_i.h b/orbsvcs/orbsvcs/AV/AVStreams_i.h index 35d77b38b22..fb77a839fab 100644 --- a/orbsvcs/orbsvcs/AV/AVStreams_i.h +++ b/orbsvcs/orbsvcs/AV/AVStreams_i.h @@ -313,8 +313,7 @@ public: const char * format_name); virtual void set_dev_params (const char * flowName, - const CosPropertyService::Properties & new_params) -; + const CosPropertyService::Properties & new_params); protected: /// checks whether the flowname is in the flow_spec. diff --git a/orbsvcs/orbsvcs/PortableGroup/PG_Properties_Support.cpp b/orbsvcs/orbsvcs/PortableGroup/PG_Properties_Support.cpp index 9b6996230c1..41360c443d4 100644 --- a/orbsvcs/orbsvcs/PortableGroup/PG_Properties_Support.cpp +++ b/orbsvcs/orbsvcs/PortableGroup/PG_Properties_Support.cpp @@ -58,7 +58,7 @@ TAO::PG_Properties_Support::set_type_properties ( { ACE_GUARD (TAO_SYNCH_MUTEX, guard, this->internals_); - TAO::PG_Property_Set * typeid_properties; + TAO::PG_Property_Set * typeid_properties = 0; if ( 0 != this->properties_map_.find (type_id, typeid_properties)) { ACE_NEW_THROW_EX ( diff --git a/orbsvcs/orbsvcs/Property/CosPropertyService_i.cpp b/orbsvcs/orbsvcs/Property/CosPropertyService_i.cpp index 993f6eb0225..3a2156b6445 100644 --- a/orbsvcs/orbsvcs/Property/CosPropertyService_i.cpp +++ b/orbsvcs/orbsvcs/Property/CosPropertyService_i.cpp @@ -431,9 +431,7 @@ TAO_PropertySet::define_property (const char *property_name, CosProperty_Hash_Key hash_key (property_name); CosProperty_Hash_Value hash_value (property_value, CosPropertyService::normal); - COSPROPERTY_HASH_ENTRY *entry_ptr; - //CosProperty_Hash_Key old_key; - //CosProperty_Hash_Value old_value; + COSPROPERTY_HASH_ENTRY *entry_ptr = 0; int ret = this->hash_table_.bind (hash_key, hash_value, diff --git a/orbsvcs/tests/Bug_2112_Regression/client.cpp b/orbsvcs/tests/Bug_2112_Regression/client.cpp index 64b1aa5d13f..76822cee502 100644 --- a/orbsvcs/tests/Bug_2112_Regression/client.cpp +++ b/orbsvcs/tests/Bug_2112_Regression/client.cpp @@ -9,54 +9,62 @@ int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { int retval = 0; - // Initialise ORB - CORBA::ORB_var Orb = CORBA::ORB_init(argc, argv); + try + { + // Initialise ORB + CORBA::ORB_var Orb = CORBA::ORB_init(argc, argv); - // Set round-trip timeout - const int timeout_secs = 5; + // Set round-trip timeout + const int timeout_secs = 5; - CORBA::Object_var obj = Orb->resolve_initial_references ("ORBPolicyManager"); - CORBA::PolicyManager_var policy_manager = - CORBA::PolicyManager::_narrow (obj.in()); + CORBA::Object_var obj = Orb->resolve_initial_references ("ORBPolicyManager"); + CORBA::PolicyManager_var policy_manager = + CORBA::PolicyManager::_narrow (obj.in()); - CORBA::PolicyList policy_list; - policy_list.length(0); - policy_manager->set_policy_overrides(policy_list, CORBA::SET_OVERRIDE); + CORBA::PolicyList policy_list; + policy_list.length(0); + policy_manager->set_policy_overrides(policy_list, CORBA::SET_OVERRIDE); - TimeBase::TimeT timeout = timeout_secs * 10000000; - CORBA::Any orb_timeout; - orb_timeout <<= timeout; - policy_list.length(1); - policy_list[0] = Orb->create_policy( - Messaging::RELATIVE_RT_TIMEOUT_POLICY_TYPE, orb_timeout); + TimeBase::TimeT timeout = timeout_secs * 10000000; + CORBA::Any orb_timeout; + orb_timeout <<= timeout; + policy_list.length(1); + policy_list[0] = Orb->create_policy( + Messaging::RELATIVE_RT_TIMEOUT_POLICY_TYPE, orb_timeout); - policy_manager->set_policy_overrides(policy_list, CORBA::SET_OVERRIDE); + policy_manager->set_policy_overrides(policy_list, CORBA::SET_OVERRIDE); - // Now try to contact a server. - // Use a remote machine that is unreachable on the network. - const char * obj_ref = "corbaloc:iiop:1.0@123.123.123.123:4567/NameService"; + // Now try to contact a server. + // Use a remote machine that is unreachable on the network. + const char * obj_ref = "corbaloc:iiop:1.0@123.123.123.123:4567/NameService"; - obj = Orb->string_to_object(obj_ref); + obj = Orb->string_to_object(obj_ref); - CosNaming::NamingContext_var inc; - if(!CORBA::is_nil(obj.in ())) - { - ACE_DEBUG(( LM_INFO, "Attempting to contact %C\n", obj_ref )); - try - { - inc = CosNaming::NamingContext::_narrow(obj.in()); - ACE_DEBUG(( LM_INFO, "OK\n" )); - } - catch(const CORBA::TRANSIENT &) + CosNaming::NamingContext_var inc; + if(!CORBA::is_nil(obj.in ())) { - ACE_ERROR ((LM_ERROR, "Error, caught transient exception\n")); - retval = 1; - } - catch(const CORBA::TIMEOUT &) - { - ACE_DEBUG ((LM_DEBUG, "Caught correct timeout\n")); + ACE_DEBUG(( LM_INFO, "Attempting to contact %C\n", obj_ref )); + try + { + inc = CosNaming::NamingContext::_narrow(obj.in()); + ACE_DEBUG(( LM_INFO, "OK\n" )); + } + catch(const CORBA::TRANSIENT &) + { + ACE_ERROR ((LM_ERROR, "Error, caught transient exception\n")); + retval = 1; + } + catch(const CORBA::TIMEOUT &) + { + ACE_DEBUG ((LM_DEBUG, "Caught correct timeout\n")); + } } } + catch (const ::CORBA::Exception &ex) + { + ex._tao_print_exception("ERROR : unexpected CORBA exception caugth :"); + ++retval; + } return retval; } diff --git a/orbsvcs/tests/InterfaceRepo/Bug_2962_Regression/client.cpp b/orbsvcs/tests/InterfaceRepo/Bug_2962_Regression/client.cpp index 6b8f15dbcec..1626804a4bf 100644 --- a/orbsvcs/tests/InterfaceRepo/Bug_2962_Regression/client.cpp +++ b/orbsvcs/tests/InterfaceRepo/Bug_2962_Regression/client.cpp @@ -36,74 +36,84 @@ parse_args (int argc, ACE_TCHAR *argv[]) int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { - CORBA::ORB_var the_orb = CORBA::ORB_init (argc, argv); + try + { + CORBA::ORB_var the_orb = CORBA::ORB_init (argc, argv); - if (parse_args (argc, argv) != 0) - return 1; + if (parse_args (argc, argv) != 0) + return 1; - CORBA::Object_var obj = the_orb->string_to_object (ACE_TEXT_ALWAYS_CHAR(ifr_ior)); - if (CORBA::is_nil (obj.in())) - { - ACE_DEBUG ((LM_DEBUG, "Obtained nil reference to Object for interface repository\n" )); - return 1; - } - CORBA::ComponentIR::Repository_var ifr; - try - { - ifr = CORBA::ComponentIR::Repository::_narrow (obj.in()); - } - catch (CORBA::SystemException &) - { - ACE_DEBUG ((LM_DEBUG, "exception catched .. narrowing IFR object\n" )); - return 1; - } - if (CORBA::is_nil (ifr.in())) - { - ACE_DEBUG ((LM_DEBUG, "Can't narrow to IFR\n" )); - return 1; - } + CORBA::Object_var obj = the_orb->string_to_object (ACE_TEXT_ALWAYS_CHAR(ifr_ior)); + if (CORBA::is_nil (obj.in())) + { + ACE_DEBUG ((LM_DEBUG, "Obtained nil reference to Object for interface repository\n" )); + return 1; + } - ACE_DEBUG ((LM_DEBUG, "Looking up %C", member_type_id )); - CORBA::Contained_var - dependency = ifr->lookup_id (ACE_TEXT_ALWAYS_CHAR(member_type_id)); - if (CORBA::is_nil (dependency.in ())) - { - ACE_DEBUG ((LM_DEBUG, " *** failed ***\n" )); - return 1; - } + CORBA::ComponentIR::Repository_var ifr; - CORBA::AliasDef_var - the_alias = CORBA::AliasDef::_narrow (dependency.in ()); - if (CORBA::is_nil (the_alias.in ())) - { - ACE_DEBUG ((LM_DEBUG, " *** not an alias ***\n" )); - return 1; - } + try + { + ifr = CORBA::ComponentIR::Repository::_narrow (obj.in()); + } + catch (CORBA::SystemException &) + { + ACE_DEBUG ((LM_DEBUG, "exception catched .. narrowing IFR object\n" )); + return 1; + } - CORBA::IDLType_var - orig_type = the_alias->original_type_def (); - CORBA::TypeCode_var - tc_content = orig_type->type (); - const CORBA::ULong - length= tc_content->length (); - CORBA::TypeCode_var - cont_type = tc_content->content_type (); - const char - *name= cont_type->name (); - ACE_DEBUG ((LM_DEBUG, - " = %C [%u]\n", - name, - length )); + if (CORBA::is_nil (ifr.in())) + { + ACE_DEBUG ((LM_DEBUG, "Can't narrow to IFR\n" )); + return 1; + } - if (2u == length) - { - ACE_DEBUG ((LM_DEBUG, "Correct result, test passed\n" )); + ACE_DEBUG ((LM_DEBUG, "Looking up %C", member_type_id )); + CORBA::Contained_var + dependency = ifr->lookup_id (ACE_TEXT_ALWAYS_CHAR(member_type_id)); + if (CORBA::is_nil (dependency.in ())) + { + ACE_DEBUG ((LM_DEBUG, " *** failed ***\n" )); + return 1; + } + + CORBA::AliasDef_var + the_alias = CORBA::AliasDef::_narrow (dependency.in ()); + if (CORBA::is_nil (the_alias.in ())) + { + ACE_DEBUG ((LM_DEBUG, " *** not an alias ***\n" )); + return 1; + } + + CORBA::IDLType_var + orig_type = the_alias->original_type_def (); + CORBA::TypeCode_var + tc_content = orig_type->type (); + const CORBA::ULong + length= tc_content->length (); + CORBA::TypeCode_var + cont_type = tc_content->content_type (); + const char + *name= cont_type->name (); + ACE_DEBUG ((LM_DEBUG, + " = %C [%u]\n", + name, + length )); + + if (2u == length) + { + ACE_DEBUG ((LM_DEBUG, "Correct result, test passed\n" )); + } + else + { + ACE_DEBUG ((LM_DEBUG, "Error: Should have been %C [2]\n", name)); + return 2; + } } - else + catch (const ::CORBA::Exception &ex) { - ACE_DEBUG ((LM_DEBUG, "Error: Should have been %C [2]\n", name)); - return 2; + ex._tao_print_exception("ERROR : unexpected CORBA exception caugth :"); + return 1; } - - return 0; + return 0; } diff --git a/orbsvcs/tests/InterfaceRepo/Bug_3155_Regression/test_idl.cpp b/orbsvcs/tests/InterfaceRepo/Bug_3155_Regression/test_idl.cpp index ed87bdd9215..a69e2f32b25 100644 --- a/orbsvcs/tests/InterfaceRepo/Bug_3155_Regression/test_idl.cpp +++ b/orbsvcs/tests/InterfaceRepo/Bug_3155_Regression/test_idl.cpp @@ -57,70 +57,77 @@ parse_args (int argc, ACE_TCHAR *argv[]) int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { - // init orb - CORBA::ORB_var the_orb = - CORBA::ORB_init (argc, argv); - - if (parse_args (argc, argv) == -1) + try { - return -1; - } + // init orb + CORBA::ORB_var the_orb = + CORBA::ORB_init (argc, argv); - // get IFR - CORBA::Object_var objref = - the_orb->string_to_object (ifr_ior_file); - if (objref.in () == 0) - { - ACE_ERROR_RETURN ((LM_ERROR, - "The received objref is nil\n"), - -1); - } + if (parse_args (argc, argv) == -1) + { + return -1; + } - CORBA::ComponentIR::Repository_var the_repo_ref; - try - { - the_repo_ref = CORBA::ComponentIR::Repository::_narrow (objref.in ()); - } - catch (CORBA::Exception &ex) - { - ex._tao_print_exception ("Can't narrow the IFR:"); - return 1; - } + // get IFR + CORBA::Object_var objref = + the_orb->string_to_object (ifr_ior_file); + if (objref.in () == 0) + { + ACE_ERROR_RETURN ((LM_ERROR, + "The received objref is nil\n"), + -1); + } - // search in repository - CORBA::Contained_var current_contained = - the_repo_ref->lookup_id (ACE_TEXT_ALWAYS_CHAR (idl_value)); - if (CORBA::is_nil(current_contained.in ())) - { - ACE_ERROR_RETURN ((LM_ERROR, - "Can't look up the valuetype\n"), - -1); - } + CORBA::ComponentIR::Repository_var the_repo_ref; + try + { + the_repo_ref = CORBA::ComponentIR::Repository::_narrow (objref.in ()); + } + catch (CORBA::Exception &ex) + { + ex._tao_print_exception ("Can't narrow the IFR:"); + return 1; + } - // get value type definition - CORBA::ExtValueDef_var value_def = - CORBA::ExtValueDef::_narrow (current_contained.in ()); - CORBA::ExtValueDef::ExtFullValueDescription_var value_descr; - try - { - value_descr = value_def->describe_ext_value (); + // search in repository + CORBA::Contained_var current_contained = + the_repo_ref->lookup_id (ACE_TEXT_ALWAYS_CHAR (idl_value)); + if (CORBA::is_nil(current_contained.in ())) + { + ACE_ERROR_RETURN ((LM_ERROR, + "Can't look up the valuetype\n"), + -1); + } + + // get value type definition + CORBA::ExtValueDef_var value_def = + CORBA::ExtValueDef::_narrow (current_contained.in ()); + CORBA::ExtValueDef::ExtFullValueDescription_var value_descr; + try + { + value_descr = value_def->describe_ext_value (); + } + catch (CORBA::Exception &ex) + { + ex._tao_print_exception ("Can't describe_ext_value:"); + return 1; + } + + CORBA::ValueMemberSeq& the_value_members = + value_descr->members; + for (CORBA::ULong ct = 0; ct < the_value_members.length (); ++ct) + { + const CORBA::ValueMember& current_member = + the_value_members [ct]; + ACE_DEBUG ((LM_DEBUG, + "value type member '%C'\n", + current_member.name.in ())); + } } catch (CORBA::Exception &ex) { - ex._tao_print_exception ("Can't describe_ext_value:"); + ex._tao_print_exception ("MAIN: Unexpected CORBA exception caught:"); return 1; } - - CORBA::ValueMemberSeq& the_value_members = - value_descr->members; - for (CORBA::ULong ct = 0; ct < the_value_members.length (); ++ct) - { - const CORBA::ValueMember& current_member = - the_value_members [ct]; - ACE_DEBUG ((LM_DEBUG, - "value type member '%C'\n", - current_member.name.in ())); - } - return 0; } diff --git a/orbsvcs/tests/InterfaceRepo/Bug_3174_Regression/test_idl.cpp b/orbsvcs/tests/InterfaceRepo/Bug_3174_Regression/test_idl.cpp index d6af0b90df0..4b8d8b650a3 100644 --- a/orbsvcs/tests/InterfaceRepo/Bug_3174_Regression/test_idl.cpp +++ b/orbsvcs/tests/InterfaceRepo/Bug_3174_Regression/test_idl.cpp @@ -55,17 +55,16 @@ int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { int result= 0; ACE_DEBUG (( LM_DEBUG, "Start\n" )); - // init orb - CORBA::ORB_var the_orb = - CORBA::ORB_init (argc, argv); - - if (parse_args (argc, argv) == -1) - { - return -1; - } try { + // init orb + CORBA::ORB_var the_orb = + CORBA::ORB_init (argc, argv); + + if (parse_args (argc, argv) == -1) + return -1; + ACE_DEBUG (( LM_DEBUG, "Get IFR\n" )); CORBA::Object_var objref = the_orb->string_to_object (ifr_ior_file); diff --git a/orbsvcs/tests/InterfaceRepo/Union_Forward_Test/client.cpp b/orbsvcs/tests/InterfaceRepo/Union_Forward_Test/client.cpp index b88aec910d0..f57bec82ddf 100644 --- a/orbsvcs/tests/InterfaceRepo/Union_Forward_Test/client.cpp +++ b/orbsvcs/tests/InterfaceRepo/Union_Forward_Test/client.cpp @@ -9,54 +9,61 @@ int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { //init IFR objref + try + { + CORBA::ORB_var orb = CORBA::ORB_init (argc, argv); - CORBA::ORB_var orb = CORBA::ORB_init (argc, argv); + TAO_IFR_Client_Adapter *ifr_client = + ACE_Dynamic_Service<TAO_IFR_Client_Adapter>::instance ( + TAO_ORB_Core::ifr_client_adapter_name ()); - TAO_IFR_Client_Adapter *ifr_client = - ACE_Dynamic_Service<TAO_IFR_Client_Adapter>::instance ( - TAO_ORB_Core::ifr_client_adapter_name ()); + if (ifr_client == 0) + { + throw ::CORBA::INTF_REPOS (); + } - if (ifr_client == 0) - { - throw ::CORBA::INTF_REPOS (); - } + ACE_DEBUG ((LM_DEBUG, "Got IFR_Client ref.\n")); - ACE_DEBUG ((LM_DEBUG, "Got IFR_Client ref.\n")); + CORBA::InterfaceDef_var intDef = + ifr_client->get_interface (orb.in (), "IDL:IFR_Test/test_if:1.0"); - CORBA::InterfaceDef_var intDef = - ifr_client->get_interface (orb.in (), "IDL:IFR_Test/test_if:1.0"); + if (CORBA::is_nil (intDef.in ())) + { + ACE_ERROR_RETURN ((LM_ERROR, + "get interface returned nil ref\n"), + 1); + } - if (CORBA::is_nil (intDef.in ())) - { - ACE_ERROR_RETURN ((LM_ERROR, - "get interface returned nil ref\n"), - 1); - } + CORBA::ContainedSeq_var attributes = + intDef->contents (CORBA::dk_Attribute, 1); + CORBA::ULong n_ats = attributes->length (); - CORBA::ContainedSeq_var attributes = - intDef->contents (CORBA::dk_Attribute, 1); - CORBA::ULong n_ats = attributes->length (); + CORBA::ULong index = 0UL; + CORBA::String_var name = attributes[index]->name (); + ACE_DEBUG ((LM_DEBUG, + "found %d attributes, name = %s\n", + n_ats, + name.in ())); - CORBA::ULong index = 0UL; - CORBA::String_var name = attributes[index]->name (); - ACE_DEBUG ((LM_DEBUG, - "found %d attributes, name = %s\n", - n_ats, - name.in ())); + CORBA::AttributeDef_var attr = + CORBA::AttributeDef::_narrow (attributes[index]); - CORBA::AttributeDef_var attr = - CORBA::AttributeDef::_narrow (attributes[index]); + if (CORBA::is_nil (attr.in ())) + { + ACE_ERROR_RETURN ((LM_ERROR, + "could not narrow attribute ref\n"), + 1); + } - if (CORBA::is_nil (attr.in ())) + CORBA::TypeCode_var tc = attr->type (); + + ACE_DEBUG ((LM_DEBUG, "foo attr typecode = %s\n", tc->id ())); + } + catch (const ::CORBA::Exception &ex) { - ACE_ERROR_RETURN ((LM_ERROR, - "could not narrow attribute ref\n"), - 1); + ex._tao_print_exception("ERROR : unexpected CORBA exception caugth :"); + return 1; } - CORBA::TypeCode_var tc = attr->type (); - - ACE_DEBUG ((LM_DEBUG, "foo attr typecode = %s\n", tc->id ())); - return 0; } diff --git a/orbsvcs/tests/Notify/lib/Peer_T.cpp b/orbsvcs/tests/Notify/lib/Peer_T.cpp index 62a30ea9a2a..c93dd2a6af9 100644 --- a/orbsvcs/tests/Notify/lib/Peer_T.cpp +++ b/orbsvcs/tests/Notify/lib/Peer_T.cpp @@ -155,8 +155,6 @@ TAO_Notify_Tests_Peer_T<Peer_Traits>::status (void) "Peer %s is_equivanent other exception.", this->name_.c_str ())); } -#else -; #endif /* TAO_HAS_MINIMUM_CORBA */ } diff --git a/orbsvcs/tests/Security/BiDirectional/ssl/ca.pem b/orbsvcs/tests/Security/BiDirectional/ssl/ca.pem index 05c2387f5c8..f580b756820 100644 --- a/orbsvcs/tests/Security/BiDirectional/ssl/ca.pem +++ b/orbsvcs/tests/Security/BiDirectional/ssl/ca.pem @@ -1,34 +1,34 @@ -----BEGIN CERTIFICATE----- -MIICyDCCAjGgAwIBAgIJAOtnDNOy1r76MA0GCSqGSIb3DQEBBAUAME0xCzAJBgNV +MIICyDCCAjGgAwIBAgIJAJLBvLx9WUXKMA0GCSqGSIb3DQEBBQUAME0xCzAJBgNV BAYTAlVTMQswCQYDVQQIEwJNTzESMBAGA1UEBxMJU3QuIExvdWlzMQwwCgYDVQQK -EwNPQ0kxDzANBgNVBAMTBnNlcnZlcjAeFw0wOTA5MDIwOTE0MjdaFw0xMDA5MDIw -OTE0MjdaME0xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJNTzESMBAGA1UEBxMJU3Qu +EwNPQ0kxDzANBgNVBAMTBnNlcnZlcjAeFw0xMTA4MjIxNTMyMjNaFw0xMjA4MjEx +NTMyMjNaME0xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJNTzESMBAGA1UEBxMJU3Qu IExvdWlzMQwwCgYDVQQKEwNPQ0kxDzANBgNVBAMTBnNlcnZlcjCBnzANBgkqhkiG -9w0BAQEFAAOBjQAwgYkCgYEAtgLRQTR0cglW88zdM0KU/Umx1ma6U3i9OxSZWJng -mDtfZGxKDDzROAUg2pnxzaXbbPxatFKBPb/NhzPXHZUK6qfBmwmiH+APoHMuKBmn -izL2Jt2V8LNzCmJcHPDJJuG7usdBH36CUuC33Z6BPxwLLYkTGT5lUkICWlduZRid -BssCAwEAAaOBrzCBrDAdBgNVHQ4EFgQU+KYirnLzyICLQxyEybtrOvJ8ekEwfQYD -VR0jBHYwdIAU+KYirnLzyICLQxyEybtrOvJ8ekGhUaRPME0xCzAJBgNVBAYTAlVT +9w0BAQEFAAOBjQAwgYkCgYEAzqVyUomhG3Zjvn6up7p2QCtjVOWMzeVr1aWYu2Ce +W+ts/bwhmLVnp2qiANYQbQF47sHkxtL3KYa3aQy2JFwmJqPa4k478mg/316Fy9Yc +MxL7l9rDC3GLdSyq4M6xqtYz12RepUydFwGfphvpL7augq/iKOjYsotezpUH87Ok +vtkCAwEAAaOBrzCBrDAdBgNVHQ4EFgQUE+ZKmmcNsspWePyp/z0dRJor4IowfQYD +VR0jBHYwdIAUE+ZKmmcNsspWePyp/z0dRJor4IqhUaRPME0xCzAJBgNVBAYTAlVT MQswCQYDVQQIEwJNTzESMBAGA1UEBxMJU3QuIExvdWlzMQwwCgYDVQQKEwNPQ0kx -DzANBgNVBAMTBnNlcnZlcoIJAOtnDNOy1r76MAwGA1UdEwQFMAMBAf8wDQYJKoZI -hvcNAQEEBQADgYEAac1LPqFHgE04iIltUtwvDd5KaSkbkwRCJ3xA8BACIimFYyoY -2uahz4c/9F/3rw2oAil5b7RN+9RnGSVZYwYRd6z1sul5URiWQ7sQ3ZfVrS7pOhbE -nephLwFScEOdW7GaQcCkexqgvQaXACgQMEGDKkzgbTmXmVbwQbzbWqWbSx8= +DzANBgNVBAMTBnNlcnZlcoIJAJLBvLx9WUXKMAwGA1UdEwQFMAMBAf8wDQYJKoZI +hvcNAQEFBQADgYEALoJCh6ZO52X3BfO/WbuBmvLbjwoX5LQdR+P/Ckz5ZKNdVTSI +SkDDS+DUB77DMstAq65kcfq+gFwedb2k82Uk1TkenQ0BX3dBkAO2w5M2ipqHN2ez +3kQ//pzWh/+k8QNgbQSwxKA2UwkbXBhDc2KbT+klhqCGA2hl0KySImgX5Jk= -----END CERTIFICATE----- -----BEGIN CERTIFICATE----- -MIICyDCCAjGgAwIBAgIJAIWuLPvf+I38MA0GCSqGSIb3DQEBBAUAME0xCzAJBgNV +MIICyDCCAjGgAwIBAgIJAJfoN7qD0W7YMA0GCSqGSIb3DQEBBQUAME0xCzAJBgNV BAYTAlVTMQswCQYDVQQIEwJNTzESMBAGA1UEBxMJU3QuIExvdWlzMQwwCgYDVQQK -EwNPQ0kxDzANBgNVBAMTBmNsaWVudDAeFw0wOTA5MDIwOTE0MjdaFw0xMDA5MDIw -OTE0MjdaME0xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJNTzESMBAGA1UEBxMJU3Qu +EwNPQ0kxDzANBgNVBAMTBmNsaWVudDAeFw0xMTA4MjIxNTMyMjRaFw0xMjA4MjEx +NTMyMjRaME0xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJNTzESMBAGA1UEBxMJU3Qu IExvdWlzMQwwCgYDVQQKEwNPQ0kxDzANBgNVBAMTBmNsaWVudDCBnzANBgkqhkiG -9w0BAQEFAAOBjQAwgYkCgYEA6quNMlXAgLnnMZtjMzfj+q7tP9vLWy6CkbVJq9TM -xGVMfNZ6UIQqA9rZsiYnz+hHX5tnt6RIlHzhMTPTA4FPyHFlPdJjkTPvfyp0F+sf -H5cBNUemDWYB6cz3uzxMet146qYKKea8QgIyKhCy0/TUZU/sb8VFgZP/zMxpo6OZ -BOkCAwEAAaOBrzCBrDAdBgNVHQ4EFgQUr9z2Ep75QKJkVUgBC8NpnKOmX0UwfQYD -VR0jBHYwdIAUr9z2Ep75QKJkVUgBC8NpnKOmX0WhUaRPME0xCzAJBgNVBAYTAlVT +9w0BAQEFAAOBjQAwgYkCgYEA2qjlVQ1oFxHyEc6FueJf1ZgpU5TFCzW47eNTDWSg +mZELK72neyZ9rtBHqUGmOYU4pNMDz9vqc3gZ29c0wesNgKRM9Xsc/9CXLZK3eSYY +qiqxjrwG/2EnAXprskgK2Mrt26HdfKUBq7wdQwmLrleNtUoeKHyQyfe+eL/BTMSP +GMMCAwEAAaOBrzCBrDAdBgNVHQ4EFgQUnO1q8yoFZPjmMm0Wu3TJT0gOFuIwfQYD +VR0jBHYwdIAUnO1q8yoFZPjmMm0Wu3TJT0gOFuKhUaRPME0xCzAJBgNVBAYTAlVT MQswCQYDVQQIEwJNTzESMBAGA1UEBxMJU3QuIExvdWlzMQwwCgYDVQQKEwNPQ0kx -DzANBgNVBAMTBmNsaWVudIIJAIWuLPvf+I38MAwGA1UdEwQFMAMBAf8wDQYJKoZI -hvcNAQEEBQADgYEAGD6R4borxgxTJHHgKe5+xfYMVTLVVqS2Ku3inlzSIFaPXrbl -Y/WEN3rUUWUf7RU0vhbiVS14hBCTgd9Y6STBC8dkbSBb979VPWefUgQc21/O6bO6 -zCNm0f4EHvYyxDANtlVOIiYn7KaM4SQUT1u3kVH2M5uD3NABLgdutE1297I= +DzANBgNVBAMTBmNsaWVudIIJAJfoN7qD0W7YMAwGA1UdEwQFMAMBAf8wDQYJKoZI +hvcNAQEFBQADgYEArzMbOXyqBde8fjozyOOWEQcP+MppUbOVAXfdntbDwVYEld7S +PofHVJ9jMNFN3HR5B7/5+NcwQRX6qivudMA5CXGyBTkH8Eeuth9E76tb6QJv8nTX +bnIkk87foDoTxjHNkeBsNV89k2lMF721084yaISR4JJAJ5tRU0xXOzNkkpw= -----END CERTIFICATE----- diff --git a/orbsvcs/tests/Security/BiDirectional/ssl/client-cert.pem b/orbsvcs/tests/Security/BiDirectional/ssl/client-cert.pem index 124e8f3a380..cc35017c829 100644 --- a/orbsvcs/tests/Security/BiDirectional/ssl/client-cert.pem +++ b/orbsvcs/tests/Security/BiDirectional/ssl/client-cert.pem @@ -1,17 +1,17 @@ -----BEGIN CERTIFICATE----- -MIICyDCCAjGgAwIBAgIJAIWuLPvf+I38MA0GCSqGSIb3DQEBBAUAME0xCzAJBgNV +MIICyDCCAjGgAwIBAgIJAJfoN7qD0W7YMA0GCSqGSIb3DQEBBQUAME0xCzAJBgNV BAYTAlVTMQswCQYDVQQIEwJNTzESMBAGA1UEBxMJU3QuIExvdWlzMQwwCgYDVQQK -EwNPQ0kxDzANBgNVBAMTBmNsaWVudDAeFw0wOTA5MDIwOTE0MjdaFw0xMDA5MDIw -OTE0MjdaME0xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJNTzESMBAGA1UEBxMJU3Qu +EwNPQ0kxDzANBgNVBAMTBmNsaWVudDAeFw0xMTA4MjIxNTMyMjRaFw0xMjA4MjEx +NTMyMjRaME0xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJNTzESMBAGA1UEBxMJU3Qu IExvdWlzMQwwCgYDVQQKEwNPQ0kxDzANBgNVBAMTBmNsaWVudDCBnzANBgkqhkiG -9w0BAQEFAAOBjQAwgYkCgYEA6quNMlXAgLnnMZtjMzfj+q7tP9vLWy6CkbVJq9TM -xGVMfNZ6UIQqA9rZsiYnz+hHX5tnt6RIlHzhMTPTA4FPyHFlPdJjkTPvfyp0F+sf -H5cBNUemDWYB6cz3uzxMet146qYKKea8QgIyKhCy0/TUZU/sb8VFgZP/zMxpo6OZ -BOkCAwEAAaOBrzCBrDAdBgNVHQ4EFgQUr9z2Ep75QKJkVUgBC8NpnKOmX0UwfQYD -VR0jBHYwdIAUr9z2Ep75QKJkVUgBC8NpnKOmX0WhUaRPME0xCzAJBgNVBAYTAlVT +9w0BAQEFAAOBjQAwgYkCgYEA2qjlVQ1oFxHyEc6FueJf1ZgpU5TFCzW47eNTDWSg +mZELK72neyZ9rtBHqUGmOYU4pNMDz9vqc3gZ29c0wesNgKRM9Xsc/9CXLZK3eSYY +qiqxjrwG/2EnAXprskgK2Mrt26HdfKUBq7wdQwmLrleNtUoeKHyQyfe+eL/BTMSP +GMMCAwEAAaOBrzCBrDAdBgNVHQ4EFgQUnO1q8yoFZPjmMm0Wu3TJT0gOFuIwfQYD +VR0jBHYwdIAUnO1q8yoFZPjmMm0Wu3TJT0gOFuKhUaRPME0xCzAJBgNVBAYTAlVT MQswCQYDVQQIEwJNTzESMBAGA1UEBxMJU3QuIExvdWlzMQwwCgYDVQQKEwNPQ0kx -DzANBgNVBAMTBmNsaWVudIIJAIWuLPvf+I38MAwGA1UdEwQFMAMBAf8wDQYJKoZI -hvcNAQEEBQADgYEAGD6R4borxgxTJHHgKe5+xfYMVTLVVqS2Ku3inlzSIFaPXrbl -Y/WEN3rUUWUf7RU0vhbiVS14hBCTgd9Y6STBC8dkbSBb979VPWefUgQc21/O6bO6 -zCNm0f4EHvYyxDANtlVOIiYn7KaM4SQUT1u3kVH2M5uD3NABLgdutE1297I= +DzANBgNVBAMTBmNsaWVudIIJAJfoN7qD0W7YMAwGA1UdEwQFMAMBAf8wDQYJKoZI +hvcNAQEFBQADgYEArzMbOXyqBde8fjozyOOWEQcP+MppUbOVAXfdntbDwVYEld7S +PofHVJ9jMNFN3HR5B7/5+NcwQRX6qivudMA5CXGyBTkH8Eeuth9E76tb6QJv8nTX +bnIkk87foDoTxjHNkeBsNV89k2lMF721084yaISR4JJAJ5tRU0xXOzNkkpw= -----END CERTIFICATE----- diff --git a/orbsvcs/tests/Security/BiDirectional/ssl/client-key.pem b/orbsvcs/tests/Security/BiDirectional/ssl/client-key.pem index 9155f04ba83..adfbf067d3d 100644 --- a/orbsvcs/tests/Security/BiDirectional/ssl/client-key.pem +++ b/orbsvcs/tests/Security/BiDirectional/ssl/client-key.pem @@ -1,32 +1,32 @@ -----BEGIN RSA PRIVATE KEY----- -MIICWwIBAAKBgQDqq40yVcCAuecxm2MzN+P6ru0/28tbLoKRtUmr1MzEZUx81npQ -hCoD2tmyJifP6Edfm2e3pEiUfOExM9MDgU/IcWU90mORM+9/KnQX6x8flwE1R6YN -ZgHpzPe7PEx63Xjqpgop5rxCAjIqELLT9NRlT+xvxUWBk//MzGmjo5kE6QIDAQAB -AoGAaVARrowjNuG26mFElIC5lA+aszTNPx9RQ1irNizqtByNxdxuyeF2BYLafYN4 -DGq+VR6l3hkg5VphqTYLtZ/7kCmVExF+csCKWMcGfz53Cm3XXZ/t5JERxgTy7tu4 -xP+2kavP0xPOvO/IdnU2/fcduwcV5RmZtmvNCr6wo0q00f0CQQD8ZTTC4S4hyYJS -yGVr0Lf2PdaY4gLjkLZnMFePjVQnzQ/wZ1FAbbCznO7FAg5/gtWKiV+KwFPKbqXT -rmEpra4fAkEA7gWKHPqdx+9vfcVjyQmL7PY1CgH3oWH8KbhZohQbXST2KwRaHF0q -tKmh2gbc/loU8Eg1kL71Eyp48Q9KWb9b9wJAK/AudDKhRk5/OowaY9+M9vgi8LB/ -0j/yERqwU5RF7zvap35E/dNarJoIUxGdloMfS6PIly4OKDKE+cnkrk3G/wJAaHh7 -9140tJWuLNjfhFSxWs9x1jOo2eelAzbL+Ky0mfxoI9dkKcDmxqcRyB1tECK/v/sh -r6dw7/mbXcrlSmEIXwJAE0hPm34eYuPv10urR8I2zNMGL6htgTwlKBN6UddtNSEC -nTDUIxfgghGE7uq2WCZmgAp5TQm+weSsA5RaI4rnDg== +MIICXgIBAAKBgQDaqOVVDWgXEfIRzoW54l/VmClTlMULNbjt41MNZKCZkQsrvad7 +Jn2u0EepQaY5hTik0wPP2+pzeBnb1zTB6w2ApEz1exz/0Jctkrd5JhiqKrGOvAb/ +YScBemuySArYyu3bod18pQGrvB1DCYuuV421Sh4ofJDJ9754v8FMxI8YwwIDAQAB +AoGBAKVNs/olpYBzX6aYk74gZkTqwKtgN8qutXyaM6pXXZZa8bACs7/FLJTg/pv1 +dn3buiPZJvOYFNlwfVQWkNrdIRmuvtPOhdacBTcZiYWQ8GesNfwlHwBXCI9vrRq2 +FJh196mHwbRx2b8IsymilQ24TMvwkvEpFqLA02d/igdUokghAkEA8zSVZ1OOE8so +aSAj45ZcdQJ8hPPDqabacjEHnLXj7rJCof2M1VQwLMj8krLxoMTA29fYzwWF5lpT +3zWbgS02kwJBAOYpvSItytP2LA5PrSC03Wa+cPJdBBQBmsRaNulcP+CZKiY2e7nh +1zXN7QOdBTXsCE/A8QXqpl+Omt3HUg1iQxECQQCcyrrDSYfgVOpxk8nvcMGcogS7 +BhiPqEVOtzNMIauX+I6itr7zzXnddZn3zaufVRls4iQhm1Lu5i8KSRo+1nJHAkBg +lfdmlmzdUhrezpTKetvGN/jR3DLP6nR2HZ2ZhDrSF7RWYNq/AIT9cTMbJxN+s1Qx +k7gRUY0L4J4gn3pRX4DhAkEA8Unw8+j8wbQ6gH9erqpRSlEtYZePh/cY10h3SBZ3 +eD6ZFqsYIHtAJMVqzSZFuWjBIk0e57RH7NRgfCFPl3VJew== -----END RSA PRIVATE KEY----- -----BEGIN CERTIFICATE----- -MIICyDCCAjGgAwIBAgIJAIWuLPvf+I38MA0GCSqGSIb3DQEBBAUAME0xCzAJBgNV +MIICyDCCAjGgAwIBAgIJAJfoN7qD0W7YMA0GCSqGSIb3DQEBBQUAME0xCzAJBgNV BAYTAlVTMQswCQYDVQQIEwJNTzESMBAGA1UEBxMJU3QuIExvdWlzMQwwCgYDVQQK -EwNPQ0kxDzANBgNVBAMTBmNsaWVudDAeFw0wOTA5MDIwOTE0MjdaFw0xMDA5MDIw -OTE0MjdaME0xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJNTzESMBAGA1UEBxMJU3Qu +EwNPQ0kxDzANBgNVBAMTBmNsaWVudDAeFw0xMTA4MjIxNTMyMjRaFw0xMjA4MjEx +NTMyMjRaME0xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJNTzESMBAGA1UEBxMJU3Qu IExvdWlzMQwwCgYDVQQKEwNPQ0kxDzANBgNVBAMTBmNsaWVudDCBnzANBgkqhkiG -9w0BAQEFAAOBjQAwgYkCgYEA6quNMlXAgLnnMZtjMzfj+q7tP9vLWy6CkbVJq9TM -xGVMfNZ6UIQqA9rZsiYnz+hHX5tnt6RIlHzhMTPTA4FPyHFlPdJjkTPvfyp0F+sf -H5cBNUemDWYB6cz3uzxMet146qYKKea8QgIyKhCy0/TUZU/sb8VFgZP/zMxpo6OZ -BOkCAwEAAaOBrzCBrDAdBgNVHQ4EFgQUr9z2Ep75QKJkVUgBC8NpnKOmX0UwfQYD -VR0jBHYwdIAUr9z2Ep75QKJkVUgBC8NpnKOmX0WhUaRPME0xCzAJBgNVBAYTAlVT +9w0BAQEFAAOBjQAwgYkCgYEA2qjlVQ1oFxHyEc6FueJf1ZgpU5TFCzW47eNTDWSg +mZELK72neyZ9rtBHqUGmOYU4pNMDz9vqc3gZ29c0wesNgKRM9Xsc/9CXLZK3eSYY +qiqxjrwG/2EnAXprskgK2Mrt26HdfKUBq7wdQwmLrleNtUoeKHyQyfe+eL/BTMSP +GMMCAwEAAaOBrzCBrDAdBgNVHQ4EFgQUnO1q8yoFZPjmMm0Wu3TJT0gOFuIwfQYD +VR0jBHYwdIAUnO1q8yoFZPjmMm0Wu3TJT0gOFuKhUaRPME0xCzAJBgNVBAYTAlVT MQswCQYDVQQIEwJNTzESMBAGA1UEBxMJU3QuIExvdWlzMQwwCgYDVQQKEwNPQ0kx -DzANBgNVBAMTBmNsaWVudIIJAIWuLPvf+I38MAwGA1UdEwQFMAMBAf8wDQYJKoZI -hvcNAQEEBQADgYEAGD6R4borxgxTJHHgKe5+xfYMVTLVVqS2Ku3inlzSIFaPXrbl -Y/WEN3rUUWUf7RU0vhbiVS14hBCTgd9Y6STBC8dkbSBb979VPWefUgQc21/O6bO6 -zCNm0f4EHvYyxDANtlVOIiYn7KaM4SQUT1u3kVH2M5uD3NABLgdutE1297I= +DzANBgNVBAMTBmNsaWVudIIJAJfoN7qD0W7YMAwGA1UdEwQFMAMBAf8wDQYJKoZI +hvcNAQEFBQADgYEArzMbOXyqBde8fjozyOOWEQcP+MppUbOVAXfdntbDwVYEld7S +PofHVJ9jMNFN3HR5B7/5+NcwQRX6qivudMA5CXGyBTkH8Eeuth9E76tb6QJv8nTX +bnIkk87foDoTxjHNkeBsNV89k2lMF721084yaISR4JJAJ5tRU0xXOzNkkpw= -----END CERTIFICATE----- diff --git a/orbsvcs/tests/Security/BiDirectional/ssl/server-cert.pem b/orbsvcs/tests/Security/BiDirectional/ssl/server-cert.pem index 71994081f3e..5438e2a4dda 100644 --- a/orbsvcs/tests/Security/BiDirectional/ssl/server-cert.pem +++ b/orbsvcs/tests/Security/BiDirectional/ssl/server-cert.pem @@ -1,17 +1,17 @@ -----BEGIN CERTIFICATE----- -MIICyDCCAjGgAwIBAgIJAOtnDNOy1r76MA0GCSqGSIb3DQEBBAUAME0xCzAJBgNV +MIICyDCCAjGgAwIBAgIJAJLBvLx9WUXKMA0GCSqGSIb3DQEBBQUAME0xCzAJBgNV BAYTAlVTMQswCQYDVQQIEwJNTzESMBAGA1UEBxMJU3QuIExvdWlzMQwwCgYDVQQK -EwNPQ0kxDzANBgNVBAMTBnNlcnZlcjAeFw0wOTA5MDIwOTE0MjdaFw0xMDA5MDIw -OTE0MjdaME0xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJNTzESMBAGA1UEBxMJU3Qu +EwNPQ0kxDzANBgNVBAMTBnNlcnZlcjAeFw0xMTA4MjIxNTMyMjNaFw0xMjA4MjEx +NTMyMjNaME0xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJNTzESMBAGA1UEBxMJU3Qu IExvdWlzMQwwCgYDVQQKEwNPQ0kxDzANBgNVBAMTBnNlcnZlcjCBnzANBgkqhkiG -9w0BAQEFAAOBjQAwgYkCgYEAtgLRQTR0cglW88zdM0KU/Umx1ma6U3i9OxSZWJng -mDtfZGxKDDzROAUg2pnxzaXbbPxatFKBPb/NhzPXHZUK6qfBmwmiH+APoHMuKBmn -izL2Jt2V8LNzCmJcHPDJJuG7usdBH36CUuC33Z6BPxwLLYkTGT5lUkICWlduZRid -BssCAwEAAaOBrzCBrDAdBgNVHQ4EFgQU+KYirnLzyICLQxyEybtrOvJ8ekEwfQYD -VR0jBHYwdIAU+KYirnLzyICLQxyEybtrOvJ8ekGhUaRPME0xCzAJBgNVBAYTAlVT +9w0BAQEFAAOBjQAwgYkCgYEAzqVyUomhG3Zjvn6up7p2QCtjVOWMzeVr1aWYu2Ce +W+ts/bwhmLVnp2qiANYQbQF47sHkxtL3KYa3aQy2JFwmJqPa4k478mg/316Fy9Yc +MxL7l9rDC3GLdSyq4M6xqtYz12RepUydFwGfphvpL7augq/iKOjYsotezpUH87Ok +vtkCAwEAAaOBrzCBrDAdBgNVHQ4EFgQUE+ZKmmcNsspWePyp/z0dRJor4IowfQYD +VR0jBHYwdIAUE+ZKmmcNsspWePyp/z0dRJor4IqhUaRPME0xCzAJBgNVBAYTAlVT MQswCQYDVQQIEwJNTzESMBAGA1UEBxMJU3QuIExvdWlzMQwwCgYDVQQKEwNPQ0kx -DzANBgNVBAMTBnNlcnZlcoIJAOtnDNOy1r76MAwGA1UdEwQFMAMBAf8wDQYJKoZI -hvcNAQEEBQADgYEAac1LPqFHgE04iIltUtwvDd5KaSkbkwRCJ3xA8BACIimFYyoY -2uahz4c/9F/3rw2oAil5b7RN+9RnGSVZYwYRd6z1sul5URiWQ7sQ3ZfVrS7pOhbE -nephLwFScEOdW7GaQcCkexqgvQaXACgQMEGDKkzgbTmXmVbwQbzbWqWbSx8= +DzANBgNVBAMTBnNlcnZlcoIJAJLBvLx9WUXKMAwGA1UdEwQFMAMBAf8wDQYJKoZI +hvcNAQEFBQADgYEALoJCh6ZO52X3BfO/WbuBmvLbjwoX5LQdR+P/Ckz5ZKNdVTSI +SkDDS+DUB77DMstAq65kcfq+gFwedb2k82Uk1TkenQ0BX3dBkAO2w5M2ipqHN2ez +3kQ//pzWh/+k8QNgbQSwxKA2UwkbXBhDc2KbT+klhqCGA2hl0KySImgX5Jk= -----END CERTIFICATE----- diff --git a/orbsvcs/tests/Security/BiDirectional/ssl/server-key.pem b/orbsvcs/tests/Security/BiDirectional/ssl/server-key.pem index 0ef9a7b80f2..673dcab56db 100644 --- a/orbsvcs/tests/Security/BiDirectional/ssl/server-key.pem +++ b/orbsvcs/tests/Security/BiDirectional/ssl/server-key.pem @@ -1,32 +1,32 @@ -----BEGIN RSA PRIVATE KEY----- -MIICXQIBAAKBgQC2AtFBNHRyCVbzzN0zQpT9SbHWZrpTeL07FJlYmeCYO19kbEoM -PNE4BSDamfHNpdts/Fq0UoE9v82HM9cdlQrqp8GbCaIf4A+gcy4oGaeLMvYm3ZXw -s3MKYlwc8Mkm4bu6x0EffoJS4LfdnoE/HAstiRMZPmVSQgJaV25lGJ0GywIDAQAB -AoGBALGlLFHk/aZz4S9Ri7BFUx+oNu/ZEhD4blFkuIrWnXRXtrJQUzGAhn+T2c4i -pPQf5nuIDoujX0tCkjpc6Z+Q4bYhQFuWl0Q11hZ0T/QAUxMVgnLrAqivp7NePN+P -tkO6IJrZjWfO3AQy0TM3/VKQpVH2QmQqKUDr/d9rG21t9z0RAkEA6kTLEx68YHGG -2lPURn7nMVlUdPonyAslEmH8P+YKT3W564VDgH6117/d3V+T0rlfqUK5XBnMxfDi -hCHSTdF3kwJBAMblDdMxyvd4TVoOjwpEwiYAmk7gS6de/7Dqx7U8/KwgUqV8tRX9 -7x/lS/KEMFG8kniyN2M6U+N3Ma3Z66nHRukCQQCJjeUzj9uKQX6uGYTN89uqNUqK -+Qt8wVZ+KbykhF1PdM+7A9+zxjLdwNH0FxfEJoaN6xjNhHShUSSf8v/6I2EzAkAi -nAEH2wZCgcCUByyE0OonyrsPNqBzg2hi1LfjpbUiDo3TFhw8s29E0ZWhobb2wiWK -sxhIQAIQ9tDCO8VySabhAkBqPcB85wnFbzasc24V3tXkEczCKXYeRcYPP7hZXeUr -QqhRFE9w80FdSpmUAwHcRn4/MAu2rsGJXBxNqrY0RpuV +MIICXQIBAAKBgQDOpXJSiaEbdmO+fq6nunZAK2NU5YzN5WvVpZi7YJ5b62z9vCGY +tWenaqIA1hBtAXjuweTG0vcphrdpDLYkXCYmo9riTjvyaD/fXoXL1hwzEvuX2sML +cYt1LKrgzrGq1jPXZF6lTJ0XAZ+mG+kvtq6Cr+Io6Niyi17OlQfzs6S+2QIDAQAB +AoGBAM3ZOZzGxNoagRnOECW9NPaPQg/b6vtfwp+8qfxeLuHaD2Ri+ASrEGpRarfy +hcJQaStNspvso5GWRTY8F2T49nZVDa2gKstfKAVFVUXkIcDUxbBeDgE294+5bhvQ +8wzzCaHo8N//csfK40wjZkXjKu9tMN1YO0bPnUg+jAUh5kjRAkEA6e1kzuI/TXYT +FOJEYXe6iMxkd7tnFJH9C6OP+oLQ5EEU/fzs2Denr2N4qGP/6t70K2Dox9tlChEg +rtfE/974dwJBAOIlEYc5B2fSPCpqP9i/Xg2WB3gN91GpjsZUM0QGE+jrShljJOrX +QB4ZxI2QaY87Gcl42VKxm/OiISvUeL69Jy8CQFlSC+vy97jcHO0ceH++97rEUJhn +NjTkiXqoOZGt4ZVGRH221bi5h42wraGejVlhSFpH5pppa2ssnw4j1VTeDoECQEA6 +EOlbvAuzfNz7AhkX+KlZI9Pn+4bY5jDTtx+prjvnn0roipKcAZzK6rTd/+zq9x7u +UKKYyNcAA/XDyWs6o4cCQQCZpu6c99L3O7MfdSCkqaJyybHAURAxrt3r50VTGg+z +52LZUCv0UD9aeHrOEkaw8RFriuEiKGRmb8iuqqhNSJ7w -----END RSA PRIVATE KEY----- -----BEGIN CERTIFICATE----- -MIICyDCCAjGgAwIBAgIJAOtnDNOy1r76MA0GCSqGSIb3DQEBBAUAME0xCzAJBgNV +MIICyDCCAjGgAwIBAgIJAJLBvLx9WUXKMA0GCSqGSIb3DQEBBQUAME0xCzAJBgNV BAYTAlVTMQswCQYDVQQIEwJNTzESMBAGA1UEBxMJU3QuIExvdWlzMQwwCgYDVQQK -EwNPQ0kxDzANBgNVBAMTBnNlcnZlcjAeFw0wOTA5MDIwOTE0MjdaFw0xMDA5MDIw -OTE0MjdaME0xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJNTzESMBAGA1UEBxMJU3Qu +EwNPQ0kxDzANBgNVBAMTBnNlcnZlcjAeFw0xMTA4MjIxNTMyMjNaFw0xMjA4MjEx +NTMyMjNaME0xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJNTzESMBAGA1UEBxMJU3Qu IExvdWlzMQwwCgYDVQQKEwNPQ0kxDzANBgNVBAMTBnNlcnZlcjCBnzANBgkqhkiG -9w0BAQEFAAOBjQAwgYkCgYEAtgLRQTR0cglW88zdM0KU/Umx1ma6U3i9OxSZWJng -mDtfZGxKDDzROAUg2pnxzaXbbPxatFKBPb/NhzPXHZUK6qfBmwmiH+APoHMuKBmn -izL2Jt2V8LNzCmJcHPDJJuG7usdBH36CUuC33Z6BPxwLLYkTGT5lUkICWlduZRid -BssCAwEAAaOBrzCBrDAdBgNVHQ4EFgQU+KYirnLzyICLQxyEybtrOvJ8ekEwfQYD -VR0jBHYwdIAU+KYirnLzyICLQxyEybtrOvJ8ekGhUaRPME0xCzAJBgNVBAYTAlVT +9w0BAQEFAAOBjQAwgYkCgYEAzqVyUomhG3Zjvn6up7p2QCtjVOWMzeVr1aWYu2Ce +W+ts/bwhmLVnp2qiANYQbQF47sHkxtL3KYa3aQy2JFwmJqPa4k478mg/316Fy9Yc +MxL7l9rDC3GLdSyq4M6xqtYz12RepUydFwGfphvpL7augq/iKOjYsotezpUH87Ok +vtkCAwEAAaOBrzCBrDAdBgNVHQ4EFgQUE+ZKmmcNsspWePyp/z0dRJor4IowfQYD +VR0jBHYwdIAUE+ZKmmcNsspWePyp/z0dRJor4IqhUaRPME0xCzAJBgNVBAYTAlVT MQswCQYDVQQIEwJNTzESMBAGA1UEBxMJU3QuIExvdWlzMQwwCgYDVQQKEwNPQ0kx -DzANBgNVBAMTBnNlcnZlcoIJAOtnDNOy1r76MAwGA1UdEwQFMAMBAf8wDQYJKoZI -hvcNAQEEBQADgYEAac1LPqFHgE04iIltUtwvDd5KaSkbkwRCJ3xA8BACIimFYyoY -2uahz4c/9F/3rw2oAil5b7RN+9RnGSVZYwYRd6z1sul5URiWQ7sQ3ZfVrS7pOhbE -nephLwFScEOdW7GaQcCkexqgvQaXACgQMEGDKkzgbTmXmVbwQbzbWqWbSx8= +DzANBgNVBAMTBnNlcnZlcoIJAJLBvLx9WUXKMAwGA1UdEwQFMAMBAf8wDQYJKoZI +hvcNAQEFBQADgYEALoJCh6ZO52X3BfO/WbuBmvLbjwoX5LQdR+P/Ckz5ZKNdVTSI +SkDDS+DUB77DMstAq65kcfq+gFwedb2k82Uk1TkenQ0BX3dBkAO2w5M2ipqHN2ez +3kQ//pzWh/+k8QNgbQSwxKA2UwkbXBhDc2KbT+klhqCGA2hl0KySImgX5Jk= -----END CERTIFICATE----- diff --git a/performance-tests/Sequence_Latency/Sequence_Operations_Time/test.cpp b/performance-tests/Sequence_Latency/Sequence_Operations_Time/test.cpp index 0a0d128e0fd..7def21a9b10 100644 --- a/performance-tests/Sequence_Latency/Sequence_Operations_Time/test.cpp +++ b/performance-tests/Sequence_Latency/Sequence_Operations_Time/test.cpp @@ -193,31 +193,40 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[]) if (argc > 1 && ACE_OS::strcasecmp (argv[1],ACE_TEXT("-csv")) == 0) use_csv = true; - stringseq_time_test(100, false); - stringseq_time_test(1000, false); + try + { + stringseq_time_test(100, false); + stringseq_time_test(1000, false); + + stringseq_time_test(100, true); + stringseq_time_test(1000, true); - stringseq_time_test(100, true); - stringseq_time_test(1000, true); + seqstrseq_time_test(100, 1, false); + seqstrseq_time_test(100, 10, false); + seqstrseq_time_test(1000, 10, false); - seqstrseq_time_test(100, 1, false); - seqstrseq_time_test(100, 10, false); - seqstrseq_time_test(1000, 10, false); + seqstrseq_time_test(100, 1, true); + seqstrseq_time_test(100, 10, true); + seqstrseq_time_test(1000, 10, true); - seqstrseq_time_test(100, 1, true); - seqstrseq_time_test(100, 10, true); - seqstrseq_time_test(1000, 10, true); + big_time_test(10, 1, 10, false); + big_time_test(10, 1, 10, false); + big_time_test(10, 10, 10, false); + big_time_test(100, 1, 10, false); - big_time_test(10, 1, 10, false); - big_time_test(10, 1, 10, false); - big_time_test(10, 10, 10, false); - big_time_test(100, 1, 10, false); + big_time_test(10, 1, 10, true); + big_time_test(10, 1, 10, true); + big_time_test(10, 10, 10, true); + big_time_test(100, 1, 10, true); + } + catch (CORBA::Exception &ex) + { + ex._tao_print_exception ("MAIN: Unexpected CORBA exception caught:"); + return 1; + } - big_time_test(10, 1, 10, true); - big_time_test(10, 1, 10, true); - big_time_test(10, 10, 10, true); - big_time_test(100, 1, 10, true); return 0; } diff --git a/tao/AnyTypeCode/Any.cpp b/tao/AnyTypeCode/Any.cpp index 279f45ff238..b3cc6a9e3b0 100644 --- a/tao/AnyTypeCode/Any.cpp +++ b/tao/AnyTypeCode/Any.cpp @@ -527,9 +527,23 @@ operator <<= (CORBA::Any &any, const std::string & str) void operator <<= (CORBA::Any &, std::string *) { - // TODO + // @todo } +#if !defined(ACE_LACKS_STD_WSTRING) +void +operator <<= (CORBA::Any &any, const std::wstring & str) +{ + any <<= str.c_str (); +} + +void +operator <<= (CORBA::Any &, std::wstring *) +{ + // @todo +} +#endif + // Extraction: these are safe and hence we have to check that the // typecode of the Any is equal to the one we are trying to extract // into. @@ -745,6 +759,18 @@ operator >>= (const CORBA::Any &any, std::string &str) return flag; } +#if !defined(ACE_LACKS_STD_WSTRING) +CORBA::Boolean +operator >>= (const CORBA::Any &any, std::wstring &str) +{ + const wchar_t *buf = 0; + CORBA::Boolean const flag = any >>= buf; + str.assign (buf); + ACE::strdelete (const_cast <wchar_t *> (buf)); + return flag; +} +#endif + #ifdef ACE_ANY_OPS_USE_NAMESPACE } #endif diff --git a/tao/AnyTypeCode/Any.h b/tao/AnyTypeCode/Any.h index 9ff3890fc22..a3a8b2f6088 100644 --- a/tao/AnyTypeCode/Any.h +++ b/tao/AnyTypeCode/Any.h @@ -308,6 +308,10 @@ TAO_AnyTypeCode_Export void operator<<= (CORBA::Any &, const CORBA::Object_ptr); TAO_AnyTypeCode_Export void operator<<= (CORBA::Any &, CORBA::Object_ptr *); TAO_AnyTypeCode_Export void operator<<= (CORBA::Any &, const std::string &); TAO_AnyTypeCode_Export void operator<<= (CORBA::Any &, std::string *); +#if !defined(ACE_LACKS_STD_WSTRING) +TAO_AnyTypeCode_Export void operator<<= (CORBA::Any &, const std::wstring &); +TAO_AnyTypeCode_Export void operator<<= (CORBA::Any &, std::wstring *); +#endif /// Typesafe extraction. @@ -339,6 +343,10 @@ TAO_AnyTypeCode_Export CORBA::Boolean operator>>= (const CORBA::Any &, const CORBA::WChar *&); TAO_AnyTypeCode_Export CORBA::Boolean operator>>= (const CORBA::Any &, std::string &); +#if !defined(ACE_LACKS_STD_WSTRING) +TAO_AnyTypeCode_Export CORBA::Boolean operator>>= (const CORBA::Any &, + std::wstring &); +#endif #ifdef ACE_ANY_OPS_USE_NAMESPACE } diff --git a/tao/AnyTypeCode/AnyTypeCode_Adapter_Impl.cpp b/tao/AnyTypeCode/AnyTypeCode_Adapter_Impl.cpp index 0fbb6b7ce1b..7b75c7130ed 100644 --- a/tao/AnyTypeCode/AnyTypeCode_Adapter_Impl.cpp +++ b/tao/AnyTypeCode/AnyTypeCode_Adapter_Impl.cpp @@ -98,6 +98,14 @@ TAO_AnyTypeCode_Adapter_Impl::insert_into_any (CORBA::Any * any, const std::stri (*any) <<= value.c_str (); } +#if !defined(ACE_LACKS_STD_WSTRING) +void +TAO_AnyTypeCode_Adapter_Impl::insert_into_any (CORBA::Any * any, const std::wstring & value) +{ + (*any) <<= value.c_str (); +} +#endif /* ACE_LACKS_STD_WSTRING */ + void TAO_AnyTypeCode_Adapter_Impl::insert_into_any (CORBA::Any * any, CORBA::Long value) { diff --git a/tao/AnyTypeCode/AnyTypeCode_Adapter_Impl.h b/tao/AnyTypeCode/AnyTypeCode_Adapter_Impl.h index aea65d5d859..dd68e76aeca 100644 --- a/tao/AnyTypeCode/AnyTypeCode_Adapter_Impl.h +++ b/tao/AnyTypeCode/AnyTypeCode_Adapter_Impl.h @@ -93,6 +93,10 @@ ANYTYPECODE__EXCEPTION_LIST virtual void insert_into_any (CORBA::Any * any, const std::string & value); +#if !defined(ACE_LACKS_STD_WSTRING) + virtual void insert_into_any (CORBA::Any * any, const std::wstring & value); +#endif /* ACE_LACKS_STD_WSTRING */ + virtual void insert_into_any (CORBA::Any * any, CORBA::Long value); virtual void insert_into_any (CORBA::Any * any, CORBA::Short value); diff --git a/tao/AnyTypeCode_Adapter.h b/tao/AnyTypeCode_Adapter.h index af26e94bd84..67b830deeb1 100644 --- a/tao/AnyTypeCode_Adapter.h +++ b/tao/AnyTypeCode_Adapter.h @@ -124,6 +124,10 @@ ANYTYPECODE__EXCEPTION_LIST virtual void insert_into_any (CORBA::Any * any, const std::string & value) = 0; +#if !defined(ACE_LACKS_STD_WSTRING) + virtual void insert_into_any (CORBA::Any * any, const std::wstring & value) = 0; +#endif /* ACE_LACKS_STD_WSTRING */ + virtual void insert_into_any (CORBA::Any * any, CORBA::Policy_ptr policy) = 0; virtual void insert_into_any (CORBA::Any * any, CORBA::Policy_ptr * policy) = 0; diff --git a/tao/Array_VarOut_T.h b/tao/Array_VarOut_T.h index 904c3d96a29..b6f17f221f5 100644 --- a/tao/Array_VarOut_T.h +++ b/tao/Array_VarOut_T.h @@ -11,7 +11,6 @@ */ //============================================================================= - #ifndef TAO_ARRAY_VAROUT_T_H #define TAO_ARRAY_VAROUT_T_H diff --git a/tao/Basic_Arguments.h b/tao/Basic_Arguments.h index 153c977dd90..5f92282dcd7 100644 --- a/tao/Basic_Arguments.h +++ b/tao/Basic_Arguments.h @@ -140,6 +140,17 @@ namespace TAO Any_Insert_Policy_AnyTypeCode_Adapter> { }; + +#if !defined(ACE_LACKS_STD_WSTRING) + template<> + class TAO_Export Arg_Traits<std::wstring> + : public + Basic_Arg_Traits_T < + std::wstring, + Any_Insert_Policy_AnyTypeCode_Adapter> + { + }; +#endif /* ACE_LACKS_STD_WSTRING */ } TAO_END_VERSIONED_NAMESPACE_DECL diff --git a/tao/BiDir_GIOP/BiDirGIOP.cpp b/tao/BiDir_GIOP/BiDirGIOP.cpp index c91d240c010..15b19c31940 100644 --- a/tao/BiDir_GIOP/BiDirGIOP.cpp +++ b/tao/BiDir_GIOP/BiDirGIOP.cpp @@ -117,6 +117,6 @@ ACE_STATIC_SVC_DEFINE (TAO_BiDirGIOP_Loader, ACE_Service_Type::DELETE_THIS | ACE_Service_Type::DELETE_OBJ, 0) -ACE_FACTORY_DEFINE (TAO_BiDirGIOP, TAO_BiDirGIOP_Loader) +ACE_FACTORY_DEFINE (TAO_BIDIRGIOP, TAO_BiDirGIOP_Loader) TAO_END_VERSIONED_NAMESPACE_DECL diff --git a/tao/BiDir_GIOP/BiDirGIOP.h b/tao/BiDir_GIOP/BiDirGIOP.h index cc3c3c0eb3b..a1c248a7699 100644 --- a/tao/BiDir_GIOP/BiDirGIOP.h +++ b/tao/BiDir_GIOP/BiDirGIOP.h @@ -38,7 +38,7 @@ class TAO_BiDirPolicy_Validator; * @brief Class that loads the BiDir library. */ -class TAO_BiDirGIOP_Export TAO_BiDirGIOP_Loader : public TAO_BiDir_Adapter +class TAO_BIDIRGIOP_Export TAO_BiDirGIOP_Loader : public TAO_BiDir_Adapter { public: @@ -69,7 +69,7 @@ TAO_Requires_BiDirGIOP_Initializer = TAO_BiDirGIOP_Loader::Initializer (); ACE_STATIC_SVC_DECLARE (TAO_BiDirGIOP_Loader) -ACE_FACTORY_DECLARE (TAO_BiDirGIOP, TAO_BiDirGIOP_Loader) +ACE_FACTORY_DECLARE (TAO_BIDIRGIOP, TAO_BiDirGIOP_Loader) TAO_END_VERSIONED_NAMESPACE_DECL diff --git a/tao/BiDir_GIOP/BiDirPolicy_Validator.h b/tao/BiDir_GIOP/BiDirPolicy_Validator.h index d156e161a51..82cc3789345 100644 --- a/tao/BiDir_GIOP/BiDirPolicy_Validator.h +++ b/tao/BiDir_GIOP/BiDirPolicy_Validator.h @@ -36,7 +36,7 @@ class TAO_ORB_Core; * @brief Policy Validator for BiDir GIOP class * */ -class TAO_BiDirGIOP_Export TAO_BiDirPolicy_Validator : public TAO_Policy_Validator +class TAO_BIDIRGIOP_Export TAO_BiDirPolicy_Validator : public TAO_Policy_Validator { public: TAO_BiDirPolicy_Validator (TAO_ORB_Core &orb_core); diff --git a/tao/BiDir_GIOP/BiDir_GIOP.mpc b/tao/BiDir_GIOP/BiDir_GIOP.mpc index f33fc0b431e..f1c6a688be0 100644 --- a/tao/BiDir_GIOP/BiDir_GIOP.mpc +++ b/tao/BiDir_GIOP/BiDir_GIOP.mpc @@ -3,11 +3,12 @@ project(*idl) : tao_versioning_idl_defaults, install { custom_only = 1 IDL_Files { idlflags += -Gp -Gd -Sci -SS -Sorb -Sa -St \ - -Wb,export_macro=TAO_BiDirGIOP_Export \ - -Wb,export_include=tao/BiDir_GIOP/bidirgiop_export.h \ + -Wb,stub_export_macro=TAO_BIDIRGIOP_Export \ + -Wb,stub_export_include=tao/BiDir_GIOP/bidirgiop_export.h \ + -Wb,stub_export_file=bidirgiop_export.h \ -Wb,include_guard=TAO_BIDIRGIOP_SAFE_INCLUDE \ -Wb,safe_include=tao/BiDir_GIOP/BiDirGIOP.h \ - -iC BiDir_GIOP + -iC BiDir_GIOP -Gxhst BiDirPolicy.pidl } @@ -28,6 +29,7 @@ project(BiDir_GIOP) : taolib, tao_output, install, pi, taoidldefaults { Header_Files { *.h + bidirgiop_export.h BiDirPolicyC.h BiDirPolicyS.h } diff --git a/tao/BiDir_GIOP/bidirgiop_export.h b/tao/BiDir_GIOP/bidirgiop_export.h deleted file mode 100644 index 664fba705b7..00000000000 --- a/tao/BiDir_GIOP/bidirgiop_export.h +++ /dev/null @@ -1,40 +0,0 @@ - -// -*- C++ -*- -// $Id$ -// Definition for Win32 Export directives. -// This file is generated automatically by generate_export_file.pl -// ------------------------------ -#ifndef TAO_BIDIRGIOP_EXPORT_H -#define TAO_BIDIRGIOP_EXPORT_H - -#include "ace/config-all.h" - -#if defined (TAO_AS_STATIC_LIBS) -# if !defined (TAO_BIDIRGIOP_HAS_DLL) -# define TAO_BIDIRGIOP_HAS_DLL 0 -# endif /* ! TAO_BIDIRGIOP_HAS_DLL */ -#else -# if !defined (TAO_BIDIRGIOP_HAS_DLL) -# define TAO_BIDIRGIOP_HAS_DLL 1 -# endif /* ! TAO_BIDIRGIOP_HAS_DLL */ -#endif - -#if defined (TAO_BIDIRGIOP_HAS_DLL) && (TAO_BIDIRGIOP_HAS_DLL == 1) -# if defined (TAO_BIDIRGIOP_BUILD_DLL) -# define TAO_BiDirGIOP_Export ACE_Proper_Export_Flag -# define TAO_BIDIRGIOP_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) -# define TAO_BIDIRGIOP_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -# else /* TAO_BIDIRGIOP_BUILD_DLL */ -# define TAO_BiDirGIOP_Export ACE_Proper_Import_Flag -# define TAO_BIDIRGIOP_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) -# define TAO_BIDIRGIOP_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -# endif /* TAO_BIDIRGIOP_BUILD_DLL */ -#else /* TAO_BIDIRGIOP_HAS_DLL == 1 */ -# define TAO_BiDirGIOP_Export -# define TAO_BIDIRGIOP_SINGLETON_DECLARATION(T) -# define TAO_BIDIRGIOP_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -#endif /* TAO_BIDIRGIOP_HAS_DLL == 1 */ - -#endif /* TAO_BIDIRGIOP_EXPORT_H */ - -// End of auto generated file. diff --git a/tao/CodecFactory/CodecFactory.cpp b/tao/CodecFactory/CodecFactory.cpp index f1431a88da9..191192cf0ae 100644 --- a/tao/CodecFactory/CodecFactory.cpp +++ b/tao/CodecFactory/CodecFactory.cpp @@ -38,7 +38,7 @@ ACE_STATIC_SVC_DEFINE (TAO_CodecFactory_Loader, &ACE_SVC_NAME (TAO_CodecFactory_Loader), ACE_Service_Type::DELETE_THIS | ACE_Service_Type::DELETE_OBJ, 0) -ACE_FACTORY_DEFINE (TAO_CodecFactory, TAO_CodecFactory_Loader) +ACE_FACTORY_DEFINE (TAO_CODECFACTORY, TAO_CodecFactory_Loader) TAO_END_VERSIONED_NAMESPACE_DECL diff --git a/tao/CodecFactory/CodecFactory.h b/tao/CodecFactory/CodecFactory.h index 290d2455191..92e28b2b42b 100644 --- a/tao/CodecFactory/CodecFactory.h +++ b/tao/CodecFactory/CodecFactory.h @@ -31,7 +31,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -class TAO_CodecFactory_Export TAO_CodecFactory_Loader +class TAO_CODECFACTORY_Export TAO_CodecFactory_Loader : public TAO_Object_Loader { public: @@ -48,7 +48,7 @@ static int TAO_Requires_CodecFactory_Initializer = TAO_CodecFactory_Loader::Initializer (); ACE_STATIC_SVC_DECLARE (TAO_CodecFactory_Loader) -ACE_FACTORY_DECLARE (TAO_CodecFactory, TAO_CodecFactory_Loader) +ACE_FACTORY_DECLARE (TAO_CODECFACTORY, TAO_CodecFactory_Loader) TAO_END_VERSIONED_NAMESPACE_DECL diff --git a/tao/CodecFactory/CodecFactory.mpc b/tao/CodecFactory/CodecFactory.mpc index 655dd5c29ed..cbda75b62d4 100644 --- a/tao/CodecFactory/CodecFactory.mpc +++ b/tao/CodecFactory/CodecFactory.mpc @@ -3,18 +3,19 @@ project(*idl) : tao_versioning_idl_defaults, install { custom_only = 1 IDL_Files { idlflags += -Gp -Gd -Sci -SS -Sorb -Sal -GX \ - -Wb,export_macro=TAO_CodecFactory_Export \ - -Wb,export_include=tao/CodecFactory/codecfactory_export.h \ + -Wb,stub_export_macro=TAO_CODECFACTORY_Export \ + -Wb,stub_export_include=tao/CodecFactory/codecfactory_export.h \ + -Wb,stub_export_file=codecfactory_export.h \ -Wb,include_guard=TAO_CODECFACTORY_SAFE_INCLUDE \ -Wb,safe_include=tao/CodecFactory/CodecFactory.h \ - -iC tao/CodecFactory + -iC tao/CodecFactory -Gxhst idlflags -= -Sa -St IOP_Codec.pidl } IDL_Files { idlflags += -Sci -SS -Sorb -Sa -GX \ - -Wb,export_macro=TAO_CodecFactory_Export \ + -Wb,export_macro=TAO_CODECFACTORY_Export \ -Wb,export_include=tao/CodecFactory/codecfactory_export.h \ -Wb,unique_include=tao/CodecFactory/CodecFactory.h \ -iC CodecFactory @@ -38,6 +39,7 @@ project(CodecFactory) : taolib, tao_output, install, anytypecode, taoidldefaults } Header_Files { + codecfactory_export.h *.h IOP_CodecA.h IOP_CodecC.h diff --git a/tao/CodecFactory/codecfactory_export.h b/tao/CodecFactory/codecfactory_export.h deleted file mode 100644 index 7c93ff47968..00000000000 --- a/tao/CodecFactory/codecfactory_export.h +++ /dev/null @@ -1,40 +0,0 @@ - -// -*- C++ -*- -// $Id$ -// Definition for Win32 Export directives. -// This file is generated automatically by generate_export_file.pl -// ------------------------------ -#ifndef TAO_CODECFACTORY_EXPORT_H -#define TAO_CODECFACTORY_EXPORT_H - -#include "ace/config-all.h" - -#if defined (TAO_AS_STATIC_LIBS) -# if !defined (TAO_CODECFACTORY_HAS_DLL) -# define TAO_CODECFACTORY_HAS_DLL 0 -# endif /* ! TAO_CODECFACTORY_HAS_DLL */ -#else -# if !defined (TAO_CODECFACTORY_HAS_DLL) -# define TAO_CODECFACTORY_HAS_DLL 1 -# endif /* ! TAO_CODECFACTORY_HAS_DLL */ -#endif - -#if defined (TAO_CODECFACTORY_HAS_DLL) && (TAO_CODECFACTORY_HAS_DLL == 1) -# if defined (TAO_CODECFACTORY_BUILD_DLL) -# define TAO_CodecFactory_Export ACE_Proper_Export_Flag -# define TAO_CODECFACTORY_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) -# define TAO_CODECFACTORY_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -# else /* TAO_CODECFACTORY_BUILD_DLL */ -# define TAO_CodecFactory_Export ACE_Proper_Import_Flag -# define TAO_CODECFACTORY_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) -# define TAO_CODECFACTORY_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -# endif /* TAO_CODECFACTORY_BUILD_DLL */ -#else /* TAO_CODECFACTORY_HAS_DLL == 1 */ -# define TAO_CodecFactory_Export -# define TAO_CODECFACTORY_SINGLETON_DECLARATION(T) -# define TAO_CODECFACTORY_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -#endif /* TAO_CODECFACTORY_HAS_DLL == 1 */ - -#endif /* TAO_CODECFACTORY_EXPORT_H */ - -// End of auto generated file. diff --git a/tao/DynamicAny/DynAny_i.h b/tao/DynamicAny/DynAny_i.h index 19f8a31566e..cda8f29c50a 100644 --- a/tao/DynamicAny/DynAny_i.h +++ b/tao/DynamicAny/DynAny_i.h @@ -51,50 +51,32 @@ public: ~TAO_DynAny_i (void); /// Initialize using just a TypeCode - void init (CORBA::TypeCode_ptr tc - ); + void init (CORBA::TypeCode_ptr tc); /// Initialize using an Any. - void init (const CORBA::Any& any - ); + void init (const CORBA::Any& any); // = LocalObject methods. - static TAO_DynAny_i *_narrow ( - CORBA::Object_ptr obj - ); + static TAO_DynAny_i *_narrow (CORBA::Object_ptr obj); // = DynAny common functions not implemented in class TAO_DynCommon. - virtual void from_any ( - const CORBA::Any & value - ) -; + virtual void from_any (const CORBA::Any & value); - virtual CORBA::Any * to_any ( - void) -; + virtual CORBA::Any * to_any (void); - virtual CORBA::Boolean equal ( - DynamicAny::DynAny_ptr dyn_any - ) -; + virtual CORBA::Boolean equal (DynamicAny::DynAny_ptr dyn_any); - virtual void destroy ( - void) -; + virtual void destroy (void); - virtual DynamicAny::DynAny_ptr current_component ( - void) -; + virtual DynamicAny::DynAny_ptr current_component (void); private: /// Check if the typecode is acceptable. - void check_typecode (CORBA::TypeCode_ptr tc - ); + void check_typecode (CORBA::TypeCode_ptr tc); /// Used when we are created from a typecode. - void set_to_default_value (CORBA::TypeCode_ptr tc - ); + void set_to_default_value (CORBA::TypeCode_ptr tc); /// Called by both versions of init(). void init_common (void); diff --git a/tao/Generic_Sequence_T.h b/tao/Generic_Sequence_T.h index f977d4af29f..58500da4aa5 100644 --- a/tao/Generic_Sequence_T.h +++ b/tao/Generic_Sequence_T.h @@ -375,26 +375,26 @@ public: typedef Generic_Sequence_Reverse_Iterator<generic_sequence<T, ALLOCATION_TRAITS, ELEMENT_TRAITS> > reverse_iterator; typedef Const_Generic_Sequence_Reverse_Iterator<generic_sequence<T, ALLOCATION_TRAITS, ELEMENT_TRAITS> > const_reverse_iterator; - // Get an iterator that points to the beginning of the sequence. + /// Get an iterator that points to the beginning of the sequence. iterator begin (void) { return typename generic_sequence<T, ALLOCATION_TRAITS, ELEMENT_TRAITS>::iterator (this); } - // Get a const iterator that points to the beginning of the sequence. + /// Get a const iterator that points to the beginning of the sequence. const_iterator begin (void) const { return typename generic_sequence<T, ALLOCATION_TRAITS, ELEMENT_TRAITS>::const_iterator (this); } - // Get an iterator that points to the end of the sequence. + /// Get an iterator that points to the end of the sequence. iterator end (void) { return typename generic_sequence<T, ALLOCATION_TRAITS, ELEMENT_TRAITS>::iterator (this, this->length_); } - // Get a const iterator that points to the end of the sequence. + /// Get a const iterator that points to the end of the sequence. const_iterator end (void) const { return typename generic_sequence<T, ALLOCATION_TRAITS, ELEMENT_TRAITS>::const_iterator (this, diff --git a/tao/Object.cpp b/tao/Object.cpp index 6acd25d3d5d..2c69cecc82f 100644 --- a/tao/Object.cpp +++ b/tao/Object.cpp @@ -128,8 +128,7 @@ CORBA::Object::marshal (TAO_OutputCDR &cdr) } /*static*/ CORBA::Boolean -CORBA::Object::marshal (const CORBA::Object_ptr x, - TAO_OutputCDR &cdr) +CORBA::Object::marshal (const CORBA::Object_ptr x, TAO_OutputCDR &cdr) { if (x == 0) { diff --git a/tao/Object_KeyC.cpp b/tao/Object_KeyC.cpp index 4de7652ff82..a70f3202210 100644 --- a/tao/Object_KeyC.cpp +++ b/tao/Object_KeyC.cpp @@ -2,7 +2,7 @@ // $Id$ /** - * Code generated by the The ACE ORB (TAO) IDL Compiler v2.0.3 + * Code generated by the The ACE ORB (TAO) IDL Compiler v2.0.4 * TAO and the TAO IDL Compiler have been developed by: * Center for Distributed Object Computing * Washington University diff --git a/tao/Object_KeyC.h b/tao/Object_KeyC.h index 0bb3803c56a..fb0b0532739 100644 --- a/tao/Object_KeyC.h +++ b/tao/Object_KeyC.h @@ -2,7 +2,7 @@ // $Id$ /** - * Code generated by the The ACE ORB (TAO) IDL Compiler v2.0.3 + * Code generated by the The ACE ORB (TAO) IDL Compiler v2.0.4 * TAO and the TAO IDL Compiler have been developed by: * Center for Distributed Object Computing * Washington University @@ -28,8 +28,8 @@ // TAO_IDL - Generated from // w:\tao\tao_idl\be\be_codegen.cpp:150 -#ifndef _TAO_PIDL_OBJECT_KEYC_NYHQMR_H_ -#define _TAO_PIDL_OBJECT_KEYC_NYHQMR_H_ +#ifndef _TAO_PIDL_OBJECT_KEYC_NOCLKU_H_ +#define _TAO_PIDL_OBJECT_KEYC_NOCLKU_H_ #include /**/ "ace/pre.h" @@ -61,8 +61,8 @@ #include "tao/OctetSeqC.h" -#if TAO_MAJOR_VERSION != 2 || TAO_MINOR_VERSION != 0 || TAO_BETA_VERSION != 3 -#error This file should be regenerated with TAO_IDL from version 2.0.3 +#if TAO_MAJOR_VERSION != 2 || TAO_MINOR_VERSION != 0 || TAO_BETA_VERSION != 4 +#error This file should be regenerated with TAO_IDL from version 2.0.4 #endif #if defined (TAO_EXPORT_MACRO) diff --git a/tao/PortableServer/BD_String_SArgument_T.cpp b/tao/PortableServer/BD_String_SArgument_T.cpp index c10caac89fc..a69b65eb075 100644 --- a/tao/PortableServer/BD_String_SArgument_T.cpp +++ b/tao/PortableServer/BD_String_SArgument_T.cpp @@ -3,7 +3,10 @@ #ifndef TAO_BD_STRING_SARGUMENT_T_CPP #define TAO_BD_STRING_SARGUMENT_T_CPP +#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) #include "tao/PortableServer/BD_String_SArgument_T.h" +#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ + #include "tao/SystemException.h" #if !defined (__ACE_INLINE__) diff --git a/tao/PortableServer/Basic_SArgument_T.cpp b/tao/PortableServer/Basic_SArgument_T.cpp index 8dfab051a81..7854e33eee0 100644 --- a/tao/PortableServer/Basic_SArgument_T.cpp +++ b/tao/PortableServer/Basic_SArgument_T.cpp @@ -3,7 +3,9 @@ #ifndef TAO_BASIC_SARGUMENT_T_CPP #define TAO_BASIC_SARGUMENT_T_CPP +#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) #include "tao/PortableServer/Basic_SArgument_T.h" +#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ #if !defined (__ACE_INLINE__) #include "tao/PortableServer/Basic_SArgument_T.inl" diff --git a/tao/PortableServer/Basic_SArgument_T.h b/tao/PortableServer/Basic_SArgument_T.h index ed235cf0bcd..0d0bd17ec1c 100644 --- a/tao/PortableServer/Basic_SArgument_T.h +++ b/tao/PortableServer/Basic_SArgument_T.h @@ -140,7 +140,6 @@ namespace TAO typedef inout_type inout_arg_type; typedef out_type out_arg_type; typedef out_type ret_arg_type; - }; } diff --git a/tao/PortableServer/Basic_SArguments.h b/tao/PortableServer/Basic_SArguments.h index 0fca6f3b1ef..45b91ffcf24 100644 --- a/tao/PortableServer/Basic_SArguments.h +++ b/tao/PortableServer/Basic_SArguments.h @@ -140,6 +140,16 @@ namespace TAO TAO::Any_Insert_Policy_Stream> { }; + +#if !defined(ACE_LACKS_STD_WSTRING) + template<> + class TAO_PortableServer_Export SArg_Traits<std::wstring> + : public Basic_SArg_Traits_T< + std::wstring, + TAO::Any_Insert_Policy_Stream> + { + }; +#endif } TAO_END_VERSIONED_NAMESPACE_DECL diff --git a/tao/PortableServer/Fixed_Array_SArgument_T.cpp b/tao/PortableServer/Fixed_Array_SArgument_T.cpp index 5fa5e197343..3767425538c 100644 --- a/tao/PortableServer/Fixed_Array_SArgument_T.cpp +++ b/tao/PortableServer/Fixed_Array_SArgument_T.cpp @@ -3,7 +3,9 @@ #ifndef TAO_FIXED_ARRAY_SARGUMENT_T_CPP #define TAO_FIXED_ARRAY_SARGUMENT_T_CPP +#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) #include "tao/PortableServer/Fixed_Array_SArgument_T.h" +#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ #if !defined (__ACE_INLINE__) #include "tao/PortableServer/Fixed_Array_SArgument_T.inl" diff --git a/tao/PortableServer/Fixed_Size_SArgument_T.cpp b/tao/PortableServer/Fixed_Size_SArgument_T.cpp index 66e53e98988..285d90da9c5 100644 --- a/tao/PortableServer/Fixed_Size_SArgument_T.cpp +++ b/tao/PortableServer/Fixed_Size_SArgument_T.cpp @@ -3,7 +3,9 @@ #ifndef TAO_FIXED_SIZE_SARGUMENT_T_CPP #define TAO_FIXED_SIZE_SARGUMENT_T_CPP +#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) #include "tao/PortableServer/Fixed_Size_SArgument_T.h" +#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ #if !defined (__ACE_INLINE__) #include "tao/PortableServer/Fixed_Size_SArgument_T.inl" diff --git a/tao/PortableServer/Object_SArgument_T.cpp b/tao/PortableServer/Object_SArgument_T.cpp index 00e5b8948e4..163a0813883 100644 --- a/tao/PortableServer/Object_SArgument_T.cpp +++ b/tao/PortableServer/Object_SArgument_T.cpp @@ -3,7 +3,9 @@ #ifndef TAO_OBJECT_SARGUMENT_T_CPP #define TAO_OBJECT_SARGUMENT_T_CPP +#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) #include "tao/PortableServer/Object_SArgument_T.h" +#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ #if !defined (__ACE_INLINE__) #include "tao/PortableServer/Object_SArgument_T.inl" diff --git a/tao/PortableServer/Servant_Base.h b/tao/PortableServer/Servant_Base.h index 65777ee8f75..5b9090eb203 100644 --- a/tao/PortableServer/Servant_Base.h +++ b/tao/PortableServer/Servant_Base.h @@ -63,9 +63,9 @@ class TAO_PortableServer_Export TAO_ServantBase { public: /// Useful for template programming. - typedef ::CORBA::Object _stub_type; - typedef ::CORBA::Object_ptr _stub_ptr_type; - typedef ::CORBA::Object_var _stub_var_type; + typedef CORBA::Object _stub_type; + typedef CORBA::Object_ptr _stub_ptr_type; + typedef CORBA::Object_var _stub_var_type; /// Destructor. virtual ~TAO_ServantBase (void); diff --git a/tao/PortableServer/Special_Basic_SArgument_T.cpp b/tao/PortableServer/Special_Basic_SArgument_T.cpp index 2cdb15d8b5b..6fc56c84267 100644 --- a/tao/PortableServer/Special_Basic_SArgument_T.cpp +++ b/tao/PortableServer/Special_Basic_SArgument_T.cpp @@ -3,7 +3,9 @@ #ifndef TAO_SPECIAL_BASIC_SARGUMENT_T_CPP #define TAO_SPECIAL_BASIC_SARGUMENT_T_CPP +#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) #include "tao/PortableServer/Special_Basic_SArgument_T.h" +#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ #if !defined (__ACE_INLINE__) #include "tao/PortableServer/Special_Basic_SArgument_T.inl" diff --git a/tao/PortableServer/UB_String_SArgument_T.cpp b/tao/PortableServer/UB_String_SArgument_T.cpp index 7f8db0408f5..d66915ae066 100644 --- a/tao/PortableServer/UB_String_SArgument_T.cpp +++ b/tao/PortableServer/UB_String_SArgument_T.cpp @@ -3,7 +3,9 @@ #ifndef TAO_UB_STRING_SARGUMENT_T_CPP #define TAO_UB_STRING_SARGUMENT_T_CPP +#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) #include "tao/PortableServer/UB_String_SArgument_T.h" +#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ #if !defined (__ACE_INLINE__) #include "tao/PortableServer/UB_String_SArgument_T.inl" diff --git a/tao/PortableServer/Var_Array_SArgument_T.cpp b/tao/PortableServer/Var_Array_SArgument_T.cpp index 0ba7f075cac..70600dbfbbd 100644 --- a/tao/PortableServer/Var_Array_SArgument_T.cpp +++ b/tao/PortableServer/Var_Array_SArgument_T.cpp @@ -3,7 +3,9 @@ #ifndef TAO_VAR_ARRAY_SARGUMENT_T_CPP #define TAO_VAR_ARRAY_SARGUMENT_T_CPP +#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) #include "tao/PortableServer/Var_Array_SArgument_T.h" +#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ #if !defined (__ACE_INLINE__) #include "tao/PortableServer/Var_Array_SArgument_T.inl" diff --git a/tao/PortableServer/Var_Size_SArgument_T.cpp b/tao/PortableServer/Var_Size_SArgument_T.cpp index a0aed6f8d57..eb1e13e4cb3 100644 --- a/tao/PortableServer/Var_Size_SArgument_T.cpp +++ b/tao/PortableServer/Var_Size_SArgument_T.cpp @@ -3,14 +3,16 @@ #ifndef TAO_VAR_SIZE_SARGUMENT_T_CPP #define TAO_VAR_SIZE_SARGUMENT_T_CPP +#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) #include "tao/PortableServer/Var_Size_SArgument_T.h" +#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ + #include "tao/SystemException.h" #if !defined (__ACE_INLINE__) #include "tao/PortableServer/Var_Size_SArgument_T.inl" #endif /* __ACE_INLINE__ */ - TAO_BEGIN_VERSIONED_NAMESPACE_DECL template<typename S, diff --git a/tao/PortableServer/Vector_SArgument_T.cpp b/tao/PortableServer/Vector_SArgument_T.cpp index de157b9975b..a55fed0717e 100644 --- a/tao/PortableServer/Vector_SArgument_T.cpp +++ b/tao/PortableServer/Vector_SArgument_T.cpp @@ -3,13 +3,14 @@ #ifndef TAO_VECTOR_SARGUMENT_T_CPP #define TAO_VECTOR_SARGUMENT_T_CPP +#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) #include "tao/PortableServer/Vector_SArgument_T.h" +#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ #if !defined (__ACE_INLINE__) #include "tao/PortableServer/Vector_SArgument_T.inl" #endif /* __ACE_INLINE__ */ - TAO_BEGIN_VERSIONED_NAMESPACE_DECL template<typename S, diff --git a/tao/TAO_Internal.cpp b/tao/TAO_Internal.cpp index ca1d1fc3c01..30c2851c98b 100644 --- a/tao/TAO_Internal.cpp +++ b/tao/TAO_Internal.cpp @@ -834,7 +834,7 @@ namespace errno = EINVAL; ACE_ERROR_RETURN ((LM_ERROR, - ACE_TEXT ("TAO (%P|%t) - Unable to open file <%s>") + ACE_TEXT ("TAO (%P|%t) - Error, unable to open file <%s>") ACE_TEXT (", referenced by -ORBSvcConf option\n"), current_arg), -1); diff --git a/tao/Valuetype/AbstractBase.h b/tao/Valuetype/AbstractBase.h index c03a2061f3f..d0c9620e14d 100644 --- a/tao/Valuetype/AbstractBase.h +++ b/tao/Valuetype/AbstractBase.h @@ -118,8 +118,8 @@ namespace CORBA /// Return the equivalent object reference. /** - * The object is not refcounted. The caler should not put this in - * a var or some such thing. The memory is owned by <this> + * The object is not refcounted. The caller should not put this in + * a var or some such thing. The memory is owned by @c this * object. */ CORBA::Object_ptr equivalent_objref (void); @@ -157,7 +157,7 @@ namespace CORBA /// Our equivalent CORBA::Object version /// @todo We may at some point of time should probably cache a - /// version of CORBA::ValueBase + /// version of CORBA::ValueBase CORBA::Object_var equivalent_obj_; }; diff --git a/tao/Valuetype/Valuetype_Adapter_Impl.h b/tao/Valuetype/Valuetype_Adapter_Impl.h index d9f83443214..55a6b72d1ba 100644 --- a/tao/Valuetype/Valuetype_Adapter_Impl.h +++ b/tao/Valuetype/Valuetype_Adapter_Impl.h @@ -35,7 +35,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL * * Class that adapts various functions involving the Valuetype, * ValueFactory and AbstractInterface classes. This is a concrete class - * implementating the pure virtual methods of TAO_Valuetype_Adapter + * implementing the pure virtual methods of TAO_Valuetype_Adapter */ class TAO_Valuetype_Export TAO_Valuetype_Adapter_Impl : public TAO_Valuetype_Adapter diff --git a/tao/Version.h b/tao/Version.h index 3cc92af8360..3830eda9bc1 100644 --- a/tao/Version.h +++ b/tao/Version.h @@ -5,5 +5,5 @@ #define TAO_MAJOR_VERSION 2 #define TAO_MINOR_VERSION 0 -#define TAO_BETA_VERSION 3 -#define TAO_VERSION "2.0.3" +#define TAO_BETA_VERSION 4 +#define TAO_VERSION "2.0.4" diff --git a/tests/AMI/run_mt_noupcall.pl b/tests/AMI/run_mt_noupcall.pl index 76ce949dbdd..72efcaa386b 100755 --- a/tests/AMI/run_mt_noupcall.pl +++ b/tests/AMI/run_mt_noupcall.pl @@ -11,7 +11,12 @@ use PerlACE::TestTarget; my $server = PerlACE::TestTarget::create_target (1) || die "Create target 1 failed\n"; my $client = PerlACE::TestTarget::create_target (2) || die "Create target 2 failed\n"; -$client_conf = $client->LocalFile ("mt_noupcall$PerlACE::svcconf_ext"); +$client_conf_base = "mt_noupcall$PerlACE::svcconf_ext"; +$client_conf = $client->LocalFile ($client_conf_base); +if ($client->PutFile ($client_conf_base) == -1) { + print STDERR "ERROR: cannot set file <$client_conf>\n"; + exit 1; +} $server_debug_level = '0'; $client_debug_level = '0'; diff --git a/tests/AMI/run_test.pl b/tests/AMI/run_test.pl index 29fe59a71aa..c02a5175c5d 100755 --- a/tests/AMI/run_test.pl +++ b/tests/AMI/run_test.pl @@ -11,25 +11,28 @@ use PerlACE::TestTarget; my $server = PerlACE::TestTarget::create_target (1) || die "Create target 1 failed\n"; my $client = PerlACE::TestTarget::create_target (2) || die "Create target 2 failed\n"; -$client_conf = $client->LocalFile ("muxed$PerlACE::svcconf_ext"); $server_debug_level = '0'; $client_debug_level = '0'; $iterations = '1'; +$conf_file = "muxed$PerlACE::svcconf_ext"; + foreach $i (@ARGV) { if ($i eq '-mux') { - $client_conf = $client->LocalFile ("muxed$PerlACE::svcconf_ext"); + $conf_file = "muxed$PerlACE::svcconf_ext"; } elsif ($i eq '-debug') { $server_debug_level = '1'; $client_debug_level = '1'; } elsif ($i eq '-exclusive') { - $client_conf = $client->LocalFile ("exclusive$PerlACE::svcconf_ext"); + $conf_file = "exclusive$PerlACE::svcconf_ext"; } } +$client_conf = $client->LocalFile ($conf_file); + my $iorbase = "server.ior"; my $server_iorfile = $server->LocalFile ($iorbase); my $client_iorfile = $client->LocalFile ($iorbase); @@ -61,6 +64,12 @@ if ($client->PutFile ($iorbase) == -1) { $SV->Kill (); $SV->TimedWait (1); exit 1; } +# copy the configruation file. +if ($client->PutFile ($conf_file) == -1) { + print STDERR "ERROR: cannot set file <$client_conf>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} $CL = $client->CreateProcess ("simple_client", "-ORBsvcconf $client_conf " diff --git a/tests/Bug_1383_Regression/SimpleClient.cpp b/tests/Bug_1383_Regression/SimpleClient.cpp index ea3fa36e0bf..4b9cc99d591 100644 --- a/tests/Bug_1383_Regression/SimpleClient.cpp +++ b/tests/Bug_1383_Regression/SimpleClient.cpp @@ -7,122 +7,128 @@ #include "Callee_i.h" #include "tao/IORManipulation/IORManip_Loader.h" -CORBA::ORB_var orb; +CORBA::ORB_var _orb; ACE_THR_FUNC_RETURN RunFunc(void *) { - ACE_DEBUG ((LM_DEBUG, "running the orb\n")); - orb->run(); - ACE_DEBUG ((LM_DEBUG, "done running orb\n")); + ACE_DEBUG ((LM_DEBUG, "running the _orb\n")); + _orb->run(); + ACE_DEBUG ((LM_DEBUG, "done running _orb\n")); return 0; } int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { - // initialize the ORB - orb = CORBA::ORB_init (argc, argv); - - // Get the "RootPOA" - CORBA::Object_var obj = orb->resolve_initial_references("RootPOA"); - PortableServer::POA_var poa = PortableServer::POA::_narrow(obj.in ()); - - // activate its managers so it can handle incoming requests - poa->the_POAManager()->activate(); - - // get a thread going to handle incoming requests - ACE_Thread::spawn(RunFunc); - - // we could also use the corbaloc syntax to get a reference to the - // object. This will cause the orb to talk directly to the other - // orb with no name service or common file involved. - obj = orb->string_to_object("corbaloc::localhost:9999/Simple"); - - if (CORBA::is_nil(obj.in ())) + try { - ACE_ERROR ((LM_ERROR, "could not get reference\n")); - return 1; + // initialize the ORB + _orb = CORBA::ORB_init (argc, argv); + + // Get the "RootPOA" + CORBA::Object_var obj = _orb->resolve_initial_references("RootPOA"); + PortableServer::POA_var poa = PortableServer::POA::_narrow(obj.in ()); + + // activate its managers so it can handle incoming requests + poa->the_POAManager()->activate(); + + // get a thread going to handle incoming requests + ACE_Thread::spawn(RunFunc); + + // we could also use the c_orbaloc syntax to get a reference to the + // object. This will cause the _orb to talk directly to the other + // _orb with no name service or common file involved. + obj = _orb->string_to_object("c_orbaloc::localhost:9999/Simple"); + + if (CORBA::is_nil(obj.in ())) + { + ACE_ERROR ((LM_ERROR, "could not get reference\n")); + return 1; + } + + // narrow the reference to the particular type we wish to deal with + Simple_var simple = Simple::_narrow(obj.in ()); + if (CORBA::is_nil(simple.in ())) + { + ACE_ERROR ((LM_ERROR, "could not get reference\n")); + return 1; + } + + // create an object reference that has a bogus value for the first + // profile + obj = _orb->resolve_initial_references("IORManipulation"); + TAO_IOP::TAO_IOR_Manipulation_var iorm = + TAO_IOP::TAO_IOR_Manipulation::_narrow(obj.in()); + + // Status: The following scenarios appear to work: + // - first profile invalid host name, second profile valid. + // - first profile invalid ip number, second profiel valid. + // - first profiel invalid port number, second profile valid. + // + // The following causes a core dump of the server: + // - first and second invalid + // + // Note that he iormanip is being used since it is not practical + // to have a test case that depends on a VPN being present. + // + CORBA::Object_var name1 = + _orb->string_to_object ("c_orbaloc:iiop:10.0.2.3:6060/xyz"); + CORBA::Object_var name2 = + _orb->string_to_object ("c_orbaloc:iiop:daisnot:7070/xyz"); + CORBA::String_var name1_ior = _orb->object_to_string(name1.in()); + CORBA::String_var name2_ior = _orb->object_to_string(name2.in()); + + // create a callback object + Callee_i * callee_i = new Callee_i; + // get the CORBA reference + PortableServer::ObjectId_var id = + poa->activate_object (callee_i); + + CORBA::Object_var object_act = poa->id_to_reference (id.in ()); + + Callee_var callee = Callee::_narrow (object_act.in ()); + + if (CORBA::is_nil(callee.in ())) + { + ACE_ERROR ((LM_ERROR, "could not get callback object\n")); + return 1; + } + else + { + CORBA::String_var str = _orb->object_to_string(callee.in ()); + FILE *output_file= ACE_OS::fopen ("ior", "w"); + if (output_file == 0) + ACE_ERROR_RETURN ((LM_ERROR, + "Cannot open output file for writing IOR: ior\n"), + 1); + ACE_OS::fprintf (output_file, "%s", str.in ()); + ACE_OS::fclose (output_file); + } + + // create a reference with two profiles with the first on being + // bogus. If things work as they should the callback should be + // succesful with the ORB trying the second profile. + TAO_IOP::TAO_IOR_Manipulation::IORList iors (2); + iors.length (2); + iors [0] = name1; + iors [1] = name2; + + CORBA::Object_var merged = iorm->merge_iors(iors); + Callee_var doubleCallee = Callee::_unchecked_narrow(merged.in()); + + ACE_DEBUG ((LM_DEBUG, "Profile count is %d\n", + iorm->get_profile_count(merged.in()))); + + simple->registerCallee(doubleCallee.in ()); + + ACE_OS::sleep(120); + + ACE_DEBUG ((LM_DEBUG, "done sleeping\n")); + + _orb->shutdown(1); } - - // narrow the reference to the particular type we wish to deal with - Simple_var simple = Simple::_narrow(obj.in ()); - if (CORBA::is_nil(simple.in ())) + catch (const ::CORBA::Exception &ex) { - ACE_ERROR ((LM_ERROR, "could not get reference\n")); - return 1; + ex._tao_print_exception("Caught unexpected CORBA exception :"); } - - // create an object reference that has a bogus value for the first - // profile - obj = orb->resolve_initial_references("IORManipulation"); - TAO_IOP::TAO_IOR_Manipulation_var iorm = - TAO_IOP::TAO_IOR_Manipulation::_narrow(obj.in()); - - // Status: The following scenarios appear to work: - // - first profile invalid host name, second profile valid. - // - first profile invalid ip number, second profiel valid. - // - first profiel invalid port number, second profile valid. - // - // The following causes a core dump of the server: - // - first and second invalid - // - // Note that he iormanip is being used since it is not practical - // to have a test case that depends on a VPN being present. - // - CORBA::Object_var name1 = - orb->string_to_object ("corbaloc:iiop:10.0.2.3:6060/xyz"); - CORBA::Object_var name2 = - orb->string_to_object ("corbaloc:iiop:daisnot:7070/xyz"); - CORBA::String_var name1_ior = orb->object_to_string(name1.in()); - CORBA::String_var name2_ior = orb->object_to_string(name2.in()); - - // create a callback object - Callee_i * callee_i = new Callee_i; - // get the CORBA reference - PortableServer::ObjectId_var id = - poa->activate_object (callee_i); - - CORBA::Object_var object_act = poa->id_to_reference (id.in ()); - - Callee_var callee = Callee::_narrow (object_act.in ()); - - if (CORBA::is_nil(callee.in ())) - { - ACE_ERROR ((LM_ERROR, "could not get callback object\n")); - return 1; - } - else - { - CORBA::String_var str = orb->object_to_string(callee.in ()); - FILE *output_file= ACE_OS::fopen ("ior", "w"); - if (output_file == 0) - ACE_ERROR_RETURN ((LM_ERROR, - "Cannot open output file for writing IOR: ior\n"), - 1); - ACE_OS::fprintf (output_file, "%s", str.in ()); - ACE_OS::fclose (output_file); - } - - // create a reference with two profiles with the first on being - // bogus. If things work as they should the callback should be - // succesful with the ORB trying the second profile. - TAO_IOP::TAO_IOR_Manipulation::IORList iors (2); - iors.length (2); - iors [0] = name1; - iors [1] = name2; - - CORBA::Object_var merged = iorm->merge_iors(iors); - Callee_var doubleCallee = Callee::_unchecked_narrow(merged.in()); - - ACE_DEBUG ((LM_DEBUG, "Profile count is %d\n", - iorm->get_profile_count(merged.in()))); - - simple->registerCallee(doubleCallee.in ()); - - ACE_OS::sleep(120); - - ACE_DEBUG ((LM_DEBUG, "done slpeeing\n")); - - orb->shutdown(1); - return 0; } diff --git a/tests/Bug_2183_Regression/run_test.pl b/tests/Bug_2183_Regression/run_test.pl index 46af18e1354..a201bdb4861 100755 --- a/tests/Bug_2183_Regression/run_test.pl +++ b/tests/Bug_2183_Regression/run_test.pl @@ -15,9 +15,12 @@ my $client = PerlACE::TestTarget::create_target (2) || die "Create target 2 fail # The server IOR file $iorbase = "server.ior"; - -$server_conf = $server->LocalFile ("server.conf"); $server_ior_file = $server->LocalFile ($iorbase); + +# The server configuration file +$server_conf_file = "server.conf"; +$server_conf = $server->LocalFile ($server_conf_file); + $server->DeleteFile ($iorbase); # The client and server processes @@ -29,6 +32,13 @@ if ($^O == 'VMS') { $port = '15000'; +# copy the configuation file +if ($server->PutFile ($server_conf_file) == -1) { + print STDERR "ERROR: cannot set file <$server_conf>\n"; + $SV->Kill (); $SV->TimedWait (1); + return 1; +} + $SV = $server->CreateProcess ("server", "-o $server_ior_file " . "-ORBEndpoint iiop://:$port " . diff --git a/tests/Bug_2186_Regression/run_test.pl b/tests/Bug_2186_Regression/run_test.pl index 5b158671660..14e5a634f72 100755 --- a/tests/Bug_2186_Regression/run_test.pl +++ b/tests/Bug_2186_Regression/run_test.pl @@ -31,7 +31,16 @@ $client->DeleteFile($iorbase); my $client_iorbase_file = $client->LocalFile ($client_iorbase); $client->DeleteFile($client_iorbase); -my $server_conf = $server->LocalFile ("server.conf"); +my $server_conf_file = "server.conf"; +my $server_conf = $server->LocalFile ($server_conf_file); + + +# copy the configuation file +if ($server->PutFile ($server_conf_file) == -1) { + print STDERR "ERROR: cannot set file <$server_conf>\n"; + $SV->Kill (); $SV->TimedWait (1); + return 1; +} $SV = $server->CreateProcess ("server", "-ORBdebuglevel $debug_level " . diff --git a/tests/Bug_2241_Regression/Bug_2241_Regression.mpc b/tests/Bug_2241_Regression/Bug_2241_Regression.mpc new file mode 100644 index 00000000000..9a975cb5ea0 --- /dev/null +++ b/tests/Bug_2241_Regression/Bug_2241_Regression.mpc @@ -0,0 +1,6 @@ +// -*- MPC -*- +// $Id$ + +project(Bug_2241_Regression): taoserver { + exename = Bug_2241_Regression +} diff --git a/tests/Bug_2241_Regression/Client_Task.cpp b/tests/Bug_2241_Regression/Client_Task.cpp new file mode 100644 index 00000000000..e39e0d96191 --- /dev/null +++ b/tests/Bug_2241_Regression/Client_Task.cpp @@ -0,0 +1,53 @@ +// +// $Id$ +// + +#include "Client_Task.h" +#include "TestC.h" + +Client_Task::Client_Task (const ACE_TCHAR *ior, + CORBA::ORB_ptr corb, + ACE_Thread_Manager *thr_mgr) + : ACE_Task_Base (thr_mgr) + , input_ (ior) + , corb_ (CORBA::ORB::_duplicate (corb)) + +{ +} + +int +Client_Task::svc (void) +{ + try + { + CORBA::Object_var tmp = + this->corb_->string_to_object (input_); + + Test::Hello_var hello = + Test::Hello::_narrow(tmp.in ()); + + if (CORBA::is_nil (hello.in ())) + { + ACE_ERROR_RETURN ((LM_DEBUG, + "Nil Test::Hello reference <%s>\n", + input_), + 1); + } + + CORBA::String_var the_string = + hello->get_string (); + + ACE_DEBUG ((LM_DEBUG, "(%P|%t) - string returned <%C>\n", + the_string.in ())); + + hello->shutdown (); + } + catch (const CORBA::Exception& ex) + { + ex._tao_print_exception ("Exception caught:"); + return 1; + } + + return 0; + +} diff --git a/tests/Bug_2241_Regression/Client_Task.h b/tests/Bug_2241_Regression/Client_Task.h new file mode 100644 index 00000000000..8f6557cdec8 --- /dev/null +++ b/tests/Bug_2241_Regression/Client_Task.h @@ -0,0 +1,37 @@ +// +// $Id$ +// + +#ifndef COLLOCATED_TEST_CLIENT_TASK_H +#define COLLOCATED_TEST_CLIENT_TASK_H +#include /**/ "ace/pre.h" +#include "ace/Task.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ +#include "tao/ORB.h" + + +/// Implement a Task to run the client as a thread +class Client_Task : public ACE_Task_Base +{ +public: + + /// Constructor + Client_Task (const ACE_TCHAR *input, + CORBA::ORB_ptr corb, + ACE_Thread_Manager *thr_mgr); + + /// Thread entry point + int svc (void); + +private: + const ACE_TCHAR *input_; + + CORBA::ORB_var corb_; + +}; + +#include /**/ "ace/post.h" +#endif /* COLLOCATED_TEST_CLIENT_TASK_H */ diff --git a/tests/Bug_2241_Regression/Collocated_Test.cpp b/tests/Bug_2241_Regression/Collocated_Test.cpp new file mode 100644 index 00000000000..282295ad5e3 --- /dev/null +++ b/tests/Bug_2241_Regression/Collocated_Test.cpp @@ -0,0 +1,106 @@ +//$Id$ +#include "Server_Task.h" +#include "Client_Task.h" +#include "ace/Get_Opt.h" +#include "ace/Argv_Type_Converter.h" +#include "ace/SString.h" +#include "ace/Manual_Event.h" + +const ACE_TCHAR *output = ACE_TEXT("test.ior"); +const ACE_TCHAR *input = ACE_TEXT("file://test.ior"); +// static int named_orbs = 0; +ACE_CString server_orb; +ACE_CString client_orb; +int +parse_args (int argc, ACE_TCHAR *argv[]) +{ + ACE_Get_Opt get_opts (argc, argv, ACE_TEXT("k:o:n")); + int c; + + while ((c = get_opts ()) != -1) + switch (c) + { + case 'o': + output = get_opts.opt_arg (); + break; + case 'k': + input = get_opts.opt_arg (); + break; + case 'n': + // named_orbs = 1; + server_orb.set ("server_orb"); + client_orb.set ("client_orb"); + break; + case '?': + default: + // This is a hack but that is okay! + return 0; + } + // Indicates successful parsing of the command line + return 0; +} + +int +ACE_TMAIN(int argc, ACE_TCHAR *argv[]) +{ + if (parse_args (argc, + argv) == -1) + return -1; + + try + { + ACE_Argv_Type_Converter satc (argc, argv); + CORBA::ORB_var sorb = + CORBA::ORB_init (satc.get_argc (), + satc.get_TCHAR_argv (), + server_orb.c_str ()); + + ACE_Manual_Event me; + Server_Task server_task (output, + sorb.in (), + me, + ACE_Thread_Manager::instance ()); + + if (server_task.activate (THR_NEW_LWP | THR_JOINABLE, + 1, + 1) == -1) + { + ACE_ERROR ((LM_ERROR, "Error activating server task\n")); + } + + // Wait for the server thread to do some processing + me.wait (); + + ACE_Argv_Type_Converter catc (argc, argv); + CORBA::ORB_var corb = + CORBA::ORB_init (catc.get_argc (), + catc.get_TCHAR_argv (), + client_orb.c_str ()); + + Client_Task client_task (input, + corb.in (), + ACE_Thread_Manager::instance ()); + + if (client_task.activate (THR_NEW_LWP | THR_JOINABLE, + 1, + 1) == -1) + { + ACE_ERROR ((LM_ERROR, "Error activating client task\n")); + } + + // Wait for the client and server to finish + ACE_Thread_Manager::instance ()->wait (); + + // Now that all threads have completed we can destroy the ORB + sorb->destroy (); + if (server_orb != client_orb) + { + corb->destroy (); + } + } + catch (const CORBA::Exception&) + { + // Ignore exceptions.. + } + return 0; +} diff --git a/tests/Bug_2241_Regression/Hello.cpp b/tests/Bug_2241_Regression/Hello.cpp new file mode 100644 index 00000000000..cabcd9145d9 --- /dev/null +++ b/tests/Bug_2241_Regression/Hello.cpp @@ -0,0 +1,67 @@ +// +// $Id$ +// +#include "Hello.h" +#include "tao/ORB_Core.h" +#include "tao/ORB_Table.h" +#include "tao/ORB_Core_Auto_Ptr.h" + + Hello::Hello (CORBA::ORB_ptr orb, + ACE_thread_t thrid) + : orb_ (CORBA::ORB::_duplicate (orb)) + , thr_id_ (thrid) +{ +} + +char * +Hello::get_string (void) +{ + ACE_DEBUG ((LM_DEBUG, + "(%P|%t) Upcall in process ..\n")); + + // Use portable thread IDs + ACE_Thread_ID self_ID; + ACE_Thread_ID this_ID; + this_ID.id(this->thr_id_); + + if (self_ID == this_ID) + { + if (this->orb_->orb_core ()->optimize_collocation_objects () && + this->orb_->orb_core ()->use_global_collocation ()) + { + ACE_ERROR ((LM_ERROR, + "(%P|%t) ERROR: A remote call has been made " + " exiting ..\n")); + ACE_OS::abort (); + } + else if (this->orb_->orb_core ()->optimize_collocation_objects () && + this->orb_->orb_core ()->use_global_collocation () == 0) + { + TAO::ORB_Table * const orb_table = + TAO::ORB_Table::instance (); + + TAO_ORB_Core_Auto_Ptr tmp (orb_table->find ("server_orb")); + if (tmp.get () == 0) + { + // We are running on a single ORB and this is an error. + ACE_ERROR ((LM_ERROR, + "(%P|%t) ERROR: A remote call has been made " + " with a single ORB " + " exiting ..\n")); + ACE_OS::abort (); + } + } + } + + return CORBA::string_dup ("Hello there!"); +} + +void +Hello::shutdown (void) +{ + // Give the client thread time to return from the collocated + // call to this method before shutting down the ORB. We sleep + // to avoid BAD_INV_ORDER exceptions on fast dual processor machines. + ACE_OS::sleep (1); + this->orb_->shutdown (0); +} diff --git a/tests/Bug_2241_Regression/Hello.h b/tests/Bug_2241_Regression/Hello.h new file mode 100644 index 00000000000..1d5e27d075f --- /dev/null +++ b/tests/Bug_2241_Regression/Hello.h @@ -0,0 +1,34 @@ +// +// $Id$ +// + +#ifndef HELLO_H +#define HELLO_H +#include /**/ "ace/pre.h" + +#include "TestS.h" + +/// Implement the Test::Hello interface +class Hello + : public virtual POA_Test::Hello +{ +public: + /// Constructor + Hello (CORBA::ORB_ptr orb, + ACE_thread_t thr_id); + + // = The skeleton methods + virtual char * get_string (void); + + virtual void shutdown (void); + +private: + /// Use an ORB reference to conver strings to objects and shutdown + /// the application. + CORBA::ORB_var orb_; + + ACE_thread_t thr_id_; +}; + +#include /**/ "ace/post.h" +#endif /* HELLO_H */ diff --git a/tests/Bug_2241_Regression/Server_Task.cpp b/tests/Bug_2241_Regression/Server_Task.cpp new file mode 100644 index 00000000000..98f37e052e3 --- /dev/null +++ b/tests/Bug_2241_Regression/Server_Task.cpp @@ -0,0 +1,87 @@ +// +// $Id$ +// +#include "Server_Task.h" +#include "TestS.h" +#include "Hello.h" + +#include "ace/Manual_Event.h" + +Server_Task::Server_Task (const ACE_TCHAR *output, + CORBA::ORB_ptr sorb, + ACE_Manual_Event &me, + ACE_Thread_Manager *thr_mgr) + : ACE_Task_Base (thr_mgr) + , output_ (output) + , me_ (me) + , sorb_ (CORBA::ORB::_duplicate (sorb)) +{ +} + +int +Server_Task::svc (void) +{ + try + { + CORBA::Object_var poa_object = + this->sorb_->resolve_initial_references("RootPOA"); + + PortableServer::POA_var root_poa = + PortableServer::POA::_narrow (poa_object.in ()); + + if (CORBA::is_nil (root_poa.in ())) + ACE_ERROR_RETURN ((LM_ERROR, + " (%P|%t) Panic: nil RootPOA\n"), + 1); + + PortableServer::POAManager_var poa_manager = + root_poa->the_POAManager (); + + Hello *hello_impl; + ACE_NEW_RETURN (hello_impl, + Hello (this->sorb_.in (), + ACE_Thread::self ()), + 1); + + PortableServer::ServantBase_var owner_transfer(hello_impl); + + PortableServer::ObjectId_var id = + root_poa->activate_object (hello_impl); + + CORBA::Object_var object = root_poa->id_to_reference (id.in ()); + + Test::Hello_var hello = + Test::Hello::_narrow (object.in ()); + + CORBA::String_var ior = + this->sorb_->object_to_string (hello.in ()); + + // Output the IOR to the <this->output_> + FILE *output_file= ACE_OS::fopen (this->output_, + "w"); + if (output_file == 0) + ACE_ERROR_RETURN ((LM_ERROR, + "Cannot open output file for writing IOR: %s", + this->output_), + 1); + + ACE_OS::fprintf (output_file, "%s", ior.in ()); + ACE_OS::fclose (output_file); + + poa_manager->activate (); + + // Signal the main thread before we call orb->run (); + this->me_.signal (); + + this->sorb_->run (); + + ACE_DEBUG ((LM_DEBUG, "(%P|%t) server - event loop finished\n")); + } + catch (const CORBA::Exception& ex) + { + ex._tao_print_exception ("Exception caught:"); + return 1; + } + + return 0; +} diff --git a/tests/Bug_2241_Regression/Server_Task.h b/tests/Bug_2241_Regression/Server_Task.h new file mode 100644 index 00000000000..e42043c0711 --- /dev/null +++ b/tests/Bug_2241_Regression/Server_Task.h @@ -0,0 +1,48 @@ +// -*- C++ -*- +// +// $Id$ + +#ifndef COLLOCATED_SERVER_TASK_H +#define COLLOCATED_SERVER_TASK_H + +#include /**/ "ace/pre.h" + +#include "ace/Task.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "tao/ORB.h" + +ACE_BEGIN_VERSIONED_NAMESPACE_DECL +class ACE_Manual_Event; +ACE_END_VERSIONED_NAMESPACE_DECL + +/// Implement a Task to run the server in a single thread +class Server_Task : public ACE_Task_Base +{ +public: + /// Constructor + Server_Task (const ACE_TCHAR *output, + CORBA::ORB_ptr sorb, + ACE_Manual_Event &me, + ACE_Thread_Manager *thr_mgr); + + /// Thread entry point + int svc (void); + +private: + /// Output file for IOR + const ACE_TCHAR *output_; + + /// Manual event to wake up the main thread to create a client + /// thread. + ACE_Manual_Event &me_; + + CORBA::ORB_var sorb_; +}; + +#include /**/ "ace/post.h" + +#endif /* COLLOCATED_SERVER_TASK_H */ diff --git a/tests/Bug_2241_Regression/Test.idl b/tests/Bug_2241_Regression/Test.idl new file mode 100644 index 00000000000..3c0976e106d --- /dev/null +++ b/tests/Bug_2241_Regression/Test.idl @@ -0,0 +1,20 @@ +// +// $Id$ +// + +/// Put the interfaces in a module, to avoid global namespace pollution +module Test +{ + /// A very simple interface + interface Hello + { + /// Return a simple string + string get_string (); + + /// A method to shutdown the ORB + /** + * This method is used to simplify the test shutdown process + */ + oneway void shutdown (); + }; +}; diff --git a/tests/Bug_2241_Regression/run_test.pl b/tests/Bug_2241_Regression/run_test.pl new file mode 100755 index 00000000000..e9c473e8341 --- /dev/null +++ b/tests/Bug_2241_Regression/run_test.pl @@ -0,0 +1,63 @@ +eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' + & eval 'exec perl -S $0 $argv:q' + if 0; + +# $Id$ +# -*- perl -*- + +use lib "$ENV{ACE_ROOT}/bin"; +use PerlACE::TestTarget; + +my $server = PerlACE::TestTarget::create_target(1) || die "Create target 1 failed\n"; + +$iorbase = "test.ior"; +my $server_iorfile = $server->LocalFile ($iorbase); +$server->DeleteFile($iorbase); + +$status = 0; + +$SV = $server->CreateProcess ("Bug_2241_Regression"); + +print STDERR "======== Running in Default Mode \n"; +$SV->Arguments ("-o $server_iorfile -k file://$server_iorfile"); +$sv = $SV->SpawnWaitKill ($server->ProcessStartWaitInterval()); + +if ($sv != 0) { + print STDERR "ERROR in Collocated_Test\n"; + $status = 1; +} +$server->DeleteFile($iorbase); + +print STDERR "======== Running with global ORBCollocationStrategy\n"; +$SV->Arguments ("-o $server_iorfile -k file://$server_iorfile -ORBCollocation global"); +$sv = $SV->SpawnWaitKill ($server->ProcessStartWaitInterval()); + +if ($sv != 0) { + print STDERR "ERROR in Collocated_Test\n"; + $status = 1; +} +$server->DeleteFile($iorbase); + +print STDERR "======== Running with global ORBCollocationStrategy thru_poa\n"; +$SV->Arguments ("-o $server_iorfile -k file://$server_iorfile -ORBCollocation global -ORBCollocationStrategy thru_poa"); +$sv = $SV->SpawnWaitKill ($server->ProcessStartWaitInterval()); + +if ($sv != 0) { + print STDERR "ERROR in Collocated_Test\n"; + $status = 1; +} +$server->DeleteFile($iorbase); + +print STDERR "======== Running with -ORBCollocation global -ORBCollocationStrategy direct \n"; +$SV->Arguments ("-o $server_iorfile -k file://$server_iorfile -ORBCollocation global -ORBCollocationStrategy direct"); +$sv = $SV->SpawnWaitKill ($server->ProcessStartWaitInterval()); + +if ($sv != 0) { + print STDERR "ERROR in Collocated_Test\n"; + $status = 1; +} + +$server->DeleteFile($iorbase); +$server->GetStderrLog(); + +exit $status; diff --git a/tests/Bug_2935_Regression/run_test.pl b/tests/Bug_2935_Regression/run_test.pl index 64a4acd9aa6..d74177e77a7 100755 --- a/tests/Bug_2935_Regression/run_test.pl +++ b/tests/Bug_2935_Regression/run_test.pl @@ -49,8 +49,19 @@ $middle->DeleteFile ($middlelogfilebase); $source->DeleteFile ($sourcelogfilebase); +my $middleconffilebase = "middle.conf"; +my $middleconffile = $middle->LocalFile ($middleconffilebase); + +# copy the configuation file +if ($middle->PutFile ($middleconffilebase) == -1) { + print STDERR "ERROR: cannot set file <$middleconffile>\n"; + $SV->Kill (); $SV->TimedWait (1); + return 1; +} + + $SV = $sink->CreateProcess ("sink", "-o $sinkiorfile -orblogfile $sinklogfile -orbdebuglevel 9"); -$MD = $middle->CreateProcess ("middle", "-o $middleiorfile -f $sinkiorfile -ORBSvcConf middle.conf -orblogfile $middlelogfile -orbdebuglevel 9"); +$MD = $middle->CreateProcess ("middle", "-o $middleiorfile -f $sinkiorfile -ORBSvcConf $middleconffile -orblogfile $middlelogfile -orbdebuglevel 9"); $CL = $source->CreateProcess ("source", "-f $middleiorfile -orblogfile $sourcelogfile -orbdebuglevel 9"); $SV->Spawn (); diff --git a/tests/Bug_3068_Regression/run_test.pl b/tests/Bug_3068_Regression/run_test.pl index 74ef14252e6..456f2895ad2 100755 --- a/tests/Bug_3068_Regression/run_test.pl +++ b/tests/Bug_3068_Regression/run_test.pl @@ -26,8 +26,21 @@ my $client_iorfile = $client->LocalFile ($iorbase); $server->DeleteFile($iorbase); $client->DeleteFile($iorbase); -my $server_conf = $server->LocalFile ("server.conf"); -my $client_conf = $client->LocalFile ("client.conf"); +my $server_conf_base = "server.conf"; +my $client_conf_base = "client.conf"; +my $server_conf = $server->LocalFile ($server_conf_base); +my $client_conf = $client->LocalFile ($client_conf_base); + +if ($server->PutFile ($server_conf_base) == -1) { + print STDERR "ERROR: cannot set file <$server_conf>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} +if ($client->PutFile ($client_conf_base) == -1) { + print STDERR "ERROR: cannot set file <$client_conf>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} $SV = $server->CreateProcess ("server", "-ORBdebuglevel $debug_level " . diff --git a/tests/Bug_3163_Regression/run_test.pl b/tests/Bug_3163_Regression/run_test.pl index 57a4cf1d82a..fa73fd42065 100755 --- a/tests/Bug_3163_Regression/run_test.pl +++ b/tests/Bug_3163_Regression/run_test.pl @@ -21,13 +21,22 @@ my $server = PerlACE::TestTarget::create_target (1) || die "Create target 1 fail my $client = PerlACE::TestTarget::create_target (2) || die "Create target 2 failed\n"; my $iorbase = "server.ior"; -my $svcconf = "server.conf"; my $server_iorfile = $server->LocalFile ($iorbase); + +my $svcconf = "server.conf"; my $server_svcconf = $server->LocalFile ($svcconf); + my $client_iorfile = $client->LocalFile ($iorbase); + $server->DeleteFile($iorbase); $client->DeleteFile($iorbase); +if ($server->PutFile ($svcconf) == -1) { + print STDERR "ERROR: cannot set file <$server_svcconf>\n"; + exit 1; +} + + $SV = $server->CreateProcess ("server", "-ORBdebuglevel $debug_level -o $server_iorfile -ORBStdProfileComponents 0 -ORBSvcConf $server_svcconf"); $CL = $client->CreateProcess ("client", "-v 131401 -k file://$client_iorfile"); $server_status = $SV->Spawn (); diff --git a/tests/Bug_3506_Regression/client.cpp b/tests/Bug_3506_Regression/client.cpp index 34f24b89e24..fdf9f73ddf7 100644 --- a/tests/Bug_3506_Regression/client.cpp +++ b/tests/Bug_3506_Regression/client.cpp @@ -119,12 +119,20 @@ int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { int retval = 0; - m_ORB_p = CORBA::ORB_init (argc, argv); - IF_Test_client testclient; + try + { + m_ORB_p = CORBA::ORB_init (argc, argv); + IF_Test_client testclient; - for (int i = 0; i < 10; i++) + for (int i = 0; i < 10; i++) + { + retval += testclient.foo (argc, argv, i == 9); + } + } + catch (const ::CORBA::Exception &ex) { - retval += testclient.foo (argc, argv, i == 9); + ex._tao_print_exception("ERROR : unexpected CORBA exception caugth :"); + ++retval; } return retval; } diff --git a/tests/Bug_3548_Regression/client.cpp b/tests/Bug_3548_Regression/client.cpp index 7a98848dfb4..55e78601833 100644 --- a/tests/Bug_3548_Regression/client.cpp +++ b/tests/Bug_3548_Regression/client.cpp @@ -6,37 +6,45 @@ //--------------------------------------------------------------------------- -MEMEATER::StringSeq* message_buffer = 0; +MEMEATER::StringSeq* _message_buffer = 0; #define MAX_MSG_BUF 100 void eat_my_memory() { const char * output_string = "Eat my Memory! Eat my Memory! Eat my Memory! Eat my Memory!"; - CORBA::ULong msg_count = message_buffer->length(); + CORBA::ULong msg_count = _message_buffer->length(); if (msg_count < MAX_MSG_BUF) { - message_buffer->length(msg_count+1); - (*message_buffer)[msg_count] = CORBA::string_dup( output_string); + _message_buffer->length(msg_count+1); + (*_message_buffer)[msg_count] = CORBA::string_dup( output_string); } else { - message_buffer->length(1); - (*message_buffer)[0] = CORBA::string_dup( output_string ); + _message_buffer->length(1); + (*_message_buffer)[0] = CORBA::string_dup( output_string ); } } int ACE_TMAIN(int, ACE_TCHAR*[]) { - message_buffer = new MEMEATER::StringSeq; - message_buffer->length(0); + _message_buffer = new MEMEATER::StringSeq; + _message_buffer->length(0); - for (int i = 0; i < 1000; i++) + try { - eat_my_memory(); + for (int i = 0; i < 1000; i++) + { + eat_my_memory(); + } + } + catch (const ::CORBA::Exception &ex) + { + ex._tao_print_exception("ERROR : unexpected CORBA exception caugth :"); + return 1; } - delete message_buffer; + delete _message_buffer; return 0; } diff --git a/tests/Bug_3630_Regression/run_test.pl b/tests/Bug_3630_Regression/run_test.pl index 55adb524064..2b5d3559de4 100755 --- a/tests/Bug_3630_Regression/run_test.pl +++ b/tests/Bug_3630_Regression/run_test.pl @@ -10,6 +10,15 @@ use PerlACE::TestTarget; my $server = PerlACE::TestTarget::create_target (1) || die "Create target 1 failed\n"; +my $srvconf = "TAO Conf File.conf"; +my $server_svcconf = $server->LocalFile ($svcconf); + +if ($server->PutFile ($svcconf) == -1) { + print STDERR "ERROR: cannot set file <$server_svcconf>\n"; + exit 1; +} + + $SV = $server->CreateProcess ("server"); $server_status = $SV->Spawn (); diff --git a/tests/Bug_3630_Regression/server.cpp b/tests/Bug_3630_Regression/server.cpp index 55ff6e69e3d..99119586e4a 100644 --- a/tests/Bug_3630_Regression/server.cpp +++ b/tests/Bug_3630_Regression/server.cpp @@ -94,7 +94,7 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[]) if (result == 0) ACE_DEBUG ((LM_DEBUG, - ACE_TEXT ("Test passed!"))); + ACE_TEXT ("Test passed!\n"))); else ACE_ERROR ((LM_ERROR, ACE_TEXT ("Test failed. Result: %d\n"), diff --git a/tests/Bug_3683_Regression/Echo_i.h b/tests/Bug_3683_Regression/Echo_i.h index 5afd29de0b1..f626d509794 100644 --- a/tests/Bug_3683_Regression/Echo_i.h +++ b/tests/Bug_3683_Regression/Echo_i.h @@ -55,8 +55,7 @@ private: /// ORB pointer. CORBA::ORB_var orb_; - /// Keeping g++ 2.7.2 happy.. - ACE_UNIMPLEMENTED_FUNC (void operator= (const Echo_i&)) + void operator= (const Echo_i&); }; #endif /* ECHO_I_H */ diff --git a/tests/Bug_3683_Regression/run_test.pl b/tests/Bug_3683_Regression/run_test.pl index 6b1960d9b26..5605748ea5d 100755 --- a/tests/Bug_3683_Regression/run_test.pl +++ b/tests/Bug_3683_Regression/run_test.pl @@ -26,8 +26,16 @@ my $client_iorfile = $client->LocalFile ($iorbase); $server->DeleteFile($iorbase); $client->DeleteFile($iorbase); +my $clientconf = "svc.conf"; +my $clientconffile = $client->LocalFile ($clientconf); + +if ($client->PutFile ($clientconf) == -1) { + print STDERR "ERROR: cannot set file <$clientconffile>\n"; + exit 1; +} + $SV = $server->CreateProcess ("server", "-ORBdebuglevel $debug_level -o $server_iorfile"); -$CL = $client->CreateProcess ("client", "-f $client_iorfile -x -ORBSvcConf svc.conf -p 16"); +$CL = $client->CreateProcess ("client", "-f $client_iorfile -x -ORBSvcConf $clientconffile -p 16"); $server_status = $SV->Spawn (); if ($server_status != 0) { diff --git a/tests/CDR/allocator.cpp b/tests/CDR/allocator.cpp index 59feefc454c..87320568722 100644 --- a/tests/CDR/allocator.cpp +++ b/tests/CDR/allocator.cpp @@ -67,133 +67,142 @@ private: int ACE_TMAIN(int argc, ACE_TCHAR *argv[]) { - CORBA::ORB_var orb = - CORBA::ORB_init (argc, argv); - - int tss = 0; - int iterations = 500; - int repeat = 100; - int max_fragments = 2048; - int max_fragment_size = 1024; - int max_arguments = 16; - int max_argument_size = 1024; - int quiet = 0; - unsigned int seed = static_cast<unsigned int> (ACE_OS::time(0)); - - ACE_Get_Opt get_opt (argc, argv, ACE_TEXT("tn:f:m:s:a:b:r:q")); - int opt; - - while ((opt = get_opt ()) != EOF) + try { - switch (opt) + CORBA::ORB_var orb = + CORBA::ORB_init (argc, argv); + + int tss = 0; + int iterations = 500; + int repeat = 100; + int max_fragments = 2048; + int max_fragment_size = 1024; + int max_arguments = 16; + int max_argument_size = 1024; + int quiet = 0; + unsigned int seed = static_cast<unsigned int> (ACE_OS::time(0)); + + ACE_Get_Opt get_opt (argc, argv, ACE_TEXT("tn:f:m:s:a:b:r:q")); + int opt; + + while ((opt = get_opt ()) != EOF) { - case 't': - tss = 1; - break; - case 'n': - iterations = ACE_OS::atoi (get_opt.opt_arg ()); - break; - case 'r': - repeat = ACE_OS::atoi (get_opt.opt_arg ()); - break; - case 'f': - max_fragments = ACE_OS::atoi (get_opt.opt_arg ()); - break; - case 'm': - max_fragment_size = ACE_OS::atoi (get_opt.opt_arg ()); - break; - case 's': - seed = ACE_OS::atoi (get_opt.opt_arg ()); - break; - case 'a': - max_arguments = ACE_OS::atoi (get_opt.opt_arg ()); - break; - case 'b': - max_argument_size = ACE_OS::atoi (get_opt.opt_arg ()); - break; - case 'q': - quiet = 1; - break; - case '?': - default: - ACE_DEBUG ((LM_DEBUG, - "Usage: %s " - "-n iterations " - "-n repeat " - "-f max_fragments " - "-m max_fragment_size " - "-s seed " - "-a max_arguments " - "-b max_argument_size " - "\n", - argv[0])); - return -1; + switch (opt) + { + case 't': + tss = 1; + break; + case 'n': + iterations = ACE_OS::atoi (get_opt.opt_arg ()); + break; + case 'r': + repeat = ACE_OS::atoi (get_opt.opt_arg ()); + break; + case 'f': + max_fragments = ACE_OS::atoi (get_opt.opt_arg ()); + break; + case 'm': + max_fragment_size = ACE_OS::atoi (get_opt.opt_arg ()); + break; + case 's': + seed = ACE_OS::atoi (get_opt.opt_arg ()); + break; + case 'a': + max_arguments = ACE_OS::atoi (get_opt.opt_arg ()); + break; + case 'b': + max_argument_size = ACE_OS::atoi (get_opt.opt_arg ()); + break; + case 'q': + quiet = 1; + break; + case '?': + default: + ACE_DEBUG ((LM_DEBUG, + "Usage: %s " + "-n iterations " + "-n repeat " + "-f max_fragments " + "-m max_fragment_size " + "-s seed " + "-a max_arguments " + "-b max_argument_size " + "\n", + argv[0])); + return -1; + } } - } - ACE_DEBUG ((LM_DEBUG, "SEED = %d\n", seed)); + ACE_DEBUG ((LM_DEBUG, "SEED = %d\n", seed)); - ACE_Allocator* buffer_allocator = - ACE_Allocator::instance (); - ACE_Allocator* dblock_allocator = - ACE_Allocator::instance (); - if (tss) - { - buffer_allocator = - TAO_ORB_Core_instance ()->output_cdr_buffer_allocator (); - dblock_allocator = - TAO_ORB_Core_instance ()->output_cdr_dblock_allocator (); - } - - Application_Simulator simulator (max_fragments, - max_fragment_size); - char* argument_buffer; - ACE_NEW_RETURN (argument_buffer, char[max_argument_size], 1); + ACE_Allocator* buffer_allocator = + ACE_Allocator::instance (); + ACE_Allocator* dblock_allocator = + ACE_Allocator::instance (); + if (tss) + { + buffer_allocator = + TAO_ORB_Core_instance ()->output_cdr_buffer_allocator (); + dblock_allocator = + TAO_ORB_Core_instance ()->output_cdr_dblock_allocator (); + } - int* argument_sizes; - ACE_NEW_RETURN (argument_sizes, int[max_arguments], 1); + Application_Simulator simulator (max_fragments, + max_fragment_size); + char* argument_buffer; + ACE_NEW_RETURN (argument_buffer, char[max_argument_size], 1); - int n = ACE_OS::rand_r (&seed) % max_arguments + 1; - for (int k = 0; k < n; ++k) - argument_sizes[k] = ACE_OS::rand_r (&seed) % max_argument_size + 1; + int* argument_sizes; + ACE_NEW_RETURN (argument_sizes, int[max_arguments], 1); - for (int i = 0; i < iterations; ++i) - { - simulator.upcall (&seed); + int n = ACE_OS::rand_r (&seed) % max_arguments + 1; + for (int k = 0; k < n; ++k) + argument_sizes[k] = ACE_OS::rand_r (&seed) % max_argument_size + 1; - // @@ TODO this is the place to put the other allocators. - ACE_High_Res_Timer cdr_encoding; - for (int j = 0; j < repeat; ++j) + for (int i = 0; i < iterations; ++i) { - cdr_encoding.start_incr (); + simulator.upcall (&seed); - char buffer[DEFAULT_BUFFER_SIZE]; - ACE_OutputCDR cdr (buffer, sizeof(buffer), - TAO_ENCAP_BYTE_ORDER, - buffer_allocator, - dblock_allocator); - - for (int k = 0; k < n; ++k) + // @@ TODO this is the place to put the other allocators. + ACE_High_Res_Timer cdr_encoding; + for (int j = 0; j < repeat; ++j) { - cdr.write_char_array (argument_buffer, - argument_sizes[k]); + cdr_encoding.start_incr (); + + char buffer[DEFAULT_BUFFER_SIZE]; + ACE_OutputCDR cdr (buffer, sizeof(buffer), + TAO_ENCAP_BYTE_ORDER, + buffer_allocator, + dblock_allocator); + + for (int k = 0; k < n; ++k) + { + cdr.write_char_array (argument_buffer, + argument_sizes[k]); + } + + cdr_encoding.stop_incr (); } - cdr_encoding.stop_incr (); - } + ACE_Time_Value tv; + cdr_encoding.elapsed_time_incr (tv); + ACE_hrtime_t usecs = tv.sec (); + usecs *= static_cast<ACE_UINT32> (ACE_ONE_SECOND_IN_USECS); + usecs += tv.usec (); + double average = + static_cast<double> (ACE_HRTIME_CONVERSION(usecs)) / repeat; - ACE_Time_Value tv; - cdr_encoding.elapsed_time_incr (tv); - ACE_hrtime_t usecs = tv.sec (); - usecs *= static_cast<ACE_UINT32> (ACE_ONE_SECOND_IN_USECS); - usecs += tv.usec (); - double average = - static_cast<double> (ACE_HRTIME_CONVERSION(usecs)) / repeat; + if (!quiet) + ACE_OS::printf ("AVE: %d %f\n", + i, average); - if (!quiet) - ACE_OS::printf ("AVE: %d %f\n", - i, average); + } + } + catch (const CORBA::Exception& ex) + { + ex._tao_print_exception ("Caught unexpected CORBA exception:"); + return 1; } return 0; } diff --git a/tests/CSD_Collocation/run_test.pl b/tests/CSD_Collocation/run_test.pl index d8a46d5d5af..ee93aa41e11 100755 --- a/tests/CSD_Collocation/run_test.pl +++ b/tests/CSD_Collocation/run_test.pl @@ -9,8 +9,14 @@ use lib "$ENV{ACE_ROOT}/bin"; use PerlACE::TestTarget; my $server = PerlACE::TestTarget::create_target (1) || die "Create target 1 failed\n"; + my $svcconf = "svc.conf.csd"; my $server_svcconf = $server->LocalFile ($svcconf); +if ($server->PutFile ($svcconf) == -1) { + print STDERR "ERROR: cannot set file <$server_svcconf>\n"; + exit 1; +} + $SV = $server->CreateProcess ("Collocation", "-ORBSvcConf $server_svcconf"); diff --git a/tests/Connect_Strategy_Test/run_test.pl b/tests/Connect_Strategy_Test/run_test.pl index 01ee992887d..ae333b28998 100755 --- a/tests/Connect_Strategy_Test/run_test.pl +++ b/tests/Connect_Strategy_Test/run_test.pl @@ -21,15 +21,25 @@ my $server = PerlACE::TestTarget::create_target (1) || die "Create target 1 fail my $client = PerlACE::TestTarget::create_target (2) || die "Create target 2 failed\n"; my $iorbase = "server.ior"; -my $reactor_conf = "reactor$PerlACE::svcconf_ext"; -my $blocked_conf = "blocked$PerlACE::svcconf_ext"; my $server_iorfile = $server->LocalFile ($iorbase); my $client_iorfile = $client->LocalFile ($iorbase); -my $client_reactor_conf = $client->LocalFile ($reactor_conf); -my $client_blocked_conf = $client->LocalFile ($blocked_conf); $server->DeleteFile($iorbase); $client->DeleteFile($iorbase); +my $reactor_conf = "reactor$PerlACE::svcconf_ext"; +my $client_reactor_conf = $client->LocalFile ($reactor_conf); +if ($client->PutFile ($reactor_conf) == -1) { + print STDERR "ERROR: cannot set file <$client_reactor_conf>\n"; + exit 1; +} + +my $blocked_conf = "blocked$PerlACE::svcconf_ext"; +my $client_blocked_conf = $client->LocalFile ($blocked_conf); +if ($client->PutFile ($blocked_conf) == -1) { + print STDERR "ERROR: cannot set file <$client_blocked_conf>\n"; + exit 1; +} + $SV = $server->CreateProcess ("server", "-ORBdebuglevel $debug_level -o $server_iorfile"); $CL = $client->CreateProcess ("client", "-k file://$client_iorfile"); $server_status = $SV->Spawn (); diff --git a/tests/Connection_Failure/client.cpp b/tests/Connection_Failure/client.cpp index 0f33ce2fa4e..3f7bb372923 100644 --- a/tests/Connection_Failure/client.cpp +++ b/tests/Connection_Failure/client.cpp @@ -29,7 +29,10 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[]) "_narrow() to non-existent object failed correctly. Test succeeded.\n")); return 0; } - + catch (const ::CORBA::Exception &ex) + { + ex._tao_print_exception("ERROR : unexpected CORBA exception caugth :"); + } // Should not reach here. ACE_ERROR_RETURN ((LM_ERROR, "_narrow() succeeded to non-existent object when it should not have...\n"), diff --git a/tests/Connection_Purging/run_test.pl b/tests/Connection_Purging/run_test.pl index 7355ed2174a..610f042cbd9 100755 --- a/tests/Connection_Purging/run_test.pl +++ b/tests/Connection_Purging/run_test.pl @@ -70,7 +70,12 @@ for($i = 0; $i < $server_count; $i++) { $servers_endpoint[$i] = "-ORBEndpoint uiop://$servers_socket[$i]"; } elsif ($use_shmiop) { - $server_shmiop_conf = $servers[$i]->LocalFile ("server_shmiop$PerlACE::svcconf_ext"); + $server_conf_base = "server_shmiop$PerlACE::svcconf_ext"; + $server_shmiop_conf = $servers[$i]->LocalFile ($server_shmiop_conf); + if ($servers[$i]->PutFile ($server_conf_base) == -1) { + print STDERR "ERROR: cannot set file <$server_shmiop_conf>\n"; + exit 1; + } $servers_endpoint[$i] = "-ORBEndpoint shmiop:// -ORBSvcConf $server_shmiop_conf"; } else { @@ -114,9 +119,13 @@ for($i = 0; $i < $clients_count; $i++) { if ($debug_level < 1) { $debug_level = 1; #min value for debug level is one } + $client_conf_file = $clients[$i]->LocalFile ($clients_conf[$i]); + if ($clients[$i]->PutFile ($clients_conf[$i]) == -1) { + print STDERR "ERROR: cannot set file <$client_conf_file>\n"; + } $CLS[$i] = $clients[$i]->CreateProcess ("client", "-ORBDebugLevel $debug_level ". "-k $clients_iorfile[$i] ". - "-ORBSvcConf $clients_conf[$i]"); + "-ORBSvcConf $client_conf_file"); my $client_status = $CLS[$i]->SpawnWaitKill ($clients[$i]->ProcessStartWaitInterval() + 75); diff --git a/tests/DII_AMI_Forward/client.cpp b/tests/DII_AMI_Forward/client.cpp index 93db338da7d..a299e0124c0 100644 --- a/tests/DII_AMI_Forward/client.cpp +++ b/tests/DII_AMI_Forward/client.cpp @@ -102,37 +102,46 @@ int do_shutdown_test (CORBA::Object_var &server) int ACE_TMAIN(int argc, ACE_TCHAR *argv[]) { - CORBA::ORB_var orb = CORBA::ORB_init (argc, argv); - if (parse_args (argc, argv) != 0) - return 1; int result = 0; + try + { + CORBA::ORB_var orb = CORBA::ORB_init (argc, argv); - ACE_DEBUG ((LM_DEBUG,"Client using ior source %s\n", ior)); - CORBA::Object_var server = orb->string_to_object (ior); + if (parse_args (argc, argv) != 0) + return 1; - CORBA::Object_var obj = orb->resolve_initial_references ("RootPOA"); - PortableServer::POA_var root = - PortableServer::POA::_narrow (obj.in()); + ACE_DEBUG ((LM_DEBUG,"Client using ior source %s\n", ior)); + CORBA::Object_var server = orb->string_to_object (ior); - PortableServer::POAManager_var pm = root->the_POAManager(); - pm->activate(); - bool got_reply = false; - Messaging::ReplyHandler_var callback = new DII_ReplyHandler(got_reply); + CORBA::Object_var obj = orb->resolve_initial_references ("RootPOA"); + PortableServer::POA_var root = + PortableServer::POA::_narrow (obj.in()); - do_primary_test (server,callback); + PortableServer::POAManager_var pm = root->the_POAManager(); + pm->activate(); + bool got_reply = false; + Messaging::ReplyHandler_var callback = new DII_ReplyHandler(got_reply); - for (int i = 0; i < 100 && !got_reply; i++) - { - ACE_Time_Value t(0,10000); - orb->perform_work(t); - } + do_primary_test (server,callback); + + for (int i = 0; i < 100 && !got_reply; i++) + { + ACE_Time_Value t(0,10000); + orb->perform_work(t); + } - if (do_shutdown) - result = do_shutdown_test (server); + if (do_shutdown) + result = do_shutdown_test (server); - ACE_DEBUG ((LM_DEBUG,"Shutting down and destrying ORB.\n")); - orb->destroy(); - ACE_DEBUG ((LM_DEBUG,"ORB destroyed\n")); + ACE_DEBUG ((LM_DEBUG,"Shutting down and destrying ORB.\n")); + orb->destroy(); + ACE_DEBUG ((LM_DEBUG,"ORB destroyed\n")); + } + catch (const ::CORBA::Exception &ex) + { + ex._tao_print_exception("ERROR : unexpected CORBA exception caugth :"); + ++result; + } return result; } diff --git a/tests/DynAny_Test/driver.cpp b/tests/DynAny_Test/driver.cpp index 40de75a5f49..e143ff00d6b 100644 --- a/tests/DynAny_Test/driver.cpp +++ b/tests/DynAny_Test/driver.cpp @@ -27,23 +27,33 @@ int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { - Driver driver; + int error_count = 0; + try + { + Driver driver; - // initialize the driver - if (driver.init (argc, argv) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "(%N:%l) driver.cpp - " - "Driver initialization failed\n"), - -1); + // initialize the driver + if (driver.init (argc, argv) == -1) + ACE_ERROR_RETURN ((LM_ERROR, + "(%N:%l) driver.cpp - " + "Driver initialization failed\n"), + -1); - // run the tests - int error_count = driver.run (); - if (error_count != 0) + // run the tests + error_count = driver.run (); + if (error_count != 0) + { + ACE_ERROR ((LM_ERROR, + "(%N:%l) driver.cpp - " + "%d tests failed\n", + error_count)); + } + } + catch (const CORBA::Exception& ex) { - ACE_ERROR ((LM_ERROR, - "(%N:%l) driver.cpp - " - "%d tests failed\n", - error_count)); + ex._tao_print_exception ("Caught unexpected CORBA exception:"); + + ++error_count; } return error_count; diff --git a/tests/Faults/run_test.pl b/tests/Faults/run_test.pl index 393567ec1a6..d90e6dfd7e9 100755 --- a/tests/Faults/run_test.pl +++ b/tests/Faults/run_test.pl @@ -23,9 +23,7 @@ my $middle = PerlACE::TestTarget::create_target (3) || die "Create target 3 fail my $iorbase = "server.ior"; my $midiorbase = "middle.ior"; -my $svcconf = "server$PerlACE::svcconf_ext"; my $server_iorfile = $server->LocalFile ($iorbase); -my $server_svcfile = $server->LocalFile ($svcconf); my $client_iorfile = $client->LocalFile ($iorbase); my $client_midiorfile = $client->LocalFile ($midiorbase); my $middle_iorfile = $middle->LocalFile ($iorbase); @@ -36,6 +34,14 @@ $client->DeleteFile($midiorbase); $middle->DeleteFile($iorbase); $middle->DeleteFile($midiorbase); +my $svcconf = "server$PerlACE::svcconf_ext"; +my $server_svcfile = $server->LocalFile ($svcconf); +if ($server->PutFile ($svcconf) == -1) { + print STDERR "ERROR: cannot set file <$server_svcfile>\n"; + exit 1; +} + + ############################################################################### print STDERR "################ Default ORB Config###############\n"; print STDERR "===== Base test, no crashes\n"; diff --git a/tests/Faults/run_test_pp.pl b/tests/Faults/run_test_pp.pl index 38a0f51a5b7..5e348fd00b7 100755 --- a/tests/Faults/run_test_pp.pl +++ b/tests/Faults/run_test_pp.pl @@ -21,13 +21,20 @@ my $server = PerlACE::TestTarget::create_target (1) || die "Create target 1 fail my $client = PerlACE::TestTarget::create_target (2) || die "Create target 2 failed\n"; my $iorbase = "server.ior"; -my $svcconf = "server$PerlACE::svcconf_ext"; my $server_iorfile = $server->LocalFile ($iorbase); -my $server_svcfile = $server->LocalFile ($svcconf); my $client_iorfile = $client->LocalFile ($iorbase); $server->DeleteFile($iorbase); $client->DeleteFile($iorbase); +my $svcconf = "server$PerlACE::svcconf_ext"; +my $server_svcfile = $server->LocalFile ($svcconf); +if ($server->PutFile ($svcconf) == -1) { + print STDERR "ERROR: cannot set file <$server_svcfile>\n"; + exit 1; +} + + + $SV = $server->CreateProcess ("ping", "-ORBdebuglevel $debug_level -o $server_iorfile"); $CL = $client->CreateProcess ("pong", diff --git a/tests/HandleExhaustion/run_test.pl b/tests/HandleExhaustion/run_test.pl index b63d8cb3c3c..3d2dc31b097 100755 --- a/tests/HandleExhaustion/run_test.pl +++ b/tests/HandleExhaustion/run_test.pl @@ -62,6 +62,11 @@ if ($server_status != 0) { $status = 1; } +if ($server->GetFile ($logbase) == -1) { + print STDERR "ERROR: cannot retrieve file <$server_logfile>\n"; + exit 1; +} + if ($status == 0) { if (open(FH, $server_logfile)) { my $error_achieved = 0; diff --git a/tests/Hang_Shutdown/run_test.pl b/tests/Hang_Shutdown/run_test.pl index 30053fac738..fc72acb06b6 100755 --- a/tests/Hang_Shutdown/run_test.pl +++ b/tests/Hang_Shutdown/run_test.pl @@ -50,8 +50,16 @@ $client->DeleteFile($iorbase); ################################ print STDERR "===== Client with RW handler\n"; +my $svcconf = "client.conf"; +my $client_svcfile = $client->LocalFile ($svcconf); + +if ($client->PutFile ($svcconf) == -1) { + print STDERR "ERROR: cannot set file <$client_svcfile>\n"; + exit 1; +} + $SV2 = $server->CreateProcess ("server"); -$CL2 = $client->CreateProcess ("client", " -ORBSvcConf client.conf"); +$CL2 = $client->CreateProcess ("client", " -ORBSvcConf $client_svcfile"); $SV2->Spawn (); diff --git a/tests/IDL_Test/typedef.idl b/tests/IDL_Test/typedef.idl index 5385c5ef936..ee2493ce3e8 100644 --- a/tests/IDL_Test/typedef.idl +++ b/tests/IDL_Test/typedef.idl @@ -44,7 +44,7 @@ typedef TAO_V5 TAO_Z5[5]; // typedef has a unique #ifndef guard. module TestModule { - typedef string<32> typedef_1; + typedef string<32> typedef_1; typedef string<32> typedef_2; interface TestInterface @@ -120,3 +120,5 @@ module CommaList + + diff --git a/tests/Leader_Followers/run_test.pl b/tests/Leader_Followers/run_test.pl index 8935ffa36c4..ba7cf1d9d8e 100755 --- a/tests/Leader_Followers/run_test.pl +++ b/tests/Leader_Followers/run_test.pl @@ -24,11 +24,15 @@ my $iorbase = "lf.ior"; my $tp_conf_base = "tp$PerlACE::svcconf_ext"; my $select_mt_conf_base = "select_mt$PerlACE::svcconf_ext"; +# init server configuration files my $server_tp_conf_file = $server->LocalFile ($tp_conf_base); my $server_select_mt_conf_file = $server->LocalFile ($select_mt_conf_base); + +# init client configuration files my $client_tp_conf_file = $client->LocalFile ($tp_conf_base); my $client_select_mt_conf_file = $client->LocalFile ($select_mt_conf_base); +# init ior files my $server_iorfile = $server->LocalFile ($iorbase); my $client_iorfile = $client->LocalFile ($iorbase); $server->DeleteFile($iorbase); @@ -177,6 +181,29 @@ for ($i = 0; $i <= $#ARGV; $i++) { } } +# Copy configuration files to the targets +if ($server->PutFile ($tp_conf_base) == -1) { + print STDERR "ERROR: cannot set file <$server_tp_conf_file>\n"; + $SV->Kill (); $SV->TimedWait (1); + return 1; +} +if ($server->PutFile ($select_mt_conf_base) == -1) { + print STDERR "ERROR: cannot set file <$server_select_mt_conf_file>\n"; + $SV->Kill (); $SV->TimedWait (1); + return 1; +} + +if ($client->PutFile ($tp_conf_base) == -1) { + print STDERR "ERROR: cannot set file <$client_tp_conf_file>\n"; + $SV->Kill (); $SV->TimedWait (1); + return 1; +} +if ($client->PutFile ($select_mt_conf_base) == -1) { + print STDERR "ERROR: cannot set file <$client_select_mt_conf_file>\n"; + $SV->Kill (); $SV->TimedWait (1); + return 1; +} + if ($single == 1) { print STDERR "\n\n*** Single threaded server ***\n\n\n"; $run_status = run_server("-ORBsvcconf $server_select_mt_conf_file"); diff --git a/tests/LongUpcalls/run_test.pl b/tests/LongUpcalls/run_test.pl index 16f79a0d149..8f2d8989e02 100755 --- a/tests/LongUpcalls/run_test.pl +++ b/tests/LongUpcalls/run_test.pl @@ -21,14 +21,25 @@ my $server = PerlACE::TestTarget::create_target (1) || die "Create target 1 fail my $client = PerlACE::TestTarget::create_target (2) || die "Create target 2 failed\n"; my $iorbase = "server.ior"; -my $svcconf = "svc$PerlACE::svcconf_ext"; my $server_iorfile = $server->LocalFile ($iorbase); -my $server_svcfile = $server->LocalFile ($svcconf); my $client_iorfile = $client->LocalFile ($iorbase); -my $client_svcfile = $client->LocalFile ($svcconf); $server->DeleteFile($iorbase); $client->DeleteFile($iorbase); +my $svcconf = "svc$PerlACE::svcconf_ext"; +my $server_svcfile = $server->LocalFile ($svcconf); +my $client_svcfile = $client->LocalFile ($svcconf); + +if ($client->PutFile ($svcconf) == -1) { + print STDERR "ERROR: cannot set file <$client_svcfile>\n"; + exit 1; +} +if ($server->PutFile ($svcconf) == -1) { + print STDERR "ERROR: cannot set file <$server_svcfile>\n"; + exit 1; +} + + print STDERR "==== Server upcall waits for operations on other threads\n"; $SV = $server->CreateProcess ("blocking_server", diff --git a/tests/MT_BiDir/run_test.pl b/tests/MT_BiDir/run_test.pl index 1d7ba7e9b5b..4134c5f8e59 100755 --- a/tests/MT_BiDir/run_test.pl +++ b/tests/MT_BiDir/run_test.pl @@ -32,7 +32,14 @@ $client1->DeleteFile($iorbase); $client2->DeleteFile($iorbase); $client3->DeleteFile($iorbase); -my $server_conf = $server->LocalFile ("server$PerlACE::svcconf_ext"); +my $server_conf_base = "server$PerlACE::svcconf_ext"; +my $server_conf = $server->LocalFile ($server_conf_base); + +# Copy the configuration file to the target. +if ($server->PutFile ($server_conf_base) == -1) { + print STDERR "ERROR: cannot set file <$server_conf>\n"; + exit 1; +} $SV = $server->CreateProcess ("server", "-ORBdebuglevel $debug_level -ORBSvcConf $server_conf " . diff --git a/tests/MT_Client/run_test.pl b/tests/MT_Client/run_test.pl index de410bbb050..2d6638925cb 100755 --- a/tests/MT_Client/run_test.pl +++ b/tests/MT_Client/run_test.pl @@ -15,16 +15,14 @@ $conf = $PerlACE::svcconf_ext; $client_process = "client"; -$client_conf = "client.global" . $conf; +$client_conf = "client" . $conf; $server_conf = "server" . $conf; $threads = '4'; $iterations = '1000'; foreach $i (@ARGV) { - if ($i eq '-tss') { - $client_conf = "client.tss" . $PerlACE::svcconf_ext; - } elsif ($i eq '-debug') { + if ($i eq '-debug') { $debug_level = '10'; } elsif ($i eq '-creation') { $client_process = 'orb_creation'; @@ -43,6 +41,10 @@ $client->DeleteFile($iorbase); $server_conf1 = $server->LocalFile ($server_conf); +if ($server->PutFile ($server_conf) == -1) { + print STDERR "ERROR: cannot set file <$server_conf1>\n"; + exit 1; +} $SV = $server->CreateProcess ("server", "-ORBdebuglevel $debug_level " . diff --git a/tests/MT_NoUpcall_Client_Leader/run_test.pl b/tests/MT_NoUpcall_Client_Leader/run_test.pl index d64c2393165..55f187c3c6c 100755 --- a/tests/MT_NoUpcall_Client_Leader/run_test.pl +++ b/tests/MT_NoUpcall_Client_Leader/run_test.pl @@ -11,8 +11,20 @@ use PerlACE::TestTarget; my $server = PerlACE::TestTarget::create_target (1) || die "Create target 1 failed\n"; my $client = PerlACE::TestTarget::create_target (2) || die "Create target 2 failed\n"; -my $client_conf = $server->LocalFile ("mt_noupcall$PerlACE::svcconf_ext"); -my $server_conf = $server->LocalFile ("mt_noupcall$PerlACE::svcconf_ext"); +my $client_conf_base = "mt_noupcall$PerlACE::svcconf_ext"; +my $client_conf = $server->LocalFile ($client_conf_base); +if ($client->PutFile ($client_conf_base) == -1) { + print STDERR "ERROR: cannot set file <$client_conf>\n"; + exit 1; +} + + +my $server_conf_base = "mt_noupcall$PerlACE::svcconf_ext"; +my $server_conf = $server->LocalFile ($server_conf_base); +if ($client->PutFile ($server_conf_base) == -1) { + print STDERR "ERROR: cannot set file <$server_conf>\n"; + exit 1; +} $debug_level = '0'; diff --git a/tests/MT_Server/run_test.pl b/tests/MT_Server/run_test.pl index 3ff7697d0a8..0f00de54ae5 100755 --- a/tests/MT_Server/run_test.pl +++ b/tests/MT_Server/run_test.pl @@ -24,9 +24,7 @@ my $client2 = PerlACE::TestTarget::create_target (3) || die "Create target 3 fai my $client3 = PerlACE::TestTarget::create_target (4) || die "Create target 4 failed\n"; my $iorbase = "server.ior"; -my $svcconf = "server$PerlACE::svcconf_ext"; my $server_iorfile = $server->LocalFile ($iorbase); -my $server_svcfile = $server->LocalFile ($svcconf); my $client1_iorfile = $client1->LocalFile ($iorbase); my $client2_iorfile = $client2->LocalFile ($iorbase); my $client3_iorfile = $client3->LocalFile ($iorbase); @@ -35,6 +33,15 @@ $client1->DeleteFile($iorbase); $client2->DeleteFile($iorbase); $client3->DeleteFile($iorbase); +my $svcconf = "server$PerlACE::svcconf_ext"; +my $server_svcfile = $server->LocalFile ($svcconf); + +# Copy the configuration file to the target. +if ($server->PutFile ($svcconf) == -1) { + print STDERR "ERROR: cannot set file <$server_svcfile>\n"; + exit 1; +} + $SV = $server->CreateProcess ("server", "-ORBdebuglevel $debug_level ". "-ORBSvcConf $server_svcfile ". diff --git a/tests/No_Server_MT_Connect_Test/run_test.pl b/tests/No_Server_MT_Connect_Test/run_test.pl index afc5b2a0938..f850acc2865 100755 --- a/tests/No_Server_MT_Connect_Test/run_test.pl +++ b/tests/No_Server_MT_Connect_Test/run_test.pl @@ -32,12 +32,29 @@ $client1->DeleteFile($iorbase); $client2->DeleteFile($iorbase); $client3->DeleteFile($iorbase); +# Initialize and copy the client configuration files +my $client2_conf_base = "reactor$PerlACE::svcconf_ext"; +my $client2_conf = $client2->LocalFile ($client2_conf_base); + +if ($client2->PutFile ($client2_conf_base) == -1) { + print STDERR "ERROR: cannot set file <$client2_conf>\n"; + exit 1; +} + +my $client3_conf_base = "blocked$PerlACE::svcconf_ext"; +my $client3_conf = $client3->LocalFile ($client3_conf_base); + +if ($client3->PutFile ($client3_conf_base) == -1) { + print STDERR "ERROR: cannot set file <$client3_conf>\n"; + exit 1; +} + $SV = $server->CreateProcess ("server", "-ORBdebuglevel $debug_level -o $server_iorfile"); $CL1 = $client1->CreateProcess ("client", "-k file://$client1_iorfile -x"); # Use a single thread in this test, because the strategy is only for # single threaded cases -$CL2 = $client2->CreateProcess ("client", "-ORBSvcConf reactor$PerlACE::svcconf_ext -n 1 -k file://$client2_iorfile"); -$CL3 = $client3->CreateProcess ("client", "-ORBSvcConf blocked$PerlACE::svcconf_ext -k file://$client3_iorfile"); +$CL2 = $client2->CreateProcess ("client", "-ORBSvcConf $client2_conf -n 1 -k file://$client2_iorfile"); +$CL3 = $client3->CreateProcess ("client", "-ORBSvcConf $client3_conf -k file://$client3_iorfile"); $server_status = $SV->Spawn (); diff --git a/tests/OBV/ValueBox/client.cpp b/tests/OBV/ValueBox/client.cpp index a88b462bdfa..d4367b0dff2 100644 --- a/tests/OBV/ValueBox/client.cpp +++ b/tests/OBV/ValueBox/client.cpp @@ -265,6 +265,14 @@ int test_basic_invocations (Test * test_object) { int fail = 0; + VBlong *p1 = 0; + VBlong *p2 = 0; + VBlong *p3; + + vb_basic::M_VBlong *mp1 = 0; + vb_basic::M_VBlong *mp2 = 0; + vb_basic::M_VBlong *mp3; + try { @@ -272,15 +280,12 @@ int test_basic_invocations (Test * test_object) // Test method invocation with boxed value //============================================================ - VBlong *p1 = 0; ACE_NEW_RETURN (p1, VBlong(25), 1); - VBlong *p2 = 0; ACE_NEW_RETURN (p2, VBlong(53), 1); - VBlong *p3; OBV_VERITY (p1->_value () == 25); OBV_VERITY (p2->_value () == 53); @@ -296,18 +301,14 @@ int test_basic_invocations (Test * test_object) // Test method invocation with boxed value from nested module //============================================================ - vb_basic::M_VBlong *mp1 = 0; ACE_NEW_RETURN (mp1, vb_basic::M_VBlong(25), 1); - vb_basic::M_VBlong *mp2 = 0; ACE_NEW_RETURN (mp2, vb_basic::M_VBlong(53), 1); - vb_basic::M_VBlong *mp3; - OBV_VERITY (mp1->_value () == 25); OBV_VERITY (mp2->_value () == 53); @@ -332,14 +333,6 @@ int test_basic_invocations (Test * test_object) OBV_VERITY (p2->_value () == (93*3)); OBV_VERITY (p3->_value () == (93*5)); OBV_VERITY (lresult == (p1->_value()*3)); - - p1->_remove_ref (); - p2->_remove_ref (); - p3->_remove_ref (); - - mp1->_remove_ref (); - mp2->_remove_ref (); - mp3->_remove_ref (); } catch (const CORBA::Exception& ex) { @@ -352,6 +345,13 @@ int test_basic_invocations (Test * test_object) "(%P|%t) test_basic_invocations: caught a C++ exception\n")); fail = 1; } + if (p1) p1->_remove_ref (); + if (p2) p2->_remove_ref (); + if (p3) p3->_remove_ref (); + + if (mp1) mp1->_remove_ref (); + if (mp2) mp2->_remove_ref (); + if (mp3) mp3->_remove_ref (); return fail; } @@ -461,6 +461,10 @@ int test_boxed_string_invocations (Test * test_object) { int fail = 0; + VBstring *p1 = 0; + VBstring *p2 = 0; + VBstring *p3 = 0; + try { @@ -468,15 +472,12 @@ int test_boxed_string_invocations (Test * test_object) // Test method invocation with boxed value //============================================================ - VBstring *p1 = 0; ACE_NEW_RETURN (p1, VBstring(CORBA::string_dup ("string1")), 1); - VBstring *p2 = 0; ACE_NEW_RETURN (p2, VBstring(CORBA::string_dup ("string2")), 1); - VBstring *p3 = 0; OBV_VERITY (ACE_OS::strcmp(p1->_value (), "string1") == 0); OBV_VERITY (ACE_OS::strcmp(p2->_value (), "string2") == 0); @@ -500,11 +501,6 @@ int test_boxed_string_invocations (Test * test_object) OBV_VERITY (ACE_OS::strcmp(p2->_value (), "2second string") == 0); OBV_VERITY (ACE_OS::strcmp(p3->_value (), "2second string") == 0); OBV_VERITY (ACE_OS::strcmp(sresult.in (), "1string") == 0); - - p1->_remove_ref (); - p2->_remove_ref (); - p3->_remove_ref (); - } catch (const CORBA::Exception& ex) { @@ -518,6 +514,9 @@ int test_boxed_string_invocations (Test * test_object) "caught a C++ exception\n")); fail = 1; } + if (p1) p1->_remove_ref (); + if (p2) p2->_remove_ref (); + if (p3) p3->_remove_ref (); return fail; } @@ -528,78 +527,89 @@ int test_boxed_string_invocations (Test * test_object) int test_boxed_sequence (void) { int fail = 0; - VBseqlong *vbseqlong1 = 0; - ACE_NEW_RETURN (vbseqlong1, - VBseqlong (), - 1); - - VBseqlong *temp = 0; - ACE_NEW_RETURN (temp, - VBseqlong (), - 1); - - VBseqlong_var vbseqlong2 (temp); - OBV_VERITY (vbseqlong1->length() == 0); - OBV_VERITY (vbseqlong2->length() == 0); - CORBA::Long *longarray = 0; - ACE_NEW_RETURN (longarray, - CORBA::Long[3], - 1); - longarray[0] = 101; - longarray[1] = 202; - longarray[2] = 303; - - // Create a sequence - TDseqlong *temp2 = 0; - ACE_NEW_RETURN (temp2, - TDseqlong(10, 3, longarray, 1), - 1); - TDseqlong_var seqlong1 (temp2); - OBV_VERITY (seqlong1[0] == 101 && seqlong1[2] == 303); - - VBseqlong *vbseqlong3 = 0; - ACE_NEW_RETURN (vbseqlong3, - VBseqlong(seqlong1.in()), - 1); - - // Test sequence ctor. - VBseqlong *vbseqlong4 = 0; - ACE_NEW_RETURN (vbseqlong4, - VBseqlong(10, 3, longarray, 0), - 1); - - // Test assignment and subscript operators - vbseqlong2 = vbseqlong3; - OBV_VERITY (vbseqlong2->length() == 3); - VBseqlong &vbseqlong5 = *vbseqlong2.inout(); - OBV_VERITY (vbseqlong5[2] == 303); - vbseqlong5[2] = 444; - OBV_VERITY (vbseqlong5[2] == 444); - OBV_VERITY (seqlong1[0] == 101 && seqlong1[2] == 303); - OBV_VERITY ((*vbseqlong4)[0] == 101 && (*vbseqlong4)[2] == 303); - seqlong1[0] = 111; - OBV_VERITY ((*vbseqlong4)[0] == 111); - OBV_VERITY (vbseqlong4->maximum() == 10); - *vbseqlong4 = vbseqlong1->_value(); - OBV_VERITY (vbseqlong4->length() == 0); - - // Test copy_value - VBseqlong *vbseqlong6 = VBseqlong::_downcast( vbseqlong4->_copy_value() ); - if (vbseqlong6 == 0) + try { - fail++; - ACE_DEBUG ((LM_DEBUG, "(%P|%t) - Failure at line %l\n")); + VBseqlong *vbseqlong1 = 0; + ACE_NEW_RETURN (vbseqlong1, + VBseqlong (), + 1); + + VBseqlong *temp = 0; + ACE_NEW_RETURN (temp, + VBseqlong (), + 1); + + VBseqlong_var vbseqlong2 (temp); + OBV_VERITY (vbseqlong1->length() == 0); + OBV_VERITY (vbseqlong2->length() == 0); + CORBA::Long *longarray = 0; + ACE_NEW_RETURN (longarray, + CORBA::Long[3], + 1); + longarray[0] = 101; + longarray[1] = 202; + longarray[2] = 303; + + // Create a sequence + TDseqlong *temp2 = 0; + ACE_NEW_RETURN (temp2, + TDseqlong(10, 3, longarray, 1), + 1); + TDseqlong_var seqlong1 (temp2); + OBV_VERITY (seqlong1[0] == 101 && seqlong1[2] == 303); + + VBseqlong *vbseqlong3 = 0; + ACE_NEW_RETURN (vbseqlong3, + VBseqlong(seqlong1.in()), + 1); + + // Test sequence ctor. + VBseqlong *vbseqlong4 = 0; + ACE_NEW_RETURN (vbseqlong4, + VBseqlong(10, 3, longarray, 0), + 1); + + // Test assignment and subscript operators + vbseqlong2 = vbseqlong3; + OBV_VERITY (vbseqlong2->length() == 3); + VBseqlong &vbseqlong5 = *vbseqlong2.inout(); + OBV_VERITY (vbseqlong5[2] == 303); + vbseqlong5[2] = 444; + OBV_VERITY (vbseqlong5[2] == 444); + OBV_VERITY (seqlong1[0] == 101 && seqlong1[2] == 303); + OBV_VERITY ((*vbseqlong4)[0] == 101 && (*vbseqlong4)[2] == 303); + seqlong1[0] = 111; + OBV_VERITY ((*vbseqlong4)[0] == 111); + OBV_VERITY (vbseqlong4->maximum() == 10); + *vbseqlong4 = vbseqlong1->_value(); + OBV_VERITY (vbseqlong4->length() == 0); + + // Test copy_value + VBseqlong *vbseqlong6 = VBseqlong::_downcast( vbseqlong4->_copy_value() ); + if (vbseqlong6 == 0) + { + fail++; + ACE_DEBUG ((LM_DEBUG, "(%P|%t) - Failure at line %l\n")); + } + else + { + OBV_VERITY (vbseqlong6->length() == 0); + vbseqlong6->_remove_ref (); + } + + // release + vbseqlong1->_remove_ref (); + vbseqlong4->_remove_ref (); } - else + catch (const ::CORBA::Exception &ex) { - OBV_VERITY (vbseqlong6->length() == 0); - vbseqlong6->_remove_ref (); + ex._tao_print_exception ("test_boxed_sequence"); + fail = 1; + } + catch (...) + { + ACE_ERROR ((LM_ERROR, "test_boxed_sequence : unexpected exception caught\n")); } - - // release - vbseqlong1->_remove_ref (); - vbseqlong4->_remove_ref (); - return fail; } @@ -607,73 +617,69 @@ int test_boxed_sequence (void) int test_boxed_sequence_invocations (Test * test_object) { - int fail = 0; - - try - { - - //============================================================ - // Test method invocation with boxed value - //============================================================ - - VBseqlong *p1 = 0; - ACE_NEW_RETURN (p1, - VBseqlong(4), - 1); - VBseqlong *p2 = 0; - ACE_NEW_RETURN (p2, - VBseqlong(3), - 1); - VBseqlong *p3; - p1->length(4); - p2->length(3); - - (*p1)[0] = 10; - (*p1)[1] = 9; - (*p1)[2] = 8; - (*p1)[3] = 7; - - (*p2)[0] = 100; - (*p2)[1] = 99; - (*p2)[2] = 98; - - OBV_VERITY ((*p1)[0] == 10); - OBV_VERITY ((*p1)[1] == 9); - OBV_VERITY ((*p1)[2] == 8); - OBV_VERITY ((*p1)[3] == 7); - - VBseqlong_var result = test_object->seq_op1(p1, p2, p3); - - OBV_VERITY ((*p2)[0] == 100*3); - OBV_VERITY ((*p2)[1] == 99*3); - OBV_VERITY ((*p2)[2] == 98*3); - OBV_VERITY ((*p3)[0] == 100*5); - OBV_VERITY ((*p3)[1] == 99*5); - OBV_VERITY ((*p3)[2] == 98*5); - OBV_VERITY ((*result.in ())[0] == 10); - OBV_VERITY ((*result.in ())[1] == 9); - OBV_VERITY ((*result.in ())[2] == 8); - OBV_VERITY ((*result.in ())[3] == 7); - - //============================================================ - // Test _boxed_in(), _boxed_inout(), and _boxed_out()) - //============================================================ - - test_object->seq_op2(p1->_boxed_in(), p2->_boxed_inout(), - p3->_boxed_out()); + int fail = 0; + VBseqlong *p1 = 0; + VBseqlong *p2 = 0; + VBseqlong *p3; - OBV_VERITY ((*p2)[0] == 100*3*3); - OBV_VERITY ((*p2)[1] == 99*3*3); - OBV_VERITY ((*p2)[2] == 98*3*3); - OBV_VERITY ((*p3)[0] == (*p1)[0]*5); - OBV_VERITY ((*p3)[1] == (*p1)[1]*5); - OBV_VERITY ((*p3)[2] == (*p1)[2]*5); - OBV_VERITY ((*p3)[3] == (*p1)[3]*5); + try + { - p1->_remove_ref (); - p2->_remove_ref (); - p3->_remove_ref (); - } + //============================================================ + // Test method invocation with boxed value + //============================================================ + + ACE_NEW_RETURN (p1, + VBseqlong(4), + 1); + ACE_NEW_RETURN (p2, + VBseqlong(3), + 1); + p1->length(4); + p2->length(3); + + (*p1)[0] = 10; + (*p1)[1] = 9; + (*p1)[2] = 8; + (*p1)[3] = 7; + + (*p2)[0] = 100; + (*p2)[1] = 99; + (*p2)[2] = 98; + + OBV_VERITY ((*p1)[0] == 10); + OBV_VERITY ((*p1)[1] == 9); + OBV_VERITY ((*p1)[2] == 8); + OBV_VERITY ((*p1)[3] == 7); + + VBseqlong_var result = test_object->seq_op1(p1, p2, p3); + + OBV_VERITY ((*p2)[0] == 100*3); + OBV_VERITY ((*p2)[1] == 99*3); + OBV_VERITY ((*p2)[2] == 98*3); + OBV_VERITY ((*p3)[0] == 100*5); + OBV_VERITY ((*p3)[1] == 99*5); + OBV_VERITY ((*p3)[2] == 98*5); + OBV_VERITY ((*result.in ())[0] == 10); + OBV_VERITY ((*result.in ())[1] == 9); + OBV_VERITY ((*result.in ())[2] == 8); + OBV_VERITY ((*result.in ())[3] == 7); + + //============================================================ + // Test _boxed_in(), _boxed_inout(), and _boxed_out()) + //============================================================ + + test_object->seq_op2(p1->_boxed_in(), p2->_boxed_inout(), + p3->_boxed_out()); + + OBV_VERITY ((*p2)[0] == 100*3*3); + OBV_VERITY ((*p2)[1] == 99*3*3); + OBV_VERITY ((*p2)[2] == 98*3*3); + OBV_VERITY ((*p3)[0] == (*p1)[0]*5); + OBV_VERITY ((*p3)[1] == (*p1)[1]*5); + OBV_VERITY ((*p3)[2] == (*p1)[2]*5); + OBV_VERITY ((*p3)[3] == (*p1)[3]*5); + } catch (const CORBA::Exception& ex) { ex._tao_print_exception ("test_boxed_sequence_invocations"); @@ -687,6 +693,10 @@ int test_boxed_sequence_invocations (Test * test_object) fail = 1; } + if (p1) p1->_remove_ref (); + if (p2) p2->_remove_ref (); + if (p3) p3->_remove_ref (); + return fail; } @@ -697,237 +707,237 @@ int test_boxed_sequence_invocations (Test * test_object) // int test_boxed_struct (void) { - int fail = 0; + int fail = 0; - Fixed_Struct1 *fixed_struct_a = 0; - ACE_NEW_RETURN (fixed_struct_a, - Fixed_Struct1, - 1); - fixed_struct_a->l = 3233; - fixed_struct_a->abstruct.s1 = 73; - fixed_struct_a->abstruct.s2 = 37; - - // Test the VBfixed_struct1 constructor - VBfixed_struct1 *valuebox1 = 0; - ACE_NEW_RETURN (valuebox1, - VBfixed_struct1 (*fixed_struct_a), - 1); + Fixed_Struct1 *fixed_struct_a = 0; + ACE_NEW_RETURN (fixed_struct_a, + Fixed_Struct1, + 1); + fixed_struct_a->l = 3233; + fixed_struct_a->abstruct.s1 = 73; + fixed_struct_a->abstruct.s2 = 37; + + // Test the VBfixed_struct1 constructor + VBfixed_struct1 *valuebox1 = 0; + ACE_NEW_RETURN (valuebox1, + VBfixed_struct1 (*fixed_struct_a), + 1); - // Test boxed copy ctor. - VBfixed_struct1* valuebox2_ptr = 0; - ACE_NEW_RETURN (valuebox2_ptr, - VBfixed_struct1 (*valuebox1), - 1); - VBfixed_struct1_var valuebox2 = valuebox2_ptr; + // Test boxed copy ctor. + VBfixed_struct1* valuebox2_ptr = 0; + ACE_NEW_RETURN (valuebox2_ptr, + VBfixed_struct1 (*valuebox1), + 1); + VBfixed_struct1_var valuebox2 = valuebox2_ptr; - OBV_VERITY (valuebox1->l () == valuebox2->l ()); - OBV_VERITY ((valuebox1->abstruct ()).s1 == (valuebox2->abstruct ()).s1 ); - OBV_VERITY ((valuebox1->abstruct ()).s2 == (valuebox2->abstruct ()).s2 ); + OBV_VERITY (valuebox1->l () == valuebox2->l ()); + OBV_VERITY ((valuebox1->abstruct ()).s1 == (valuebox2->abstruct ()).s1 ); + OBV_VERITY ((valuebox1->abstruct ()).s2 == (valuebox2->abstruct ()).s2 ); - // Change an element - valuebox1->l (505); - OBV_VERITY (valuebox1->l () != valuebox2->l ()); + // Change an element + valuebox1->l (505); + OBV_VERITY (valuebox1->l () != valuebox2->l ()); - // Change some more, to test other types. - (valuebox2->abstruct ()).s1 = 667; - OBV_VERITY ((valuebox1->abstruct ()).s1 != (valuebox2->abstruct ()).s1 ); - (valuebox2->abstruct ()).s2 = 1667; - OBV_VERITY ((valuebox1->abstruct ()).s2 != (valuebox2->abstruct ()).s2 ); + // Change some more, to test other types. + (valuebox2->abstruct ()).s1 = 667; + OBV_VERITY ((valuebox1->abstruct ()).s1 != (valuebox2->abstruct ()).s1 ); + (valuebox2->abstruct ()).s2 = 1667; + OBV_VERITY ((valuebox1->abstruct ()).s2 != (valuebox2->abstruct ()).s2 ); - Fixed_Struct1 *fixed_struct_b = 0; - ACE_NEW_RETURN (fixed_struct_b, - Fixed_Struct1, - 1); - fixed_struct_b->l = 7372; - fixed_struct_b->abstruct.s1 = 11; - fixed_struct_b->abstruct.s2 = 51; - - // Make another VBfixed_struct1 - VBfixed_struct1 *valuebox3 = 0; - ACE_NEW_RETURN (valuebox3, - VBfixed_struct1 (), - 1); + Fixed_Struct1 *fixed_struct_b = 0; + ACE_NEW_RETURN (fixed_struct_b, + Fixed_Struct1, + 1); + fixed_struct_b->l = 7372; + fixed_struct_b->abstruct.s1 = 11; + fixed_struct_b->abstruct.s2 = 51; + + // Make another VBfixed_struct1 + VBfixed_struct1 *valuebox3 = 0; + ACE_NEW_RETURN (valuebox3, + VBfixed_struct1 (), + 1); - // Test assignment operator - *valuebox3 = *fixed_struct_b; + // Test assignment operator + *valuebox3 = *fixed_struct_b; - OBV_VERITY (valuebox3->l () == fixed_struct_b->l); - OBV_VERITY ((valuebox3->abstruct ()).s1 == fixed_struct_b->abstruct.s1); - OBV_VERITY ((valuebox3->abstruct ()).s2 == fixed_struct_b->abstruct.s2); + OBV_VERITY (valuebox3->l () == fixed_struct_b->l); + OBV_VERITY ((valuebox3->abstruct ()).s1 == fixed_struct_b->abstruct.s1); + OBV_VERITY ((valuebox3->abstruct ()).s2 == fixed_struct_b->abstruct.s2); - // Test _value modifier method - valuebox2->_value (*fixed_struct_b); - OBV_VERITY (valuebox2->l () == fixed_struct_b->l); - OBV_VERITY ((valuebox2->abstruct ()).s1 == fixed_struct_b->abstruct.s1); - OBV_VERITY ((valuebox2->abstruct ()).s2 == fixed_struct_b->abstruct.s2); + // Test _value modifier method + valuebox2->_value (*fixed_struct_b); + OBV_VERITY (valuebox2->l () == fixed_struct_b->l); + OBV_VERITY ((valuebox2->abstruct ()).s1 == fixed_struct_b->abstruct.s1); + OBV_VERITY ((valuebox2->abstruct ()).s2 == fixed_struct_b->abstruct.s2); - // Test _copy_value and _downcast - VBfixed_struct1_var valuebox4 = - VBfixed_struct1::_downcast (valuebox3->_copy_value ()); - if (valuebox4.in () == 0) - { - fail++; - ACE_DEBUG ((LM_DEBUG, "(%P|%t) - Failure at line %l\n")); - } - else - { - OBV_VERITY (valuebox4->l () == fixed_struct_b->l); - OBV_VERITY ((valuebox4->abstruct ()).s1 == fixed_struct_b->abstruct.s1); - OBV_VERITY ((valuebox4->abstruct ()).s2 == fixed_struct_b->abstruct.s2); - } + // Test _copy_value and _downcast + VBfixed_struct1_var valuebox4 = + VBfixed_struct1::_downcast (valuebox3->_copy_value ()); + if (valuebox4.in () == 0) + { + fail++; + ACE_DEBUG ((LM_DEBUG, "(%P|%t) - Failure at line %l\n")); + } + else + { + OBV_VERITY (valuebox4->l () == fixed_struct_b->l); + OBV_VERITY ((valuebox4->abstruct ()).s1 == fixed_struct_b->abstruct.s1); + OBV_VERITY ((valuebox4->abstruct ()).s2 == fixed_struct_b->abstruct.s2); + } - // - // valuebox1 and valuebox3 must be explicitly removed. - CORBA::remove_ref (valuebox1); - CORBA::remove_ref (valuebox3); + // + // valuebox1 and valuebox3 must be explicitly removed. + CORBA::remove_ref (valuebox1); + CORBA::remove_ref (valuebox3); - // - // as well as the structs we new'ed. - delete fixed_struct_a; - delete fixed_struct_b; + // + // as well as the structs we new'ed. + delete fixed_struct_a; + delete fixed_struct_b; - // - // Other types are _var so their dtors will clean up remaining - // allocations. + // + // Other types are _var so their dtors will clean up remaining + // allocations. - return fail; + return fail; } int test_boxed_struct_invocations (Test * test_object) { - int fail = 0; + int fail = 0; - try - { + try + { - //============================================================ - // Fixed struct - // Test method invocation with boxed value - //============================================================ - Fixed_Struct1 fs1; - fs1.l = 29; - fs1.abstruct.s1 = 117; - fs1.abstruct.s2 = 21; + //============================================================ + // Fixed struct + // Test method invocation with boxed value + //============================================================ + Fixed_Struct1 fs1; + fs1.l = 29; + fs1.abstruct.s1 = 117; + fs1.abstruct.s2 = 21; - VBfixed_struct1 *p1 = 0; - ACE_NEW_RETURN (p1, - VBfixed_struct1(fs1), - 1); + VBfixed_struct1 *p1 = 0; + ACE_NEW_RETURN (p1, + VBfixed_struct1(fs1), + 1); - Fixed_Struct1 fs2; - fs2.l = 92; - fs2.abstruct.s1 = 171; - fs2.abstruct.s2 = 12; + Fixed_Struct1 fs2; + fs2.l = 92; + fs2.abstruct.s1 = 171; + fs2.abstruct.s2 = 12; - VBfixed_struct1 *p2 = 0; - ACE_NEW_RETURN (p2, - VBfixed_struct1(fs2), - 1); + VBfixed_struct1 *p2 = 0; + ACE_NEW_RETURN (p2, + VBfixed_struct1(fs2), + 1); - VBfixed_struct1 *p3; + VBfixed_struct1 *p3; - OBV_VERITY (p1->l() == 29); - OBV_VERITY ((p1->abstruct()).s1 == 117); - OBV_VERITY ((p1->abstruct()).s2 == 21); + OBV_VERITY (p1->l() == 29); + OBV_VERITY ((p1->abstruct()).s1 == 117); + OBV_VERITY ((p1->abstruct()).s2 == 21); - VBfixed_struct1_var result = test_object->struct_op1(p1, p2, p3); + VBfixed_struct1_var result = test_object->struct_op1(p1, p2, p3); - OBV_VERITY (p2->l() == 92*3); - OBV_VERITY ((p2->abstruct()).s1 == 171*3); - OBV_VERITY ((p2->abstruct()).s2 == 12*3); + OBV_VERITY (p2->l() == 92*3); + OBV_VERITY ((p2->abstruct()).s1 == 171*3); + OBV_VERITY ((p2->abstruct()).s2 == 12*3); - OBV_VERITY (p3->l() == 92*5); - OBV_VERITY ((p3->abstruct()).s1 == 171*5); - OBV_VERITY ((p3->abstruct()).s2 == 12*5); + OBV_VERITY (p3->l() == 92*5); + OBV_VERITY ((p3->abstruct()).s1 == 171*5); + OBV_VERITY ((p3->abstruct()).s2 == 12*5); - OBV_VERITY (result->l() == fs1.l); - OBV_VERITY ((result->abstruct()).s1 == fs1.abstruct.s1); - OBV_VERITY ((result->abstruct()).s2 == fs1.abstruct.s2); + OBV_VERITY (result->l() == fs1.l); + OBV_VERITY ((result->abstruct()).s1 == fs1.abstruct.s1); + OBV_VERITY ((result->abstruct()).s2 == fs1.abstruct.s2); - //============================================================ - // Fixed struct - // Test _boxed_in(), _boxed_inout(), and _boxed_out()) - //============================================================ + //============================================================ + // Fixed struct + // Test _boxed_in(), _boxed_inout(), and _boxed_out()) + //============================================================ - test_object->struct_op2(p1->_boxed_in(), p2->_boxed_inout(), - p3->_boxed_out()); + test_object->struct_op2(p1->_boxed_in(), p2->_boxed_inout(), + p3->_boxed_out()); - OBV_VERITY (p2->l() == 92*3*3); - OBV_VERITY ((p2->abstruct()).s1 == 171*3*3); - OBV_VERITY ((p2->abstruct()).s2 == 12*3*3); + OBV_VERITY (p2->l() == 92*3*3); + OBV_VERITY ((p2->abstruct()).s1 == 171*3*3); + OBV_VERITY ((p2->abstruct()).s2 == 12*3*3); - OBV_VERITY (p3->l() == fs1.l); - OBV_VERITY ((p3->abstruct()).s1 == fs1.abstruct.s1); - OBV_VERITY ((p3->abstruct()).s2 == fs1.abstruct.s2); + OBV_VERITY (p3->l() == fs1.l); + OBV_VERITY ((p3->abstruct()).s1 == fs1.abstruct.s1); + OBV_VERITY ((p3->abstruct()).s2 == fs1.abstruct.s2); - p1->_remove_ref (); - p2->_remove_ref (); - p3->_remove_ref (); + p1->_remove_ref (); + p2->_remove_ref (); + p3->_remove_ref (); - //============================================================ - // Variable struct - // Test method invocation with boxed value - //============================================================ + //============================================================ + // Variable struct + // Test method invocation with boxed value + //============================================================ - Variable_Struct1 vs1; - vs1.l = 29; - vs1.str = CORBA::string_dup ("variable1"); + Variable_Struct1 vs1; + vs1.l = 29; + vs1.str = CORBA::string_dup ("variable1"); - VBvariable_struct1 *p4 = 0; - ACE_NEW_RETURN (p4, - VBvariable_struct1 (vs1), - 1); + VBvariable_struct1 *p4 = 0; + ACE_NEW_RETURN (p4, + VBvariable_struct1 (vs1), + 1); - Variable_Struct1 vs2; - vs2.l = 37; - vs2.str = "variable2"; + Variable_Struct1 vs2; + vs2.l = 37; + vs2.str = "variable2"; - VBvariable_struct1 *p5 = 0; - ACE_NEW_RETURN (p5, - VBvariable_struct1 (vs2), - 1); + VBvariable_struct1 *p5 = 0; + ACE_NEW_RETURN (p5, + VBvariable_struct1 (vs2), + 1); - VBvariable_struct1 *p6; + VBvariable_struct1 *p6; - OBV_VERITY (p4->l() == 29); - OBV_VERITY (ACE_OS::strcmp(p4->str(), "variable1") == 0); + OBV_VERITY (p4->l() == 29); + OBV_VERITY (ACE_OS::strcmp(p4->str(), "variable1") == 0); - VBvariable_struct1_var result2 = test_object->struct_op3(p4, p5, p6); + VBvariable_struct1_var result2 = test_object->struct_op3(p4, p5, p6); - OBV_VERITY (p5->l() == vs2.l*3); - OBV_VERITY (ACE_OS::strcmp(p5->str(), "2variable") == 0); + OBV_VERITY (p5->l() == vs2.l*3); + OBV_VERITY (ACE_OS::strcmp(p5->str(), "2variable") == 0); - OBV_VERITY (p6->l() == vs2.l*3); - OBV_VERITY (ACE_OS::strcmp(p6->str(), "2variable") == 0); + OBV_VERITY (p6->l() == vs2.l*3); + OBV_VERITY (ACE_OS::strcmp(p6->str(), "2variable") == 0); - OBV_VERITY (result2->l() == vs1.l); - OBV_VERITY (ACE_OS::strcmp(result2->str(), vs1.str) == 0); + OBV_VERITY (result2->l() == vs1.l); + OBV_VERITY (ACE_OS::strcmp(result2->str(), vs1.str) == 0); - //============================================================ - // Variable struct - // Test _boxed_in(), _boxed_inout(), and _boxed_out()) - //============================================================ + //============================================================ + // Variable struct + // Test _boxed_in(), _boxed_inout(), and _boxed_out()) + //============================================================ - test_object->struct_op4(p4->_boxed_in(), p5->_boxed_inout(), - p6->_boxed_out()); + test_object->struct_op4(p4->_boxed_in(), p5->_boxed_inout(), + p6->_boxed_out()); - OBV_VERITY (p5->l() == vs2.l*3*3); - OBV_VERITY (ACE_OS::strcmp(p5->str(), "e2variabl") == 0); + OBV_VERITY (p5->l() == vs2.l*3*3); + OBV_VERITY (ACE_OS::strcmp(p5->str(), "e2variabl") == 0); - OBV_VERITY (p6->l() == vs1.l); - OBV_VERITY (ACE_OS::strcmp(p6->str(), vs1.str) == 0); + OBV_VERITY (p6->l() == vs1.l); + OBV_VERITY (ACE_OS::strcmp(p6->str(), vs1.str) == 0); - p4->_remove_ref (); - p5->_remove_ref (); - p6->_remove_ref (); - } + p4->_remove_ref (); + p5->_remove_ref (); + p6->_remove_ref (); + } catch (const CORBA::Exception& ex) { ex._tao_print_exception ("test_boxed_struct_invocations"); @@ -949,192 +959,192 @@ int test_boxed_struct_invocations (Test * test_object) // int test_boxed_array() { - int fail = 0; - LongArray la; - la[0] = 101; - la[1] = 202; - la[2] = 303; - - // three ctors - VBlongarray *valuebox1 = 0; - ACE_NEW_RETURN (valuebox1, - VBlongarray, - 1); - VBlongarray *valuebox2 = 0; - ACE_NEW_RETURN (valuebox2, - VBlongarray(la), - 1); - VBlongarray *valuebox3 = 0; - ACE_NEW_RETURN (valuebox3, - VBlongarray(*valuebox2), - 1); + int fail = 0; + LongArray la; + la[0] = 101; + la[1] = 202; + la[2] = 303; + + // three ctors + VBlongarray *valuebox1 = 0; + ACE_NEW_RETURN (valuebox1, + VBlongarray, + 1); + VBlongarray *valuebox2 = 0; + ACE_NEW_RETURN (valuebox2, + VBlongarray(la), + 1); + VBlongarray *valuebox3 = 0; + ACE_NEW_RETURN (valuebox3, + VBlongarray(*valuebox2), + 1); - OBV_VERITY ((*valuebox2)[0] == 101 - && valuebox2->_value()[1] == 202 - && valuebox2->_value()[2] == 303); + OBV_VERITY ((*valuebox2)[0] == 101 + && valuebox2->_value()[1] == 202 + && valuebox2->_value()[2] == 303); - OBV_VERITY ((*valuebox3)[0] == 101 - && (*valuebox3)[1] == 202 - && (*valuebox3)[2] == 303); + OBV_VERITY ((*valuebox3)[0] == 101 + && (*valuebox3)[1] == 202 + && (*valuebox3)[2] == 303); - (*valuebox3)[0] = 111; - valuebox3->_value()[1] = 222; + (*valuebox3)[0] = 111; + valuebox3->_value()[1] = 222; - OBV_VERITY ((*valuebox2)[0] == 101 - && (*valuebox2)[1] == 202 - && (*valuebox2)[2] == 303); + OBV_VERITY ((*valuebox2)[0] == 101 + && (*valuebox2)[1] == 202 + && (*valuebox2)[2] == 303); - OBV_VERITY ((*valuebox3)[0] == 111 - && (*valuebox3)[1] == 222 - && (*valuebox3)[2] == 303); + OBV_VERITY ((*valuebox3)[0] == 111 + && (*valuebox3)[1] == 222 + && (*valuebox3)[2] == 303); - *valuebox1 = la; + *valuebox1 = la; - OBV_VERITY ((*valuebox1)[0] == 101 - && valuebox1->_value()[1] == 202 - && valuebox1->_value()[2] == 303); + OBV_VERITY ((*valuebox1)[0] == 101 + && valuebox1->_value()[1] == 202 + && valuebox1->_value()[2] == 303); - valuebox2->_value(la); + valuebox2->_value(la); - OBV_VERITY ((*valuebox2)[0] == 101 - && valuebox2->_value()[1] == 202 - && valuebox2->_value()[2] == 303); + OBV_VERITY ((*valuebox2)[0] == 101 + && valuebox2->_value()[1] == 202 + && valuebox2->_value()[2] == 303); - LongArray_var lv_la(LongArray_dup(la)); - *valuebox2 = lv_la.in(); + LongArray_var lv_la(LongArray_dup(la)); + *valuebox2 = lv_la.in(); - *valuebox2 = valuebox3->_value(); - valuebox3->_value()[1] = 777; - OBV_VERITY ((*valuebox2)[0] == 111 - && valuebox2->_value()[1] == 222 - && valuebox2->_value()[2] == 303); + *valuebox2 = valuebox3->_value(); + valuebox3->_value()[1] = 777; + OBV_VERITY ((*valuebox2)[0] == 111 + && valuebox2->_value()[1] == 222 + && valuebox2->_value()[2] == 303); - // release - valuebox1->_remove_ref (); - valuebox2->_remove_ref (); - valuebox3->_remove_ref (); + // release + valuebox1->_remove_ref (); + valuebox2->_remove_ref (); + valuebox3->_remove_ref (); - return fail; + return fail; } int test_boxed_array_invocations (Test * test_object) { - int fail = 0; + int fail = 0; - try - { - //============================================================ - // Array (fixed) - // Test method invocation with boxed value - //============================================================ + try + { + //============================================================ + // Array (fixed) + // Test method invocation with boxed value + //============================================================ - LongArray la; - la[0] = 101; - la[1] = 202; - la[2] = 303; + LongArray la; + la[0] = 101; + la[1] = 202; + la[2] = 303; - VBlongarray *p1 = 0; - ACE_NEW_RETURN (p1, - VBlongarray (la), - 1); + VBlongarray *p1 = 0; + ACE_NEW_RETURN (p1, + VBlongarray (la), + 1); - LongArray la2; - la2[0] = 3101; - la2[1] = 3202; - la2[2] = 3303; + LongArray la2; + la2[0] = 3101; + la2[1] = 3202; + la2[2] = 3303; - VBlongarray *p2 = 0; - ACE_NEW_RETURN (p2, - VBlongarray (la2), - 1); + VBlongarray *p2 = 0; + ACE_NEW_RETURN (p2, + VBlongarray (la2), + 1); - OBV_VERITY ((*p1)[0] == 101 - && (*p1)[1] == 202 - && (*p1)[2] == 303); + OBV_VERITY ((*p1)[0] == 101 + && (*p1)[1] == 202 + && (*p1)[2] == 303); - VBlongarray *p3; + VBlongarray *p3; - VBlongarray_var result = test_object->array_op1 (p1, p2, p3); + VBlongarray_var result = test_object->array_op1 (p1, p2, p3); - OBV_VERITY ((*p2)[0] == (3101*3) - && (*p2)[1] == (3202*3) - && (*p3)[2] == (3303*3)); + OBV_VERITY ((*p2)[0] == (3101*3) + && (*p2)[1] == (3202*3) + && (*p3)[2] == (3303*3)); - OBV_VERITY ((*p3)[0] == (3101*3) - && (*p3)[1] == (3202*3) - && (*p3)[2] == (3303*3)); + OBV_VERITY ((*p3)[0] == (3101*3) + && (*p3)[1] == (3202*3) + && (*p3)[2] == (3303*3)); - OBV_VERITY ((*result.in ())[0] == 101 - && (*result.in ())[1] == 202 - && (*result.in ())[2] == 303); + OBV_VERITY ((*result.in ())[0] == 101 + && (*result.in ())[1] == 202 + && (*result.in ())[2] == 303); - //============================================================ - // Array (fixed) - // Test _boxed_in(), _boxed_inout(), and _boxed_out()) - //============================================================ + //============================================================ + // Array (fixed) + // Test _boxed_in(), _boxed_inout(), and _boxed_out()) + //============================================================ // Exclude the following test for now until issues with _boxed_out() // for arrays are resolved. #if 0 - test_object->array_op2(p1->_boxed_in(), p2->_boxed_inout(), - p3->_boxed_out()); + test_object->array_op2(p1->_boxed_in(), p2->_boxed_inout(), + p3->_boxed_out()); - OBV_VERITY ((*p2)[0] == (3101*3*3) - && (*p2)[1] == (3202*3*3) - && (*p2)[2] == (3303*3*3)); + OBV_VERITY ((*p2)[0] == (3101*3*3) + && (*p2)[1] == (3202*3*3) + && (*p2)[2] == (3303*3*3)); - OBV_VERITY ((*p3)[0] == (*p1)[0] - && (*p3)[1] == (*p1)[1] - && (*p3)[2] == (*p1)[2]); + OBV_VERITY ((*p3)[0] == (*p1)[0] + && (*p3)[1] == (*p1)[1] + && (*p3)[2] == (*p1)[2]); #endif - p1->_remove_ref (); - p2->_remove_ref (); - p3->_remove_ref (); + p1->_remove_ref (); + p2->_remove_ref (); + p3->_remove_ref (); - //============================================================ - // Array (variable) - // Test method invocation with boxed value - //============================================================ + //============================================================ + // Array (variable) + // Test method invocation with boxed value + //============================================================ - StringArray sa; - sa[0] = CORBA::string_dup ("in string1"); - sa[1] = CORBA::string_dup ("in string2"); + StringArray sa; + sa[0] = CORBA::string_dup ("in string1"); + sa[1] = CORBA::string_dup ("in string2"); - VBstringarray *p4 = 0; - ACE_NEW_RETURN (p4, - VBstringarray (sa), - 1); + VBstringarray *p4 = 0; + ACE_NEW_RETURN (p4, + VBstringarray (sa), + 1); - StringArray sa2; - sa2[0] = CORBA::string_dup ("inout string1"); - sa2[1] = CORBA::string_dup ("inout string2"); + StringArray sa2; + sa2[0] = CORBA::string_dup ("inout string1"); + sa2[1] = CORBA::string_dup ("inout string2"); - VBstringarray *p5 = 0; - ACE_NEW_RETURN (p5, - VBstringarray (sa2), - 1); + VBstringarray *p5 = 0; + ACE_NEW_RETURN (p5, + VBstringarray (sa2), + 1); - OBV_VERITY (ACE_OS::strcmp((*p4)[0], sa[0]) == 0); - OBV_VERITY (ACE_OS::strcmp((*p4)[1], sa[1]) == 0); + OBV_VERITY (ACE_OS::strcmp((*p4)[0], sa[0]) == 0); + OBV_VERITY (ACE_OS::strcmp((*p4)[1], sa[1]) == 0); - VBstringarray *p6; + VBstringarray *p6; - VBstringarray_var result2 = test_object->array_op3 (p4, p5, p6); + VBstringarray_var result2 = test_object->array_op3 (p4, p5, p6); - OBV_VERITY (ACE_OS::strcmp((*p5)[0], "1inout string") == 0); - OBV_VERITY (ACE_OS::strcmp((*p5)[1], "2inout string") == 0); - OBV_VERITY (ACE_OS::strcmp((*p6)[0], "1inout string") == 0); - OBV_VERITY (ACE_OS::strcmp((*p6)[1], "2inout string") == 0); - OBV_VERITY (ACE_OS::strcmp((*result2.in ())[0], sa[0]) == 0); - OBV_VERITY (ACE_OS::strcmp((*result2.in ())[1], sa[1]) == 0); + OBV_VERITY (ACE_OS::strcmp((*p5)[0], "1inout string") == 0); + OBV_VERITY (ACE_OS::strcmp((*p5)[1], "2inout string") == 0); + OBV_VERITY (ACE_OS::strcmp((*p6)[0], "1inout string") == 0); + OBV_VERITY (ACE_OS::strcmp((*p6)[1], "2inout string") == 0); + OBV_VERITY (ACE_OS::strcmp((*result2.in ())[0], sa[0]) == 0); + OBV_VERITY (ACE_OS::strcmp((*result2.in ())[1], sa[1]) == 0); - //============================================================ - // Array (variable) - // Test _boxed_in(), _boxed_inout(), and _boxed_out()) - //============================================================ + //============================================================ + // Array (variable) + // Test _boxed_in(), _boxed_inout(), and _boxed_out()) + //============================================================ // Disable the following for now. Need to troubleshoot it. #if 0 @@ -1144,29 +1154,29 @@ int test_boxed_array_invocations (Test * test_object) // Trying the following variation to troubleshoot. No compilation error // but p6 is unchanged after return from method. - StringArray sa_experimental; - StringArray_slice *slice = p6->_boxed_out(); - StringArray_out an_out (slice); - - test_object->array_op4(p4->_boxed_in(), p5->_boxed_inout(), - an_out); - - ACE_DEBUG ((LM_DEBUG, "(%P|%t) after array_op4\n")); - ACE_DEBUG ((LM_DEBUG, "(%P|%t) p5[0]=%s\n", (const char *)((*p5)[0]))); - ACE_DEBUG ((LM_DEBUG, "(%P|%t) p5[1]=%s\n", (const char *)((*p5)[1]))); - ACE_DEBUG ((LM_DEBUG, "(%P|%t) p6[0]=%s\n", (const char *)((*p6)[0]))); - ACE_DEBUG ((LM_DEBUG, "(%P|%t) p6[1]=%s\n", (const char *)((*p6)[1]))); - OBV_VERITY (ACE_OS::strcmp((*p5)[0], "g1inout strin") == 0); - OBV_VERITY (ACE_OS::strcmp((*p5)[1], "g2inout strin") == 0); - OBV_VERITY (ACE_OS::strcmp((*p6)[0], sa[0]) == 0); - OBV_VERITY (ACE_OS::strcmp((*p6)[1], sa[1]) == 0); + StringArray sa_experimental; + StringArray_slice *slice = p6->_boxed_out(); + StringArray_out an_out (slice); + + test_object->array_op4(p4->_boxed_in(), p5->_boxed_inout(), + an_out); + + ACE_DEBUG ((LM_DEBUG, "(%P|%t) after array_op4\n")); + ACE_DEBUG ((LM_DEBUG, "(%P|%t) p5[0]=%s\n", (const char *)((*p5)[0]))); + ACE_DEBUG ((LM_DEBUG, "(%P|%t) p5[1]=%s\n", (const char *)((*p5)[1]))); + ACE_DEBUG ((LM_DEBUG, "(%P|%t) p6[0]=%s\n", (const char *)((*p6)[0]))); + ACE_DEBUG ((LM_DEBUG, "(%P|%t) p6[1]=%s\n", (const char *)((*p6)[1]))); + OBV_VERITY (ACE_OS::strcmp((*p5)[0], "g1inout strin") == 0); + OBV_VERITY (ACE_OS::strcmp((*p5)[1], "g2inout strin") == 0); + OBV_VERITY (ACE_OS::strcmp((*p6)[0], sa[0]) == 0); + OBV_VERITY (ACE_OS::strcmp((*p6)[1], sa[1]) == 0); #endif - p4->_remove_ref (); - p5->_remove_ref (); - p6->_remove_ref (); + p4->_remove_ref (); + p5->_remove_ref (); + p6->_remove_ref (); - } + } catch (const CORBA::Exception& ex) { ex._tao_print_exception ("test_boxed_array_invocations"); @@ -1189,78 +1199,78 @@ int test_boxed_array_invocations (Test * test_object) // int test_boxed_union() { - int fail = 0; + int fail = 0; - VBfixed_union1 *ptemp; - ACE_NEW_RETURN (ptemp, - VBfixed_union1 (), - 1); - VBfixed_union1_var valuebox1(ptemp); + VBfixed_union1 *ptemp; + ACE_NEW_RETURN (ptemp, + VBfixed_union1 (), + 1); + VBfixed_union1_var valuebox1(ptemp); - Fixed_Union1 *ptemp2; - ACE_NEW_RETURN (ptemp2, - Fixed_Union1 (), - 1); - Fixed_Union1_var fixed_union1(ptemp2); - - // Test modifiers, accessors, discriminant access - valuebox1->m1 (37); - OBV_VERITY (valuebox1->m1 () == 37); - OBV_VERITY (valuebox1->_d () == 1 || valuebox1->_d () == 2); - - // Explicitly set discriminant, make sure thats the only thing - // that changes. - valuebox1->_d (2); - OBV_VERITY (valuebox1->_d () == 2); - OBV_VERITY (valuebox1->m1 () == 37); - valuebox1->_d (1); - OBV_VERITY (valuebox1->_d () == 1); - OBV_VERITY (valuebox1->m1 () == 37); - - // Use _value() to access - valuebox1->_value ()._d (2); - OBV_VERITY (valuebox1->_d () == 2); - - // Use _value as modifier. - valuebox1->_value (fixed_union1.in()); - OBV_VERITY (valuebox1->_d () != 1 && valuebox1->_d () != 2); - - // - VBfixed_union1* valuebox2_ptr = 0; - ACE_NEW_RETURN (valuebox2_ptr, - VBfixed_union1 (), - 1); - VBfixed_union1_var valuebox2 (valuebox2_ptr); - valuebox2->m2(333); - OBV_VERITY (valuebox2->_d () == 2); - - // Test copy ctor - VBfixed_union1* valuebox3_ptr = 0; - ACE_NEW_RETURN (valuebox3_ptr, - VBfixed_union1 (*valuebox2.in ()), - 1); - VBfixed_union1_var valuebox3 (valuebox3_ptr); - OBV_VERITY (valuebox3->_d () == 2); - OBV_VERITY (valuebox3->m2 () == 333); - - // Test assignment op - valuebox3->m2 (456); - *valuebox3.in () = valuebox2->_value (); - OBV_VERITY (valuebox3->_d () == 2); - OBV_VERITY (valuebox3->m2 () == 333); - - // Test constructor taking union argument - fixed_union1->m2 (137); - VBfixed_union1 *valuebox4_ptr = 0; - ACE_NEW_RETURN (valuebox4_ptr, - VBfixed_union1 (fixed_union1.in ()), - 1); - VBfixed_union1_var valuebox4 (valuebox4_ptr); - OBV_VERITY (valuebox4->m2 () == 137); - OBV_VERITY (valuebox4->_d () == 1 || valuebox4->_d () == 2); + Fixed_Union1 *ptemp2; + ACE_NEW_RETURN (ptemp2, + Fixed_Union1 (), + 1); + Fixed_Union1_var fixed_union1(ptemp2); + + // Test modifiers, accessors, discriminant access + valuebox1->m1 (37); + OBV_VERITY (valuebox1->m1 () == 37); + OBV_VERITY (valuebox1->_d () == 1 || valuebox1->_d () == 2); + + // Explicitly set discriminant, make sure thats the only thing + // that changes. + valuebox1->_d (2); + OBV_VERITY (valuebox1->_d () == 2); + OBV_VERITY (valuebox1->m1 () == 37); + valuebox1->_d (1); + OBV_VERITY (valuebox1->_d () == 1); + OBV_VERITY (valuebox1->m1 () == 37); + + // Use _value() to access + valuebox1->_value ()._d (2); + OBV_VERITY (valuebox1->_d () == 2); + + // Use _value as modifier. + valuebox1->_value (fixed_union1.in()); + OBV_VERITY (valuebox1->_d () != 1 && valuebox1->_d () != 2); - return fail; + // + VBfixed_union1* valuebox2_ptr = 0; + ACE_NEW_RETURN (valuebox2_ptr, + VBfixed_union1 (), + 1); + VBfixed_union1_var valuebox2 (valuebox2_ptr); + valuebox2->m2(333); + OBV_VERITY (valuebox2->_d () == 2); + + // Test copy ctor + VBfixed_union1* valuebox3_ptr = 0; + ACE_NEW_RETURN (valuebox3_ptr, + VBfixed_union1 (*valuebox2.in ()), + 1); + VBfixed_union1_var valuebox3 (valuebox3_ptr); + OBV_VERITY (valuebox3->_d () == 2); + OBV_VERITY (valuebox3->m2 () == 333); + + // Test assignment op + valuebox3->m2 (456); + *valuebox3.in () = valuebox2->_value (); + OBV_VERITY (valuebox3->_d () == 2); + OBV_VERITY (valuebox3->m2 () == 333); + + // Test constructor taking union argument + fixed_union1->m2 (137); + VBfixed_union1 *valuebox4_ptr = 0; + ACE_NEW_RETURN (valuebox4_ptr, + VBfixed_union1 (fixed_union1.in ()), + 1); + VBfixed_union1_var valuebox4 (valuebox4_ptr); + OBV_VERITY (valuebox4->m2 () == 137); + OBV_VERITY (valuebox4->_d () == 1 || valuebox4->_d () == 2); + + return fail; } @@ -1268,135 +1278,136 @@ int test_boxed_union() int test_boxed_union_invocations (Test * test_object) { - int fail = 0; - - try - { - //============================================================ - // Union (fixed) - // Test method invocation with boxed value - //============================================================ - - Fixed_Union1 *ptemp = 0; - ACE_NEW_RETURN (ptemp, - Fixed_Union1 (), - 1); - Fixed_Union1_var fixed_union1(ptemp); - - fixed_union1->m1 (321); - VBfixed_union1 *p1 = 0; - ACE_NEW_RETURN (p1, - VBfixed_union1 (fixed_union1.in ()), - 1); - - Fixed_Union1 *ptemp2 = 0; - ACE_NEW_RETURN (ptemp2, - Fixed_Union1 (), - 1); - Fixed_Union1_var fixed_union2(ptemp2); - fixed_union2->m2 (789); - VBfixed_union1 *p2 = 0; - ACE_NEW_RETURN (p2, - VBfixed_union1 (fixed_union2.in ()), - 1); - - OBV_VERITY (p1->_d () == 1); - OBV_VERITY (p1->m1 () == 321); - OBV_VERITY (p2->_d () == 2); - OBV_VERITY (p2->m2 () == 789); - - VBfixed_union1 * p3; - - VBfixed_union1_var result = test_object->union_op1 (p1, p2, p3); - - OBV_VERITY (p2->_d () == 2); - OBV_VERITY (p2->m2 () == 789*3); - OBV_VERITY (p3->_d () == 1); - OBV_VERITY (p3->m1 () == 321*3); - OBV_VERITY (result->_d () == 1); - OBV_VERITY (result->m1 () == 321*3); - - - //============================================================ - // Union (fixed) - // Test _boxed_in(), _boxed_inout(), and _boxed_out()) - //============================================================ - - test_object->union_op2(p1->_boxed_in(), p2->_boxed_inout(), - p3->_boxed_out()); - - OBV_VERITY (p2->_d () == 2); - OBV_VERITY (p2->m2 () == 789*3*3); - - OBV_VERITY (p3->_d () == 1); - OBV_VERITY (p3->m1 () == 321); - - p1->_remove_ref (); - p2->_remove_ref (); - p3->_remove_ref (); - - //============================================================ - // Union (variable) - // Test method invocation with boxed value - //============================================================ - - Variable_Union1_var variable_union1; - ACE_NEW_RETURN (variable_union1, - Variable_Union1 (), - 1); - variable_union1->m1 (321); - VBvariable_union1 *p4 = 0; - ACE_NEW_RETURN (p4, - VBvariable_union1 (variable_union1.in ()), - 1); - - Variable_Union1_var variable_union2; - ACE_NEW_RETURN (variable_union2, - Variable_Union1 (), - 1); - variable_union2->m2 (CORBA::string_dup ("abracadabra")); - VBvariable_union1 *p5 = 0; - ACE_NEW_RETURN (p5, - VBvariable_union1 (variable_union2.in ()), - 1); - - OBV_VERITY (p4->_d () == 1); - OBV_VERITY (p4->m1 () == 321); - OBV_VERITY (p5->_d () == 2); - OBV_VERITY (ACE_OS::strcmp(p5->m2 (), "abracadabra") == 0); - - VBvariable_union1 * p6; - - VBvariable_union1_var result2 = test_object->union_op3 (p4, p5, p6); - - OBV_VERITY (p5->_d () == 2); - OBV_VERITY (ACE_OS::strcmp(p5->m2 (), "aabracadabr") == 0); - OBV_VERITY (p6->_d () == 1); - OBV_VERITY (p6->m1 () == 321); - OBV_VERITY (result2->_d () == 1); - OBV_VERITY (result2->m1 () == 321); - - //============================================================ - // Union (variable) - // Test _boxed_in(), _boxed_inout(), and _boxed_out()) - //============================================================ - - p4->m1 (1722); - - test_object->union_op4(p4->_boxed_in(), p5->_boxed_inout(), - p6->_boxed_out()); - - OBV_VERITY (p5->_d () == 2); - OBV_VERITY (ACE_OS::strcmp(p5->m2 (), "raabracadab") == 0); - - OBV_VERITY (p6->_d () == 1); - OBV_VERITY (p6->m1 () == 1722); + int fail = 0; - p4->_remove_ref (); - p5->_remove_ref (); - p6->_remove_ref (); + try + { + //============================================================ + // Union (fixed) + // Test method invocation with boxed value + //============================================================ + + Fixed_Union1 *ptemp = 0; + ACE_NEW_RETURN (ptemp, + Fixed_Union1 (), + 1); + Fixed_Union1_var fixed_union1(ptemp); + + fixed_union1->m1 (321); + VBfixed_union1 *p1 = 0; + ACE_NEW_RETURN (p1, + VBfixed_union1 (fixed_union1.in ()), + 1); + + Fixed_Union1 *ptemp2 = 0; + ACE_NEW_RETURN (ptemp2, + Fixed_Union1 (), + 1); + Fixed_Union1_var fixed_union2(ptemp2); + fixed_union2->m2 (789); + VBfixed_union1 *p2 = 0; + ACE_NEW_RETURN (p2, + VBfixed_union1 (fixed_union2.in ()), + 1); + + OBV_VERITY (p1->_d () == 1); + OBV_VERITY (p1->m1 () == 321); + OBV_VERITY (p2->_d () == 2); + OBV_VERITY (p2->m2 () == 789); + + VBfixed_union1 * p3; + + VBfixed_union1_var result = test_object->union_op1 (p1, p2, p3); + + OBV_VERITY (p2->_d () == 2); + OBV_VERITY (p2->m2 () == 789*3); + OBV_VERITY (p3->_d () == 1); + OBV_VERITY (p3->m1 () == 321*3); + OBV_VERITY (result->_d () == 1); + OBV_VERITY (result->m1 () == 321*3); + + + //============================================================ + // Union (fixed) + // Test _boxed_in(), _boxed_inout(), and _boxed_out()) + //============================================================ + + test_object->union_op2(p1->_boxed_in(), p2->_boxed_inout(), + p3->_boxed_out()); + + OBV_VERITY (p2->_d () == 2); + OBV_VERITY (p2->m2 () == 789*3*3); + + OBV_VERITY (p3->_d () == 1); + OBV_VERITY (p3->m1 () == 321); + + p1->_remove_ref (); + p2->_remove_ref (); + p3->_remove_ref (); + + //============================================================ + // Union (variable) + // Test method invocation with boxed value + //============================================================ + + Variable_Union1_var variable_union1; + ACE_NEW_RETURN (variable_union1, + Variable_Union1 (), + 1); + variable_union1->m1 (321); + // TODO : resource leak + VBvariable_union1 *p4 = 0; + ACE_NEW_RETURN (p4, + VBvariable_union1 (variable_union1.in ()), + 1); + + Variable_Union1_var variable_union2; + ACE_NEW_RETURN (variable_union2, + Variable_Union1 (), + 1); + variable_union2->m2 (CORBA::string_dup ("abracadabra")); + VBvariable_union1 *p5 = 0; + ACE_NEW_RETURN (p5, + VBvariable_union1 (variable_union2.in ()), + 1); + + OBV_VERITY (p4->_d () == 1); + OBV_VERITY (p4->m1 () == 321); + OBV_VERITY (p5->_d () == 2); + OBV_VERITY (ACE_OS::strcmp(p5->m2 (), "abracadabra") == 0); + + VBvariable_union1 * p6; + + VBvariable_union1_var result2 = test_object->union_op3 (p4, p5, p6); + + OBV_VERITY (p5->_d () == 2); + OBV_VERITY (ACE_OS::strcmp(p5->m2 (), "aabracadabr") == 0); + OBV_VERITY (p6->_d () == 1); + OBV_VERITY (p6->m1 () == 321); + OBV_VERITY (result2->_d () == 1); + OBV_VERITY (result2->m1 () == 321); + + //============================================================ + // Union (variable) + // Test _boxed_in(), _boxed_inout(), and _boxed_out()) + //============================================================ + + p4->m1 (1722); + + test_object->union_op4(p4->_boxed_in(), p5->_boxed_inout(), + p6->_boxed_out()); + + OBV_VERITY (p5->_d () == 2); + OBV_VERITY (ACE_OS::strcmp(p5->m2 (), "raabracadab") == 0); + + OBV_VERITY (p6->_d () == 1); + OBV_VERITY (p6->m1 () == 1722); + + p4->_remove_ref (); + p5->_remove_ref (); + p6->_remove_ref (); - } + } catch (const CORBA::Exception& ex) { ex._tao_print_exception ("test_boxed_union_invocations"); diff --git a/tests/ORB_Local_Config/Bug_3049/README b/tests/ORB_Local_Config/Bug_3049/README index 590c65fc374..5e1b1ae4c33 100644 --- a/tests/ORB_Local_Config/Bug_3049/README +++ b/tests/ORB_Local_Config/Bug_3049/README @@ -1,2 +1,4 @@ +// $Id$ + This test was borrowed from bugzilla 1459 and intends to test the ability to use differently configured ORBs within the same process. diff --git a/tests/ORB_Local_Config/Two_DLL_ORB/README b/tests/ORB_Local_Config/Two_DLL_ORB/README index a49e8cea08c..46638e311ec 100644 --- a/tests/ORB_Local_Config/Two_DLL_ORB/README +++ b/tests/ORB_Local_Config/Two_DLL_ORB/README @@ -1,3 +1,5 @@ +// $Id$ + This test is intended to demonstrate the ORB-specific configuration feature. It excesses two basic scenarios, in which a client and a server ORB exchange a simple message. The twist is that both are diff --git a/tests/Oneway_Send_Timeouts/run_test.pl b/tests/Oneway_Send_Timeouts/run_test.pl index 9fddebaff12..c9945d9b814 100755 --- a/tests/Oneway_Send_Timeouts/run_test.pl +++ b/tests/Oneway_Send_Timeouts/run_test.pl @@ -14,7 +14,7 @@ $status = 0; $debug_level = '0'; $test_port = 12345; $management_port = 12346; -$client_conf = $target->LocalFile ("lf_flush.conf"); +$conf_file = "lf_flush.conf"; $flush_strategy = "LF"; foreach $i (@ARGV) { @@ -22,11 +22,11 @@ foreach $i (@ARGV) { $debug_level = '10'; } elsif ($i eq '-blocking') { - $client_conf = "block_flush.conf"; + $conf_file = "block_flush.conf"; $flush_strategy = "BLOCKING"; } elsif ($i eq '-reactive') { - $client_conf = "reactive_flush.conf"; + $conf_file = "reactive_flush.conf"; $flush_strategy = "REACTIVE"; } else { @@ -35,6 +35,13 @@ foreach $i (@ARGV) { } } +$client_conf = $target->LocalFile ($conf_file); + +if ($target->PutFile ($conf_file) == -1) { + print STDERR "ERROR: cannot set file <$client_conf>\n"; + exit 1; +} + my $test_opts = "-s \'-ORBEndpoint iiop://localhost:$test_port -ORBEndpoint " . "iiop://localhost:$management_port -ORBDebuglevel $debug_level -ORBCollocation " . "no -ORBGestalt LOCAL\' -c \'-k corbaloc::localhost:$test_port/Test -b " . diff --git a/tests/POA/EndpointPolicy/run_test_dh.pl b/tests/POA/EndpointPolicy/run_test_dh.pl index 85efd52677c..3d4b8d97310 100755 --- a/tests/POA/EndpointPolicy/run_test_dh.pl +++ b/tests/POA/EndpointPolicy/run_test_dh.pl @@ -14,6 +14,16 @@ $port = 12345; my $server = PerlACE::TestTarget::create_target (1) || die "Create target 1 failed\n"; +# configuration not passed to the server by the command line but the server +# will open it. +my $svcconf = "multi_prot.conf"; +my $server_svcfile = $server->LocalFile ($svcconf); +if ($server->PutFile ($svcconf) == -1) { + print STDERR "ERROR: cannot set file <$server_svcfile>\n"; + exit 1; +} + + $iiopSV = $server->CreateProcess ("server", "-ORBDottedDecimalAddresses 0 -ORBUseSharedProfile 1 -h default -p $port"); print "Starting server using only IIOP\n"; diff --git a/tests/POA/EndpointPolicy/server.cpp b/tests/POA/EndpointPolicy/server.cpp index 3b2f0887539..dc65656f201 100644 --- a/tests/POA/EndpointPolicy/server.cpp +++ b/tests/POA/EndpointPolicy/server.cpp @@ -347,9 +347,15 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { ex._tao_print_exception ("cannot run server"); } - root_poa->destroy (1, 1); - - orb->destroy (); + try + { + root_poa->destroy (1, 1); + orb->destroy (); + } + catch (CORBA::Exception &ex) + { + ex._tao_print_exception ("CORBA exception during shutdown"); + } return 0; } diff --git a/tests/POA/Loader/server.cpp b/tests/POA/Loader/server.cpp index 809eccba1fa..37603d1319b 100644 --- a/tests/POA/Loader/server.cpp +++ b/tests/POA/Loader/server.cpp @@ -18,49 +18,56 @@ int ACE_TMAIN(int argc, ACE_TCHAR *argv[]) { - Server_i server; + try + { + Server_i server; - if (server.init (argc, argv) != 0) - ACE_ERROR_RETURN ((LM_ERROR, - "Failure during Initialisation: init ()\n"), - -1); + if (server.init (argc, argv) != 0) + ACE_ERROR_RETURN ((LM_ERROR, + "Failure during Initialisation: init ()\n"), + -1); - // This POA is used to test the Servant Activator interface and - // hence has an RETAIN policy. - PortableServer::POA_var first_poa = - server.create_poa ("firstPOA", 1); + // This POA is used to test the Servant Activator interface and + // hence has an RETAIN policy. + PortableServer::POA_var first_poa = + server.create_poa ("firstPOA", 1); - if (first_poa.in () == 0) - ACE_ERROR_RETURN ((LM_ERROR, - "Failure during first POA creation: create_poa ()\n"), - -1); + if (first_poa.in () == 0) + ACE_ERROR_RETURN ((LM_ERROR, + "Failure during first POA creation: create_poa ()\n"), + -1); - // This poa is used to test the Servant Activator interface and - // hence has an NONRETAIN policy. - PortableServer::POA_var second_poa = - server.create_poa ("secondPOA", 0); + // This poa is used to test the Servant Activator interface and + // hence has an NONRETAIN policy. + PortableServer::POA_var second_poa = + server.create_poa ("secondPOA", 0); - if (second_poa.in () == 0) - ACE_ERROR_RETURN ((LM_ERROR, - "Failure during second POA creation: create_poa ()\n"), - -1); + if (second_poa.in () == 0) + ACE_ERROR_RETURN ((LM_ERROR, + "Failure during second POA creation: create_poa ()\n"), + -1); - // The Servant Activator interface is created and initialised. - if (server.create_activator (first_poa) != 0) - ACE_ERROR_RETURN ((LM_ERROR, - "Failure during first Servant Activator creation: create_activator()\n"), - -1); + // The Servant Activator interface is created and initialised. + if (server.create_activator (first_poa) != 0) + ACE_ERROR_RETURN ((LM_ERROR, + "Failure during first Servant Activator creation: create_activator()\n"), + -1); - // The Servant Locator interface is created and initialised. - if (server.create_locator (second_poa) !=0) - ACE_ERROR_RETURN ((LM_ERROR, - "Failure during first Servant Locator creation: create_activator()\n"), - -1); + // The Servant Locator interface is created and initialised. + if (server.create_locator (second_poa) !=0) + ACE_ERROR_RETURN ((LM_ERROR, + "Failure during first Servant Locator creation: create_activator()\n"), + -1); - // The server begins processing requests. - if (server.run () != 0) - ACE_ERROR_RETURN ((LM_ERROR, - "Failure during request processing: run ()\n"), - -1); + // The server begins processing requests. + if (server.run () != 0) + ACE_ERROR_RETURN ((LM_ERROR, + "Failure during request processing: run ()\n"), + -1); + } + catch (const ::CORBA::Exception &ex) + { + ex._tao_print_exception("Caught unexpected CORBA exception :"); + } return 0; } diff --git a/tests/Parallel_Connect_Strategy/run_test.pl b/tests/Parallel_Connect_Strategy/run_test.pl index 33f491bb35f..d3c126b1f21 100755 --- a/tests/Parallel_Connect_Strategy/run_test.pl +++ b/tests/Parallel_Connect_Strategy/run_test.pl @@ -38,15 +38,27 @@ my $corbaloc = "corbaloc:". my $valid_ep = "-ORBListenEndpoints iiop://$TARGETHOSTNAME:$port"; my $iorbase = "server.ior"; -my $reactive_conf = "reactive$PerlACE::svcconf_ext"; -my $blocked_conf = "blocked$PerlACE::svcconf_ext"; my $server_iorfile = $server->LocalFile ($iorbase); my $client_iorfile = $client->LocalFile ($iorbase); -my $client_reactive_conf = $client->LocalFile ($reactive_conf); -my $client_blocked_conf = $client->LocalFile ($blocked_conf); + $server->DeleteFile($iorbase); $client->DeleteFile($iorbase); +my $reactive_conf = "reactive$PerlACE::svcconf_ext"; +my $blocked_conf = "blocked$PerlACE::svcconf_ext"; +my $client_reactive_conf = $client->LocalFile ($reactive_conf); +my $client_blocked_conf = $client->LocalFile ($blocked_conf); + +if ($client->PutFile ($reactive_conf) == -1) { + print STDERR "ERROR: cannot set file <$client_reactive_conf>\n"; + exit 1; +} + +if ($client->PutFile ($blocked_conf) == -1) { + print STDERR "ERROR: cannot set file <$client_blocked_conf>\n"; + exit 1; +} + $SV = $server->CreateProcess ("server", "-ORBdebuglevel $debug_level ". "-ORBUseSharedProfile 1 ". diff --git a/tests/Param_Test/driver.cpp b/tests/Param_Test/driver.cpp index 1217a092551..13e927eee6e 100644 --- a/tests/Param_Test/driver.cpp +++ b/tests/Param_Test/driver.cpp @@ -24,21 +24,30 @@ int ACE_TMAIN(int argc, ACE_TCHAR *argv[]) { // get an instance of the driver object - Driver drv; + try + { + Driver drv; - // initialize the driver - if (drv.init (argc, argv) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "(%N:%l) driver.cpp - " - "Driver initialization failed\n"), - -1); + // initialize the driver + if (drv.init (argc, argv) == -1) + ACE_ERROR_RETURN ((LM_ERROR, + "(%N:%l) driver.cpp - " + "Driver initialization failed\n"), + -1); - // run various tests - if (drv.run () == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "(%N:%l) driver.cpp - " - "tests failed\n"), - -1); + // run various tests + if (drv.run () == -1) + ACE_ERROR_RETURN ((LM_ERROR, + "(%N:%l) driver.cpp - " + "tests failed\n"), + -1); + } + catch (const CORBA::Exception& ex) + { + ex._tao_print_exception ("Caught unexpected CORBA exception:"); + + return 1; + } return 0; } diff --git a/tests/Portable_Interceptors/AdvSlot/client.cpp b/tests/Portable_Interceptors/AdvSlot/client.cpp index 9dde6c00f21..0feb40d7b44 100644 --- a/tests/Portable_Interceptors/AdvSlot/client.cpp +++ b/tests/Portable_Interceptors/AdvSlot/client.cpp @@ -6,22 +6,30 @@ int ACE_TMAIN(int argc, ACE_TCHAR *argv[]) { - CORBA::ORB_var orb = CORBA::ORB_init (argc, argv); + try + { + CORBA::ORB_var orb = CORBA::ORB_init (argc, argv); - if (argc != 2) - { - ACE_DEBUG ((LM_ERROR, "Usage: %s <ior>\n", argv[0])); - return -1; - } + if (argc != 2) + { + ACE_DEBUG ((LM_ERROR, "Usage: %s <ior>\n", argv[0])); + return -1; + } - CORBA::Object_var obj = orb->string_to_object (argv[1]); - StateTransfer_var server = StateTransfer::_narrow (obj.in ()); + CORBA::Object_var obj = orb->string_to_object (argv[1]); + StateTransfer_var server = StateTransfer::_narrow (obj.in ()); - CORBA::Short n = server->number (); + CORBA::Short n = server->number (); - ACE_DEBUG ((LM_ERROR, "Got number %d\n", n)); + ACE_DEBUG ((LM_ERROR, "Got number %d\n", n)); - server->shutdown (); + server->shutdown (); + } + catch (const ::CORBA::Exception &ex) + { + ex._tao_print_exception ("ERROR : unexpected CORBA exception caught : "); + return 1; + } return 0; } diff --git a/tests/Portable_Interceptors/AdvSlot/server.cpp b/tests/Portable_Interceptors/AdvSlot/server.cpp index 007d6fca674..87978761ff6 100644 --- a/tests/Portable_Interceptors/AdvSlot/server.cpp +++ b/tests/Portable_Interceptors/AdvSlot/server.cpp @@ -177,59 +177,68 @@ public: int ACE_TMAIN(int argc, ACE_TCHAR *argv[]) { - ORBInitializer_var orb_initializer (new ORB_Initializer ()); - register_orb_initializer (orb_initializer.in ()); + try + { + ORBInitializer_var orb_initializer (new ORB_Initializer ()); + register_orb_initializer (orb_initializer.in ()); - ORB_var orb (ORB_init (argc, argv)); + ORB_var orb (ORB_init (argc, argv)); - if (parse_args (argc, argv) != 0) - return 1; + if (parse_args (argc, argv) != 0) + return 1; - Object_var obj (orb->resolve_initial_references ("RootPOA")); + Object_var obj (orb->resolve_initial_references ("RootPOA")); - POA_var root_poa (POA::_narrow (obj.in ())); - POAManager_var poa_manager (root_poa->the_POAManager ()); + POA_var root_poa (POA::_narrow (obj.in ())); + POAManager_var poa_manager (root_poa->the_POAManager ()); - StateTransferImpl* impl = new StateTransferImpl (orb.in ()); - ServantBase_var impl_var (impl); + StateTransferImpl* impl = new StateTransferImpl (orb.in ()); + ServantBase_var impl_var (impl); - PortableServer::ObjectId_var id_act = - root_poa->activate_object (impl); + PortableServer::ObjectId_var id_act = + root_poa->activate_object (impl); - CORBA::Object_var object = root_poa->id_to_reference (id_act.in ()); + CORBA::Object_var object = root_poa->id_to_reference (id_act.in ()); - StateTransfer_var ref = StateTransfer::_narrow (object.in ()); - String_var ior (orb->object_to_string (ref.in ())); + StateTransfer_var ref = StateTransfer::_narrow (object.in ()); + String_var ior (orb->object_to_string (ref.in ())); - poa_manager->activate (); + poa_manager->activate (); - // Dump the ior. - // - FILE *output_file= ACE_OS::fopen (ior_output_file, "w"); - if (output_file == 0) - { - ACE_ERROR_RETURN ((LM_ERROR, - "Cannot open output file <%s> for writing " - "IOR: %C", - ior_output_file, - ior.in ()), - 1); - } + // Dump the ior. + // + FILE *output_file= ACE_OS::fopen (ior_output_file, "w"); + if (output_file == 0) + { + ACE_ERROR_RETURN ((LM_ERROR, + "Cannot open output file <%s> for writing " + "IOR: %C", + ior_output_file, + ior.in ()), + 1); + } + + ACE_OS::fprintf (output_file, "%s", ior.in ()); + ACE_OS::fclose (output_file); - ACE_OS::fprintf (output_file, "%s", ior.in ()); - ACE_OS::fclose (output_file); + ACE_DEBUG ((LM_DEBUG, "Server is ready, IOR is in '%s'\n", ior_output_file)); - ACE_DEBUG ((LM_DEBUG, "Server is ready, IOR is in '%s'\n", ior_output_file)); + // Run the ORB event loop. + // + orb->run (); - // Run the ORB event loop. - // - orb->run (); + root_poa->destroy (1, 1); + orb->destroy (); - root_poa->destroy (1, 1); - orb->destroy (); + ACE_DEBUG ((LM_DEBUG, "Event loop finished.\n")); + } + catch (const CORBA::Exception& ex) + { + ex._tao_print_exception ("Caught unexpected CORBA exception:"); - ACE_DEBUG ((LM_DEBUG, "Event loop finished.\n")); + return 1; + } return 0; } diff --git a/tests/Portable_Interceptors/AdvSlotDblCpy/client.cpp b/tests/Portable_Interceptors/AdvSlotDblCpy/client.cpp index ed27268f76e..a4b4397259d 100644 --- a/tests/Portable_Interceptors/AdvSlotDblCpy/client.cpp +++ b/tests/Portable_Interceptors/AdvSlotDblCpy/client.cpp @@ -21,21 +21,29 @@ namespace int ACE_TMAIN(int argc, ACE_TCHAR *argv[]) { - CORBA::ORB_var orb = CORBA::ORB_init (argc, argv); + try + { + CORBA::ORB_var orb = CORBA::ORB_init (argc, argv); - if (argc != 2) - { - ACE_DEBUG ((LM_ERROR, "Usage: %s <ior>\n", argv[0])); - return -1; - } + if (argc != 2) + { + ACE_DEBUG ((LM_ERROR, "Usage: %s <ior>\n", argv[0])); + return -1; + } - CORBA::Object_var obj = orb->string_to_object (argv[1]); - InvokeMe_var server = InvokeMe::_narrow (obj.in ()); + CORBA::Object_var obj = orb->string_to_object (argv[1]); + InvokeMe_var server = InvokeMe::_narrow (obj.in ()); - always Shutdown( server.in () ); // When goes out of scope! - server->invoke_me (); - ACE_DEBUG ((LM_DEBUG, "\n")); - server->invoke_me (); + always Shutdown( server.in () ); // When goes out of scope! + server->invoke_me (); + ACE_DEBUG ((LM_DEBUG, "\n")); + server->invoke_me (); + } + catch (const ::CORBA::Exception &ex) + { + ex._tao_print_exception ("ERROR : unexpected CORBA exception caught : "); + return 1; + } return 0; } diff --git a/tests/Portable_Interceptors/AdvSlotExt/client.cpp b/tests/Portable_Interceptors/AdvSlotExt/client.cpp index 9dde6c00f21..e3878d4c9ed 100644 --- a/tests/Portable_Interceptors/AdvSlotExt/client.cpp +++ b/tests/Portable_Interceptors/AdvSlotExt/client.cpp @@ -6,22 +6,30 @@ int ACE_TMAIN(int argc, ACE_TCHAR *argv[]) { - CORBA::ORB_var orb = CORBA::ORB_init (argc, argv); + try + { + CORBA::ORB_var orb = CORBA::ORB_init (argc, argv); - if (argc != 2) - { - ACE_DEBUG ((LM_ERROR, "Usage: %s <ior>\n", argv[0])); - return -1; - } + if (argc != 2) + { + ACE_DEBUG ((LM_ERROR, "Usage: %s <ior>\n", argv[0])); + return -1; + } - CORBA::Object_var obj = orb->string_to_object (argv[1]); - StateTransfer_var server = StateTransfer::_narrow (obj.in ()); + CORBA::Object_var obj = orb->string_to_object (argv[1]); + StateTransfer_var server = StateTransfer::_narrow (obj.in ()); - CORBA::Short n = server->number (); + CORBA::Short n = server->number (); - ACE_DEBUG ((LM_ERROR, "Got number %d\n", n)); + ACE_DEBUG ((LM_ERROR, "Got number %d\n", n)); - server->shutdown (); + server->shutdown (); + } + catch (const ::CORBA::Exception &ex) + { + ex._tao_print_exception ("ERROR : unexpected CORBA exception caught : "); + return 1; + } return 0; } diff --git a/tests/RTCORBA/Server_Protocol/run_test.pl b/tests/RTCORBA/Server_Protocol/run_test.pl index 101b3a7a7d5..747cab71129 100755 --- a/tests/RTCORBA/Server_Protocol/run_test.pl +++ b/tests/RTCORBA/Server_Protocol/run_test.pl @@ -19,10 +19,21 @@ $client->DeleteFile($iorbase); $status = 0; -$server_reverse_conf = $server->LocalFile ("server_reverse$PerlACE::svcconf_ext"); -$server_iiop_uiop_conf = $server->LocalFile ("server_iiop_uiop$PerlACE::svcconf_ext"); -$server_iiop_shmiop_conf = $server->LocalFile ("server_iiop_shmiop$PerlACE::svcconf_ext"); -$server_reverse_nt_conf = $server->LocalFile ("server_reverse_nt$PerlACE::svcconf_ext"); +$server_reverse_conf_base = "server_reverse$PerlACE::svcconf_ext"; +$server_reverse_conf = $server->LocalFile ($server_reverse_conf_base); + +$server_iiop_uiop_conf_base = "server_iiop_uiop$PerlACE::svcconf_ext"; +$server_iiop_uiop_conf = $server->LocalFile ($server_iiop_uiop_conf_base); + +# Copy configuration files to the target. +if ($server->PutFile ($server_reverse_conf_base) == -1) { + print STDERR "ERROR: cannot set file <$server_reverse_conf>\n"; + exit 1; +} +if ($server->PutFile ($server_iiop_uiop_conf_base) == -1) { + print STDERR "ERROR: cannot set file <$server_iiop_uiop_conf>\n"; + exit 1; +} # Configurations for all tests to be run. @server_opts = @@ -44,8 +55,26 @@ $server_reverse_nt_conf = $server->LocalFile ("server_reverse_nt$PerlACE::svcco "* Overriding ORB Default Server Protocol Policy in the POA\n" ." (POA Server Protocol set to UIOP only): \n"); + + # UIOP only available on Unix. Substitute with alternative tests on Windows. if ($^O eq "MSWin32" || $^O eq "VMS") { + $server_iiop_shmiop_conf_base = "server_iiop_shmiop$PerlACE::svcconf_ext"; + $server_iiop_shmiop_conf = $server->LocalFile ($server_iiop_shmiop_conf_base); + + $server_reverse_nt_conf_base = "server_reverse_nt$PerlACE::svcconf_ext"; + $server_reverse_nt_conf = $server->LocalFile ($server_reverse_nt_conf_base); + + # Copy the configuration files + if ($server->PutFile ($server_iiop_shmiop_conf_base) == -1) { + print STDERR "ERROR: cannot set file <$server_iiop_shmiop_conf>\n"; + exit 1; + } + if ($server->PutFile ($server_reverse_nt_conf_base) == -1) { + print STDERR "ERROR: cannot set file <$server_reverse_nt_conf>\n"; + exit 1; + } + @server_opts = ("-ORBSndSock 54321 -ORBendpoint iiop://", diff --git a/tests/RTScheduling/Scheduling_Interceptor/test_client.cpp b/tests/RTScheduling/Scheduling_Interceptor/test_client.cpp index 474cc501061..96af1ad9a57 100644 --- a/tests/RTScheduling/Scheduling_Interceptor/test_client.cpp +++ b/tests/RTScheduling/Scheduling_Interceptor/test_client.cpp @@ -44,75 +44,84 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[]) try { + try + { - orb = CORBA::ORB_init (argc, argv); + orb = CORBA::ORB_init (argc, argv); - if (parse_args (argc, argv) == -1) - return (-1); + if (parse_args (argc, argv) == -1) + return (-1); - CORBA::Object_var manager_obj = orb->resolve_initial_references ("RTSchedulerManager"); + CORBA::Object_var manager_obj = orb->resolve_initial_references ("RTSchedulerManager"); - TAO_RTScheduler_Manager_var manager = TAO_RTScheduler_Manager::_narrow (manager_obj.in ()); + TAO_RTScheduler_Manager_var manager = TAO_RTScheduler_Manager::_narrow (manager_obj.in ()); - TAO_Scheduler* scheduler = 0; - ACE_NEW_RETURN (scheduler, - TAO_Scheduler (orb.in ()), - -1); - safe_scheduler = scheduler; + TAO_Scheduler* scheduler = 0; + ACE_NEW_RETURN (scheduler, + TAO_Scheduler (orb.in ()), + -1); + safe_scheduler = scheduler; - manager->rtscheduler (scheduler); + manager->rtscheduler (scheduler); - CORBA::Object_var object = - orb->string_to_object (ior.c_str ()); + CORBA::Object_var object = + orb->string_to_object (ior.c_str ()); - server = test::_narrow (object.in ()); + server = test::_narrow (object.in ()); - if (CORBA::is_nil (server.in ())) - { - ACE_ERROR_RETURN ((LM_ERROR, - "ERROR: Object reference <%s> is nil\n", - ior.c_str ()), - 1); - } + if (CORBA::is_nil (server.in ())) + { + ACE_ERROR_RETURN ((LM_ERROR, + "ERROR: Object reference <%s> is nil\n", + ior.c_str ()), + 1); + } - CORBA::Object_var current_obj = orb->resolve_initial_references ("RTScheduler_Current"); + CORBA::Object_var current_obj = orb->resolve_initial_references ("RTScheduler_Current"); - RTScheduling::Current_var current = RTScheduling::Current::_narrow (current_obj.in ()); + RTScheduling::Current_var current = RTScheduling::Current::_narrow (current_obj.in ()); - const char * name = 0; - CORBA::Policy_ptr sched_param = 0; - CORBA::Policy_ptr implicit_sched_param = 0; + const char * name = 0; + CORBA::Policy_ptr sched_param = 0; + CORBA::Policy_ptr implicit_sched_param = 0; - current->begin_scheduling_segment (name, - sched_param, - implicit_sched_param); + current->begin_scheduling_segment (name, + sched_param, + implicit_sched_param); - ACE_DEBUG ((LM_DEBUG, - "Making a one-way request\n")); - server->one_way (ACE_TEXT_ALWAYS_CHAR(ior.c_str ())); + ACE_DEBUG ((LM_DEBUG, + "Making a one-way request\n")); + server->one_way (ACE_TEXT_ALWAYS_CHAR(ior.c_str ())); - ACE_DEBUG ((LM_DEBUG, - "Making a two-way request\n")); - server->two_way (ACE_TEXT_ALWAYS_CHAR(ior.c_str ())); + ACE_DEBUG ((LM_DEBUG, + "Making a two-way request\n")); + server->two_way (ACE_TEXT_ALWAYS_CHAR(ior.c_str ())); - current->end_scheduling_segment (name); + current->end_scheduling_segment (name); - } - catch (const CORBA::THREAD_CANCELLED& ) - { - ACE_DEBUG ((LM_DEBUG, - "Distributable Thread Cancelled - Expected Exception\n")); - server->shutdown (); + } + catch (const CORBA::THREAD_CANCELLED& ) + { + ACE_DEBUG ((LM_DEBUG, + "Distributable Thread Cancelled - Expected Exception\n")); + server->shutdown (); + } + catch (const CORBA::Exception& ex) + { + ex._tao_print_exception ("Caught exception:"); + + return 0; + } + + orb->destroy (); } catch (const CORBA::Exception& ex) { - ex._tao_print_exception ("Caught exception:"); + ex._tao_print_exception ("Caught unexpected exception:"); - return 0; + return 1; } - orb->destroy (); - return 0; } diff --git a/tests/RTScheduling/VoidData/test_client.cpp b/tests/RTScheduling/VoidData/test_client.cpp index f81f48c2378..e2b29cf941c 100644 --- a/tests/RTScheduling/VoidData/test_client.cpp +++ b/tests/RTScheduling/VoidData/test_client.cpp @@ -22,8 +22,16 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[]) { ex._tao_print_exception ("Caught exception:"); - orb->shutdown (); - orb->destroy (); + try + { + orb->shutdown (); + orb->destroy (); + } + catch (const CORBA::Exception& ex) + { + ex._tao_print_exception ("Caught exception while shutting down:"); + return 1; + } return 0; } diff --git a/tests/Sequence_Unit_Tests/bounded_object_reference_sequence_ut.cpp b/tests/Sequence_Unit_Tests/bounded_object_reference_sequence_ut.cpp index c5fd630ab97..15c192b70f8 100644 --- a/tests/Sequence_Unit_Tests/bounded_object_reference_sequence_ut.cpp +++ b/tests/Sequence_Unit_Tests/bounded_object_reference_sequence_ut.cpp @@ -373,17 +373,25 @@ int ACE_TMAIN(int,ACE_TCHAR*[]) int status = 0; Tester mytester; - status += mytester.test_default_constructor(); - status += mytester.test_buffer_constructor_release_true(); - status += mytester.test_buffer_constructor_release_false(); - status += mytester.test_copy_constructor_from_default(); - status += mytester.test_copy_constructor(); - status += mytester.test_copy_constructor_throw_duplicate(); - status += mytester.test_set_length_less_than_maximum(); - status += mytester.test_set_length_more_than_maximum(); - status += mytester.test_replace_release_true(); - status += mytester.test_replace_release_false(); - status += mytester.test_replace_release_default(); + try + { + status += mytester.test_default_constructor(); + status += mytester.test_buffer_constructor_release_true(); + status += mytester.test_buffer_constructor_release_false(); + status += mytester.test_copy_constructor_from_default(); + status += mytester.test_copy_constructor(); + status += mytester.test_copy_constructor_throw_duplicate(); + status += mytester.test_set_length_less_than_maximum(); + status += mytester.test_set_length_more_than_maximum(); + status += mytester.test_replace_release_true(); + status += mytester.test_replace_release_false(); + status += mytester.test_replace_release_default(); + } + catch (const ::CORBA::Exception &ex) + { + ex._tao_print_exception("ERROR : unexpected CORBA exception caugth :"); + ++status; + } return status; } diff --git a/tests/Sequence_Unit_Tests/bounded_sequence_cdr_ut.cpp b/tests/Sequence_Unit_Tests/bounded_sequence_cdr_ut.cpp index 7ebdad108ea..74090a06606 100644 --- a/tests/Sequence_Unit_Tests/bounded_sequence_cdr_ut.cpp +++ b/tests/Sequence_Unit_Tests/bounded_sequence_cdr_ut.cpp @@ -98,9 +98,18 @@ struct Tester int ACE_TMAIN(int,ACE_TCHAR*[]) { int status = 0; - Tester mytester; - status += mytester.test_stream(); + try + { + Tester mytester; + + status += mytester.test_stream(); + } + catch (const ::CORBA::Exception &ex) + { + ex._tao_print_exception("ERROR : unexpected CORBA exception caugth :"); + ++status; + } return status; } diff --git a/tests/Sequence_Unit_Tests/bounded_string_sequence_ut.cpp b/tests/Sequence_Unit_Tests/bounded_string_sequence_ut.cpp index 7e809d46b13..6a9dee75cc4 100644 --- a/tests/Sequence_Unit_Tests/bounded_string_sequence_ut.cpp +++ b/tests/Sequence_Unit_Tests/bounded_string_sequence_ut.cpp @@ -356,18 +356,26 @@ int ACE_TMAIN(int,ACE_TCHAR*[]) { int status = 0; - typedef TAO::bounded_basic_string_sequence<char, MAXIMUM> s_sequence; - typedef Tester<s_sequence> nTester; - nTester myntester; + try + { + typedef TAO::bounded_basic_string_sequence<char, MAXIMUM> s_sequence; + typedef Tester<s_sequence> nTester; + nTester myntester; - status += myntester.test_all(); + status += myntester.test_all(); #if defined(ACE_HAS_WCHAR) && !defined(TAO_LACKS_WCHAR_CXX_STDLIB) - typedef TAO::bounded_basic_string_sequence<CORBA::WChar, MAXIMUM> w_sequence; - typedef Tester<w_sequence> wTester; - wTester mywtester; - status += mywtester.test_all(); + typedef TAO::bounded_basic_string_sequence<CORBA::WChar, MAXIMUM> w_sequence; + typedef Tester<w_sequence> wTester; + wTester mywtester; + status += mywtester.test_all(); #endif + } + catch (const ::CORBA::Exception &ex) + { + ex._tao_print_exception("ERROR : unexpected CORBA exception caugth :"); + ++status; + } return status; } diff --git a/tests/Sequence_Unit_Tests/bounded_value_sequence_ut.cpp b/tests/Sequence_Unit_Tests/bounded_value_sequence_ut.cpp index 1a34645b8a6..3b4d259655c 100644 --- a/tests/Sequence_Unit_Tests/bounded_value_sequence_ut.cpp +++ b/tests/Sequence_Unit_Tests/bounded_value_sequence_ut.cpp @@ -316,16 +316,24 @@ struct Tester int ACE_TMAIN(int,ACE_TCHAR*[]) { int status = 0; - { - Tester tester; - status += tester.test_all (); - } - - { - typedef value_sequence_tester<tested_sequence,tested_allocation_traits> common; - common tester; - status += tester.test_all (); - } + try + { + { + Tester tester; + status += tester.test_all (); + } + + { + typedef value_sequence_tester<tested_sequence,tested_allocation_traits> common; + common tester; + status += tester.test_all (); + } + } + catch (const ::CORBA::Exception &ex) + { + ex._tao_print_exception("ERROR : unexpected CORBA exception caugth :"); + ++status; + } return status; } diff --git a/tests/Sequence_Unit_Tests/object_reference_sequence_element_ut.cpp b/tests/Sequence_Unit_Tests/object_reference_sequence_element_ut.cpp index 6115f4e13b9..f992a8a5ec1 100644 --- a/tests/Sequence_Unit_Tests/object_reference_sequence_element_ut.cpp +++ b/tests/Sequence_Unit_Tests/object_reference_sequence_element_ut.cpp @@ -10,7 +10,10 @@ */ #include "testing_object_reference_traits.hpp" #include "mock_reference.hpp" + #include "tao/Object_Reference_Sequence_Element_T.h" +#include "tao/SystemException.h" + #include "test_macros.h" using namespace TAO_VERSIONED_NAMESPACE_NAME::TAO::details; @@ -286,14 +289,21 @@ using namespace TAO_VERSIONED_NAMESPACE_NAME::TAO::details; int ACE_TMAIN(int,ACE_TCHAR*[]) { int status = 0; - - status += test_assignment_from_var_release_true (); - status += test_assignment_from_var_release_false (); - status += test_assignment_from_var_throw (); - status += test_assignment_from_element_release_true (); - status += test_assignment_from_element_release_false (); - status += test_assignment_from_reference_release_true (); - status += test_assignment_from_reference_release_false (); + try + { + status += test_assignment_from_var_release_true (); + status += test_assignment_from_var_release_false (); + status += test_assignment_from_var_throw (); + status += test_assignment_from_element_release_true (); + status += test_assignment_from_element_release_false (); + status += test_assignment_from_reference_release_true (); + status += test_assignment_from_reference_release_false (); + } + catch (const ::CORBA::Exception &ex) + { + ex._tao_print_exception("ERROR : unexpected CORBA exception caugth :"); + ++status; + } return status; } diff --git a/tests/Sequence_Unit_Tests/string_sequence_element_ut.cpp b/tests/Sequence_Unit_Tests/string_sequence_element_ut.cpp index 0512cc36b51..7c4038736fa 100644 --- a/tests/Sequence_Unit_Tests/string_sequence_element_ut.cpp +++ b/tests/Sequence_Unit_Tests/string_sequence_element_ut.cpp @@ -12,6 +12,7 @@ #include "tao/String_Sequence_Element_T.h" #include "tao/String_Manager_T.h" #include "tao/CORBA_String.h" +#include "tao/SystemException.h" #include "ace/OS_NS_string.h" @@ -398,12 +399,22 @@ struct Tester }; int ACE_TMAIN (int, ACE_TCHAR*[]) - { - int status = 0; - Tester <char> char_tester; - status += char_tester.test_all (); - Tester <char> wchar_tester; - status += wchar_tester.test_all (); - return status; - } +{ + int status = 0; + + try + { + Tester <char> char_tester; + status += char_tester.test_all (); + Tester <char> wchar_tester; + status += wchar_tester.test_all (); + } + catch (const ::CORBA::Exception& ex) + { + ex._tao_print_exception("ERROR : unexpected CORBA exception caugth :"); + ++status; + } + + return status; +} diff --git a/tests/Sequence_Unit_Tests/testing_allocation_traits_ut.cpp b/tests/Sequence_Unit_Tests/testing_allocation_traits_ut.cpp index ae7445e53b4..5f56487eae9 100644 --- a/tests/Sequence_Unit_Tests/testing_allocation_traits_ut.cpp +++ b/tests/Sequence_Unit_Tests/testing_allocation_traits_ut.cpp @@ -10,6 +10,8 @@ #include "testing_allocation_traits.hpp" #include "test_macros.h" +#include "tao/SystemException.h" + #define CHECK_NO_THROW(statement) \ try { statement; } catch(...) { \ return 1; } @@ -152,20 +154,29 @@ struct Foo { int y; }; int ACE_TMAIN(int,ACE_TCHAR*[]) { int status = 0; - { - Tester<int> tester; - status += tester.test_all (); - } - - { - Tester<Foo> tester; - status += tester.test_all (); - } - { - Tester<char*> tester; - status += tester.test_all (); - } + try + { + { + Tester<int> tester; + status += tester.test_all (); + } + + { + Tester<Foo> tester; + status += tester.test_all (); + } + + { + Tester<char*> tester; + status += tester.test_all (); + } + } + catch (const ::CORBA::Exception &ex) + { + ex._tao_print_exception("ERROR : unexpected CORBA exception caugth :"); + ++status; + } return status; } diff --git a/tests/Sequence_Unit_Tests/unbounded_object_reference_sequence_ut.cpp b/tests/Sequence_Unit_Tests/unbounded_object_reference_sequence_ut.cpp index eee6e01f5e3..01d60035814 100644 --- a/tests/Sequence_Unit_Tests/unbounded_object_reference_sequence_ut.cpp +++ b/tests/Sequence_Unit_Tests/unbounded_object_reference_sequence_ut.cpp @@ -491,10 +491,18 @@ struct Tester int ACE_TMAIN(int,ACE_TCHAR*[]) { int status = 0; - { - Tester tester; - status += tester.test_all(); - } + try + { + { + Tester tester; + status += tester.test_all(); + } + } + catch (const ::CORBA::Exception &ex) + { + ex._tao_print_exception("ERROR : unexpected CORBA exception caugth :"); + ++status; + } return status; } diff --git a/tests/Sequence_Unit_Tests/unbounded_octet_sequence_nocopy_ut.cpp b/tests/Sequence_Unit_Tests/unbounded_octet_sequence_nocopy_ut.cpp index 0bc62b60efa..808569938ed 100644 --- a/tests/Sequence_Unit_Tests/unbounded_octet_sequence_nocopy_ut.cpp +++ b/tests/Sequence_Unit_Tests/unbounded_octet_sequence_nocopy_ut.cpp @@ -440,16 +440,24 @@ struct Tester int ACE_TMAIN(int,ACE_TCHAR*[]) { int status = 0; - { - Tester tester; - status += tester.test_all(); - } - - { - typedef value_sequence_tester<tested_sequence,tested_allocation_traits> common; - common tester; - status += tester.test_all (); - } + try + { + { + Tester tester; + status += tester.test_all(); + } + + { + typedef value_sequence_tester<tested_sequence,tested_allocation_traits> common; + common tester; + status += tester.test_all (); + } + } + catch (const ::CORBA::Exception &ex) + { + ex._tao_print_exception("ERROR : unexpected CORBA exception caugth :"); + ++status; + } return status; } diff --git a/tests/Sequence_Unit_Tests/unbounded_octet_sequence_ut.cpp b/tests/Sequence_Unit_Tests/unbounded_octet_sequence_ut.cpp index 20146e92b2e..b778df88b83 100644 --- a/tests/Sequence_Unit_Tests/unbounded_octet_sequence_ut.cpp +++ b/tests/Sequence_Unit_Tests/unbounded_octet_sequence_ut.cpp @@ -397,16 +397,24 @@ struct Tester int ACE_TMAIN(int,ACE_TCHAR*[]) { int status = 0; - { - Tester tester; - status += tester.test_all (); - } - - { - typedef value_sequence_tester<tested_sequence,tested_allocation_traits> common; - common tester; - status += tester.test_all (); - } + try + { + { + Tester tester; + status += tester.test_all (); + } + + { + typedef value_sequence_tester<tested_sequence,tested_allocation_traits> common; + common tester; + status += tester.test_all (); + } + } + catch (const ::CORBA::Exception &ex) + { + ex._tao_print_exception("ERROR : unexpected CORBA exception caugth :"); + ++status; + } return status; } diff --git a/tests/Sequence_Unit_Tests/unbounded_sequence_cdr_ut.cpp b/tests/Sequence_Unit_Tests/unbounded_sequence_cdr_ut.cpp index 6d320b5254d..3219402045f 100644 --- a/tests/Sequence_Unit_Tests/unbounded_sequence_cdr_ut.cpp +++ b/tests/Sequence_Unit_Tests/unbounded_sequence_cdr_ut.cpp @@ -95,8 +95,16 @@ struct Tester int ACE_TMAIN(int,ACE_TCHAR*[]) { int status = 0; - Tester x; - status += x.test_stream (); + try + { + Tester x; + status += x.test_stream (); + } + catch (const ::CORBA::Exception &ex) + { + ex._tao_print_exception("ERROR : unexpected CORBA exception caugth :"); + ++status; + } return status; } diff --git a/tests/Sequence_Unit_Tests/unbounded_string_sequence_ut.cpp b/tests/Sequence_Unit_Tests/unbounded_string_sequence_ut.cpp index 8b540d78d2a..505ba4503d9 100644 --- a/tests/Sequence_Unit_Tests/unbounded_string_sequence_ut.cpp +++ b/tests/Sequence_Unit_Tests/unbounded_string_sequence_ut.cpp @@ -511,19 +511,27 @@ struct Tester int ACE_TMAIN(int,ACE_TCHAR*[]) { int status = 0; - { - typedef Tester<unbounded_basic_string_sequence <char> > nTester; - nTester ntester; - status += ntester.test_all (); - } + try + { + { + typedef Tester<unbounded_basic_string_sequence <char> > nTester; + nTester ntester; + status += ntester.test_all (); + } #if defined(ACE_HAS_WCHAR) && !defined(TAO_LACKS_WCHAR_CXX_STDLIB) - { - typedef Tester<unbounded_basic_string_sequence <CORBA::WChar> > wTester; - wTester wtester; - status += wtester.test_all (); - } + { + typedef Tester<unbounded_basic_string_sequence <CORBA::WChar> > wTester; + wTester wtester; + status += wtester.test_all (); + } #endif + } + catch (const ::CORBA::Exception &ex) + { + ex._tao_print_exception("ERROR : unexpected CORBA exception caugth :"); + ++status; + } return status; } diff --git a/tests/Sequence_Unit_Tests/unbounded_value_sequence_ut.cpp b/tests/Sequence_Unit_Tests/unbounded_value_sequence_ut.cpp index 8edf040fb69..9d7ecc5f841 100644 --- a/tests/Sequence_Unit_Tests/unbounded_value_sequence_ut.cpp +++ b/tests/Sequence_Unit_Tests/unbounded_value_sequence_ut.cpp @@ -418,12 +418,20 @@ struct Tester int ACE_TMAIN(int,ACE_TCHAR*[]) { int status = 0; - Tester tester; - status += tester.test_all (); + try + { + Tester tester; + status += tester.test_all (); - typedef value_sequence_tester<tested_sequence,tested_allocation_traits> common; - common tester2; - status += tester2.test_all (); + typedef value_sequence_tester<tested_sequence,tested_allocation_traits> common; + common tester2; + status += tester2.test_all (); + } + catch (const ::CORBA::Exception &ex) + { + ex._tao_print_exception("ERROR : unexpected CORBA exception caugth :"); + ++status; + } return status; } diff --git a/tests/Smart_Proxies/Collocation/Smart_Proxy_Impl.h b/tests/Smart_Proxies/Collocation/Smart_Proxy_Impl.h index 6e4d005d9e5..6149b7f5dd4 100644 --- a/tests/Smart_Proxies/Collocation/Smart_Proxy_Impl.h +++ b/tests/Smart_Proxies/Collocation/Smart_Proxy_Impl.h @@ -24,8 +24,7 @@ class MY_Stub_Export Smart_Diamond_Top_Proxy : public virtual Diamond::TAO_Diamo Smart_Diamond_Top_Proxy (Diamond::Top_ptr proxy); - virtual char * shape () -; + virtual char * shape (); // Smartify the method call! // Dont need to add any extra functionality into shutdown() diff --git a/utils/nslist/nsadd.cpp b/utils/nslist/nsadd.cpp index beaab182720..18d03aded3e 100644 --- a/utils/nslist/nsadd.cpp +++ b/utils/nslist/nsadd.cpp @@ -1,4 +1,3 @@ - //============================================================================= /** * @file nsadd.cpp @@ -13,7 +12,6 @@ */ //============================================================================= - #include "orbsvcs/CosNamingC.h" #include "ace/Log_Msg.h" #include "ace/OS_NS_string.h" @@ -28,6 +26,8 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[]) CORBA::ORB_var orb; const ACE_TCHAR *ior = 0; + int err = 0; + try { // Contact the orb @@ -366,7 +366,6 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[]) root_nc->bind (the_name, obj.in ()); } } - orb->destroy (); } catch (const CosNaming::NamingContext::NotFound& nf) { @@ -406,18 +405,27 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[]) ACE_DEBUG ((LM_DEBUG, "ID: %C\n", nf.rest_of_name[index].id.in())); } - orb->destroy (); - return 1; + ++err; } catch (const CORBA::Exception& ex) { ACE_DEBUG ((LM_DEBUG, "\nError:\n")); ex._tao_print_exception ("Exception in nsadd"); orb->destroy (); - return 1; + ++err; } - return 0; + try + { + orb->destroy (); + } + catch (const CORBA::Exception& ex) + { + ACE_DEBUG ((LM_DEBUG, "\nError:\n")); + ex._tao_print_exception ("Exception in while shutting down"); + ++err; + } + return err; } diff --git a/utils/nslist/nsdel.cpp b/utils/nslist/nsdel.cpp index 0b426a93c8d..995ad096eec 100644 --- a/utils/nslist/nsdel.cpp +++ b/utils/nslist/nsdel.cpp @@ -62,6 +62,7 @@ namespace int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { + int err = 0; CosNaming::Name the_name (0); CORBA::ORB_var orb; @@ -331,7 +332,6 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[]) } } } - orb->destroy (); } catch (const CosNaming::NamingContext::NotFound& nf) { @@ -372,16 +372,24 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[]) ACE_DEBUG ((LM_DEBUG, "ID: %C\n", nf.rest_of_name[index].id.in())); } - orb->destroy (); - return 1; + ++err; } catch (const CORBA::Exception& ex) { ACE_DEBUG ((LM_DEBUG, "\nError:\n")); ex._tao_print_exception ("Exception in nsdel"); - orb->destroy (); - return 1; + ++err; } - return 0; + try + { + orb->destroy (); + } + catch (const CORBA::Exception& ex) + { + ACE_DEBUG ((LM_DEBUG, "\nError:\n")); + ex._tao_print_exception ("Exception in while shutting down"); + ++err; + } + return err; } diff --git a/utils/nslist/nslist.cpp b/utils/nslist/nslist.cpp index a37959d410a..6ac49370a10 100644 --- a/utils/nslist/nslist.cpp +++ b/utils/nslist/nslist.cpp @@ -361,6 +361,8 @@ namespace int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { + int err = 0; + try { // Contact the orb @@ -718,14 +720,23 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[]) ((showCtxIOR)? str.in () : ""))); list_context (root_nc.in (), 1); } - orb->destroy (); } catch (const CORBA::Exception& ex) { ex._tao_print_exception ("Exception in nslist"); + ++err; + } + + try + { orb->destroy (); - return -1; + } + catch (const CORBA::Exception& ex) + { + ACE_DEBUG ((LM_DEBUG, "\nError:\n")); + ex._tao_print_exception ("Exception in while shutting down"); + ++err; } - return 0; + return err; } |